Large worlds · interface
FreezableWorld
What freezing needs of a world.
Explained in Coordinates and units.
interface FreezableWorldimport type { FreezableWorld } from '@driftengine/core';In depth
Taken as a parameter rather than imported, on AGENTS.md's rule: core has no entity store and a
consumer may be holding one of several. Five methods, all of which any store can answer.
Methods
entitiesIn
entitiesIn(cell: number): readonly number[]Every entity whose home is this cell, live or not.
| Parameter | Type | Description |
|---|---|---|
cell | number |
readState
readState(entity: number, out: Float64Array): numberWrite an entity's whole state into out and return how many values were written.
| Parameter | Type | Description |
|---|---|---|
entity | number | |
out | Float64Array |
writeState
writeState(entity: number, values: Float64Array, count: number): voidPut a state back, exactly.
| Parameter | Type | Description |
|---|---|---|
entity | number | |
values | Float64Array | |
count | number |
simulating
simulating(entity: number): boolean| Parameter | Type | Description |
|---|---|---|
entity | number |
setSimulating
setSimulating(entity: number, on: boolean): void| Parameter | Type | Description |
|---|---|---|
entity | number | |
on | boolean |