Physics · interface
ColliderBytes
What a collider set costs, in bytes, split so a streaming budget can act on it.
Explained in Your first game, Rigid bodies.
interface ColliderBytesimport type { ColliderBytes } from '@driftengine/physics';In depth
A single number would not answer the question a budget asks, which is what to drop.
Properties
| Name | Type | Description |
|---|---|---|
slotsreadonly | number | The packed bounds, the query stamps and the owners. Exact.MoreWhat was allocated, not what is used. The arrays double as they grow and a free list
recycles slots without ever shrinking them, so this is the memory actually held — which is
what a budget needs and what |
shapesreadonly | number | The distinct shape payloads reachable from live slots. Exact. |
indexreadonly | number | The spatial hash: its buckets and their entries. Part measured, part estimated. |
totalreadonly | number | The three above. |