EntityView

interface EntityView

The read half of the store, which is all World.entities hands out.

The write half — add, update, remove — is the world's alone, because every write has bookkeeping beside it that a caller cannot see: the interpolation history, the landed set, the rails epoch. A door that skips that bookkeeping is exactly as wide as the one that does it, so there is no such door on the type. The writers are spawn, spawnShip, teleport, reframeEntity, setControl, setThrottle, setFlightAssist and killRotation.

simulation/src/entity.ts:151

Members

dynamicIdCounterreadonly

dynamicIdCounter: number

sizereadonly

size: number

all

all() → IterableIterator<Entity>

get

get(id: EntityId) → Entity | undefined
idEntityId
Undocumented

has

has(id: EntityId) → boolean
idEntityId
Undocumented

ordered

ordered() → readonly Entity[]

require

require(id: EntityId) → Entity
idEntityId
Undocumented