ExploredGrid
Defined in: sdk/src/render/fogOfWar.ts:115
What has been seen, on a grid of cells over the fog’s rectangle: the part that survives a lost device and goes into a save.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExploredGrid(
size):ExploredGrid
Defined in: sdk/src/render/fogOfWar.ts:118
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”ExploredGrid
Properties
Section titled “Properties”
readonlycells:Uint8Array
Defined in: sdk/src/render/fogOfWar.ts:116
readonlysize:number
Defined in: sdk/src/render/fogOfWar.ts:118
Methods
Section titled “Methods”fromString()
Section titled “fromString()”fromString(
text):boolean
Defined in: sdk/src/render/fogOfWar.ts:166
Takes what toString wrote. False, leaving the grid as it was, for a string of another size or a damaged one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
mark()
Section titled “mark()”mark(
x,y,left,bottom,width,height):boolean
Defined in: sdk/src/render/fogOfWar.ts:123
Marks the cell holding a world point, given the rectangle’s low corner and its edge. True when it was new.
Parameters
Section titled “Parameters”number
number
number
bottom
Section titled “bottom”number
number
height
Section titled “height”number
Returns
Section titled “Returns”boolean
markFan()
Section titled “markFan()”markFan(
origin,distances,left,bottom,width,height):boolean
Defined in: sdk/src/render/fogOfWar.ts:133
Marks everything the rays of one viewer reach, a block of cells round each step along each ray.
Parameters
Section titled “Parameters”origin
Section titled “origin”distances
Section titled “distances”Float32Array
number
bottom
Section titled “bottom”number
number
height
Section titled “height”number
Returns
Section titled “Returns”boolean
toString()
Section titled “toString()”toString():
string
Defined in: sdk/src/render/fogOfWar.ts:152
The grid as a string a save file can hold: run lengths of its cells, in base 36.
Returns
Section titled “Returns”string