five-on-it / packages/world/src/audit
packages/world/src/audit
The level audit: the geometric rules a generated level passes with nobody looking at a picture of it, and the repair a generation makes before it gives up. auditLevel runs the rules: props in each other, a prop inside a building, buildings in each other, pieces that do not rest on what is under them, pieces in a carriageway, z-fighting, paint over paint, and roads the spawn's road cannot reach. repairLevel drops what may be dropped (a faulty prop of a shared kit, paint under other paint), never moving anything, and audits again, three rounds at most: what is left is the generator's fault to report. See README.md beside this file.
Interfaces
Type Aliases
Variables
Functions
References
CoplanarOverlap
Re-exports CoplanarOverlap
coplanarOverlaps
Re-exports coplanarOverlaps
isNatural
Re-exports isNatural
isPaint
Re-exports isPaint
meshTriangles
Re-exports meshTriangles
onBasePlane
Re-exports onBasePlane
PaintTriangle
Re-exports PaintTriangle
PieceFacts
Re-exports PieceFacts
PieceRests
Re-exports PieceRests
sharedArea
Re-exports sharedArea
TriangleSoup
Re-exports TriangleSoup