new CanvasScreen(cols, rows, options)
Renders to canvas.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cols |
number | number of colums |
||||||||||||||||||||||||
rows |
number | number of rows |
||||||||||||||||||||||||
options |
object | additional options Properties
|
- Source:
Extends
Methods
-
clear()
-
Clears internal screen representation.
- Inherited From:
- Source:
-
repaint()
-
Repaints screen.
- Source:
-
togglePixel(x, y) → {boolean}
-
Toggles pixel at location (x, y).
Parameters:
Name Type Description x
number y
number - Inherited From:
- Source:
Returns:
true if collision occurs, false otherwise.
- Type
- boolean