five-on-it / apps/client/src/renderer/level-batches / buildBatches
Function: buildBatches()
buildBatches(
scene,root,level,which,foldable):LevelBatches
Defined in: apps/client/src/renderer/level-batches.ts:320
Bakes the placements which says into batches under root: their triangles placed in the world, by cell and surface, every corner its own vertex with its face's normal and its colour (flat shading, as the pieces' own meshes have). foldable says which may be folded out of their batch (a light piece that comes loose, a tall building that fades).
Parameters
scene
Scene
root
TransformNode
level
which
(placement, index) => boolean
foldable
(placement, index) => boolean