crashLab.package
This package holds more than this page lists. See all of its files in its world.
README.md
crashLab test suite
Checks the crashLab package (the crash-test hall):
- Styles and assets.
Lab.STYLESis exactly modern, classic and night, each with a light rig inLab.LIGHTS. Everyasset.resolveinlab.module(the 30 meshes and 36 materials, including each style's wall, dado, deck, steel and lamp materials) resolves, and so does every texture each material'smat.yamlnames. - Layout contract. The
Lab.LAYOUTvolumes nest the way the README says: the track sits inside the clear space, the clear space sits inside the hall, and the floor covers the hall. On a built hall, the floorBoxColliderspans x −21..21, z −21..81 with its top at y = 0, and so covers the track. No wall or glass collider, light or screen enters the clear space. Every triangle of every hall mesh is read back withmeshRef:load()and tested against the clear volume (x −6..6, y 0.05..5, z −10..62), and none enters it. - Camera spots. All eight spots are finite, offset by
origin, stand inside the hall (or the pit forunderCar), and look at a point inside the hall at least 1 m away. - Build and clear.
Lab.clearremoves the root and all 55 entities under it. A secondLab.buildwith the same name replaces the first root instead of adding another one. - Gallery.
crashLab.gallerybuilds three halls 60 m apart, labels each one with its style name as aText3D, adds exactly one ambient light, and rebuilds in place.
It leaves the visual look alone (lighting, texture content, the z-fighting diagnostic), and it doesn't check the browser build. Every hall it builds stands at x = −1800 so the suite can run beside a live game scene. It cleans up after itself.
Run it with zero tests run crashLab (edit mode), or with asset.resolve("crashLab", "testSuite"):run().