Skip to content

Component

Component<S> = { [K in keyof S]: InstanceType<S[K]> } & object

A component is plain SoA storage indexed by entity: Position.x[e]. Arrays are replaced when the world grows past its capacity (16k entities by default), so read Position.x inside each system run; never cache it across frames. A cached array from before the growth reads as empty (undefined), so the mistake shows up as vanishing sprites.

S extends Schema = Schema

readonly [META]: Meta