The Grid container
The Grid Highlight container
Map named highlight layers
Placeable Object borders which are drawn overtop of the Grid
Options for this layer instance.
The grid type rendered in this Scene
A convenient reference to the pixel grid size used throughout this layer
Get grid unit width
Get grid unit height
A boolean flag for whether the current grid is hexagonal
The canonical name of the CanvasLayer
The name used by hooks to construct their hook string. Note: You should override this getter if hookName should not return the class constructor name.
Return a reference to the active instance of this canvas layer
Draw the grid
Override settings used in place of those saved to the Scene data
Given a pair of coordinates (x, y) - return the top-left of the grid square which contains that point
Coordinate X.
Coordinate Y.
An Array [x, y] of the top-left coordinate of the square which contains (x, y)
Given a pair of coordinates (x, y), return the center of the grid square which contains that point
Coordinate X.
Coordinate Y.
An Array [x, y] of the central point of the square which contains (x, y)
Measure the distance between two point coordinates.
The origin point
The target point
Additional options which modify the measurement
The measured distance between these points
Measure the distance traveled over an array of distance segments.
An array of measured segments
Additional options which modify the measurement
Define a new Highlight graphic
The name for the referenced highlight layer
Clear a specific Highlight graphic
The name for the referenced highlight layer
Destroy a specific Highlight graphic
The name for the referenced highlight layer
Obtain the highlight layer graphic by name
The name for the referenced highlight layer
Add highlighting for a specific grid position to a named highlight graphic
The name for the referenced highlight layer
Options for the grid position that should be highlighted
Test if a specific row and column position is a neighboring location to another row and column coordinate
The original row position
The original column position
The candidate row position
The candidate column position
Draw the canvas layer, rendering its internal components and returning a Promise. The Promise resolves to the drawn layer once its contents are successfully rendered.
Deconstruct data used in the current layer in preparation to re-draw the canvas
The inner _tearDown method which may be customized by each CanvasLayer subclass.
A CanvasLayer responsible for drawing a square grid