Properties
Readonly length
length: number
Methods
Optional fill
fill<R>( value: R | ( ( x: number , y: number ) => R ) ) : void
Type parameters
R: Record < string | number , unknown >
Parameters
value: R | ( ( x: number , y: number ) => R )
Returns void
forEach
forEach( callback: ( block: T , x: number , y: number ) => boolean ) : boolean
Parameters
callback: ( block: T , x: number , y: number ) => boolean
( block: T , x: number , y: number ) : boolean
Parameters
block: T
x: number
y: number
Returns boolean
Returns boolean
get
get( x: number , y: number ) : undefined | T
Parameters
Returns undefined | T
getAroundData
getAroundData( x: number , y: number , size?: number ) : Grid2Block < T > []
Parameters
x: number
y: number
Optional size: number
set
set( x: number , y: number , value: T ) : void
Parameters
x: number
y: number
value: T
Returns void
Optional swap
swap( ax: number , ay: number , bx: number , by: number ) : void
Parameters
ax: number
ay: number
bx: number
by: number
Returns void
Optional transform
transform( x: number , y: number , transformer: ( value: T ) => T ) : void
Parameters
x: number
y: number
transformer: ( value: T ) => T
Returns void
Legend
Variable
Function
Function with type parameter
Type alias
Type alias with type parameter
Interface
Interface with type parameter
Property
Method
Class
Class with type parameter
Iterate over all elements. If callback returns false, iteration will breaks and function returns false. If any callback call returns false, function returns false otherwise function returns true