CrowdOptions
Options for makeCrowd. Distances are in world voxels from the camera.
Defined in: engine/src/animation/crowd.ts:50
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
budgetMs? | number | Milliseconds per update allowed for new bakes. Default 4. | engine/src/animation/crowd.ts:86 |
cache? | PoseCache<BakedPose> | Share a pose cache between crowds. Default a new one with a 96 MiB budget. | engine/src/animation/crowd.ts:74 |
farFps? | number | Clip sampling rate beyond near. Default 6. | engine/src/animation/crowd.ts:82 |
fps? | number | Clip sampling rate near the camera. Default 12. | engine/src/animation/crowd.ts:76 |
freeze? | number | Beyond this distance poses freeze (members still move). Default 400. | engine/src/animation/crowd.ts:84 |
headings? | number | Heading buckets. Default 16. | engine/src/animation/crowd.ts:78 |
instances? | InstanceLayer | Draw members as instances instead: each pose is uploaded once as a model (no heading buckets: the instance turns it) and members move and turn smoothly, with nothing written into the world. Needs a renderer with instancing; the layer's commit is called at the end of each update. | engine/src/animation/crowd.ts:59 |
keepModels? | boolean | Keep each baked pose's full posed model, not just its sprite (for hit tests against exact voxels and bones). Off by default: a sprite is a small fraction of the dense posed grid, so many more poses fit the cache. | engine/src/animation/crowd.ts:92 |
near? | number | Full rate within this distance, farFps beyond it. Default 120. | engine/src/animation/crowd.ts:80 |
rigged? | boolean | With instances: pose members on the GPU instead of baking. Each variant's rest model is uploaded once (see prepareRigged) and every member is one instance carrying its bone matrices, so there are no bakes, no pose models and no per-pose uploads; the frame LOD still applies (it only saves matrix work now). Joints are welded but, unlike a bake, diagonal bridges and crack fill are not reproduced. Based on the rest-space animation of Gruen, Benthin, Kern and McAllister, "Ray Tracing Massive Amounts of Animated Geometry" (HPG 2026, doi:10.1145/3820014), and Kao, Makowski, Fujieda and Harada, "Voxel Deformation-Aware Neural Intersection Function" (EG 2026, doi:10.2312/egs.20261026). | engine/src/animation/crowd.ts:72 |
stamper? | BrickStamper | Stamp members into the world's bricks. One of stamper or instances. | engine/src/animation/crowd.ts:52 |
stepFar? | boolean | Beyond near, re-stamp a member only when its pose frame changes, moving it in steps like sprite animation, instead of whenever its rounded position changes. Near members still move every frame. Default true. | engine/src/animation/crowd.ts:98 |