Constructors
constructor
- new Table(width: number, height: number): Table
-
Parameters
-
width: number
-
height: number
Properties
Readonly height
height: number
Readonly width
width: number
Methods
filter
-
Parameters
-
match: (v: Vector2, val: T | undefined) => boolean
-
- (v: Vector2, val: T | undefined): boolean
-
Parameters
Returns boolean
floodFillSelect
-
Parameters
-
-
Optional targetValue: T | undefined
get
- get(__namedParameters: { x: number; y: number }): T | undefined
-
Parameters
-
__namedParameters: { x: number; y: number }
Returns T | undefined
getNeighbors
- getNeighbors(pos: Vector2, predicate?: undefined | ((pos: Vector2, t: T | undefined) => Boolean), topology?: "four" | "eight"): Vector2[]
-
Parameters
-
-
Optional predicate: undefined | ((pos: Vector2, t: T | undefined) => Boolean)
-
Default value topology: "four" | "eight" = "eight"
isInBounds
- isInBounds(__namedParameters: { x: number; y: number }): boolean
-
Parameters
-
__namedParameters: { x: number; y: number }
Returns boolean
isSameSize
- isSameSize(other: Table<T>): boolean
-
Parameters
Returns boolean
set
- set(pos: Vector2, item: T | undefined): void