Simulation

Entities

39 symbols, imported from @driftengine/entities.

Explained in Entities.

Classes

BoundSystem
The view one system sees, reused across ticks.
ComponentStore
EntityAllocator
Slots, their generations, and a queue of the ones that are free.
QueryCursor
World

Interfaces

AllocatorSnapshot
An allocator's whole position, for a rewind.
ComponentStoreOptions
ComponentType
ComponentView
A component's storage, addressable by field name.
CursorHost
What a cursor needs from the world it belongs to.
EntityAllocatorOptions
Prefab
Schedule
SerializedScene
StoreSnapshot
One store's contents, for a rewind. Reused between saves; see AllocatorSnapshot.
SystemDefinition
SystemFailure
One system's failure in one step, as runSchedule hands it to a reporter.
SystemView
WorldSnapshot
A world's whole state at one instant, for a rewind. Not a save file, and the two are not interchangeable.

Functions

buildSchedule
Order the systems, refusing what cannot be ordered.
createAllocatorSnapshot
createStoreSnapshot
createWorldSnapshot
An empty slot, to be filled by World.saveInto and reused for the life of a rewind ring.
defineComponent
definePrefab
A prefab, refused here if it names a field one of its components does not have.
deserializeWorld
Read a world in, or refuse in words having written nothing.
entityGeneration
entityIndex
instantiate
Make one.
packEntity
runSchedule
Run one fixed step of a schedule.
serializeWorld
Write a world out.

Types

ComponentDefault
A field's declared value: a number for every numeric and enum column, a flag, or a string.
Entity
An entity handle.
LoadResult
SystemFailureReporter
Called with every failure, every tick. Throwing from it stops the schedule at that system.
ViewColumn
Every array shape a column can be. unknown[] is the boxed case — today, String.

Constants

ENTITY_GENERATION_CEILING
One past the highest generation: 2^27, or 134,217,728 reuses of one slot.
ENTITY_INDEX_CEILING
One past the highest index a handle can carry: 2^26, or 67,108,864 entities.