shape.module
README.md
shape
Turns a car spec into geometry. Shape.meshes(m, look) gives the raw geometry (positions, normals,
vertex colours, indices) of the shell, bumper, bonnet, glass and interior for one model and look;
Shape.wheel(look) a unit wheel; Shape.bumper / Shape.bonnet their placement on the chassis;
Shape.lattice(m, S) the soft-body lattice of the shell (particles, cells, surface triangles,
elements, shell mass) that Cars.spawn hands to the SoftBody.
Called by build (to author the .mesh assets) and at spawn time by cars and CrashCar (the
lattice and the crush zones). Changing it changes what is drawn: re-run
require("crashCars.build").all(); require("crashCars.build").refs() in edit mode afterwards.