-
Notifications
You must be signed in to change notification settings - Fork 4
Grid API
The Grid class defines an isometric grid. When Dominion loads, it creates a new Grid object to manage the grid.
var grid = new Grid(canvas, origin);
var grid = new Grid(canvas, origin, movable, tileSize, color, strokeThickness);Moves the grid origin to the center of the canvas.
Moves the isometric point to the center of the canvas.
Draws an isometric grid on the canvas.
Optional: startingPoint and endingPoint: a grid will be drawn on the entire canvas if omitted.
Calculates the orthographic width of a tile when displayed isometrically.
Returns: (float) orthographic width
Calculates the orthographic height of a tile when displayed isometrically.
Returns: (float) orthographic height
Represents the Canvas object that is used.
Represents the orthographic point where the isometric point is (0, 0).
Whether origin can me moved.
Represents the side length of a single square grid tile
Color of the grid lines when the grid is drawn.
Thickness of the lines when the grid is drawn.