Entities · interface
StoreSnapshot
One store's contents, for a rewind. Reused between saves; see AllocatorSnapshot.
Explained in Entities.
interface StoreSnapshotimport type { StoreSnapshot } from '@driftengine/entities';In depth
sparse is absent and that is a decision. It is derivable from dense — position i holds
the entity whose sparse entry is i — and its length grows with the highest entity index the
world has ever reached rather than with the live set. A world of forty entities that once held
forty thousand would copy 160 KB per store per tick to save an array it can rebuild in forty
writes. loadFrom rebuilds it.
Properties
| Name | Type | Description |
|---|---|---|
count | number | |
dense | Float64Array | |
columns | Map<string, NumericColumn | unknown[]> | Field name to its column's contents, mirroring columns. Grown to match, never shrunk. |