The height of the grid, in tiles
Draw the current state of the app to the canvas element.
The grid to be rendered
The x position of the mouse on the canvas
The y position of the mouse on the canvas
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Gets the "heat" of every tile by calculating how many particles are on top of the tile
An array of numbers from 0 to 1, representing the "heat" of each tile
Add an event listener to a listenable object and save everything needed for removing it later.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Add a one-time listener for a given event.
Converts coordinates in "pixel space" to coordinates in "tile space". In essence, if you pass in an (x, y) position on the canvas, this returns the corresponding (x, y) position on the grid.
The x position, in pixels, to get the corresponding grid position for
The y position, in pixels, to get the corresponding grid position for
The width of the grid, in grid tiles
The height of the grid, in grid tiles
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Resets the this.mouseX and this.mouseY variables. Call this when the mouse leaves the canvas or the screen is not being touched.
Update the grid size width and height.
Remove a listener from a listenable object.
Update, then draw the current state of the app to the canvas element.
The grid to be rendered
Updates the this.mouseX and this.mouseY variables based on where the mouse is on the canvas
The touch or click event that contains the new "mouse" position
Generated using TypeDoc
The width of the grid, in tiles