ReadonlyGridBase
What every grid reads, whatever its dimensions.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Values extends GridArray |
GridArray |
Properties
Section titled “Properties”Methods
Section titled “Methods”cellAt()
Section titled “cellAt()”cellAt(
index,out): [number,number,number]
Writes the coordinates of the cell at index into out, a
dimension the grid lacks as 0, and returns out.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
out |
[number, number, number] |
Returns
Section titled “Returns”[number, number, number]
forEachChange()
Section titled “forEachChange()”forEachChange(
since,visit):boolean
Visits each change after version since, oldest first, and returns
true; returns false, visiting nothing, when the grid no longer keeps
the changes since since, so the reader reads values whole. The
change handed is the same object for each visit.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
since |
number |
visit |
(change) => void |
Returns
Section titled “Returns”boolean
readAt()
Section titled “readAt()”readAt(
index):number
The value at index. Throws for an index outside the grid.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
Returns
Section titled “Returns”number