Simulation
Entities
39 symbols, imported from @driftengine/entities.
Explained in Entities.
Classes
BoundSystem- The view one system sees, reused across ticks.
ComponentStoreEntityAllocator- Slots, their generations, and a queue of the ones that are free.
QueryCursorWorld
Interfaces
AllocatorSnapshot- An allocator's whole position, for a rewind.
ComponentStoreOptionsComponentTypeComponentView- A component's storage, addressable by field name.
CursorHost- What a cursor needs from the world it belongs to.
EntityAllocatorOptionsPrefabScheduleSerializedSceneStoreSnapshot- One store's contents, for a rewind. Reused between saves; see
AllocatorSnapshot. SystemDefinitionSystemFailure- One system's failure in one step, as
runSchedulehands it to a reporter. SystemViewWorldSnapshot- 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.
createAllocatorSnapshotcreateStoreSnapshotcreateWorldSnapshot- An empty slot, to be filled by
World.saveIntoand reused for the life of a rewind ring. defineComponentdefinePrefab- 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.
entityGenerationentityIndexinstantiate- Make one.
packEntityrunSchedule- 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.
LoadResultSystemFailureReporter- 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.