▶️MayoGL Class
Initialising a canvas
To create a drawing process, just Initialise the class.
Example
Options
Canvas
A dom canvas element on which it will draw
Options
A list of options you can use to customize your rendering
name | Type | Description | Default Value |
---|---|---|---|
width | Number | The width of the canvas | Your canvas default width |
height | Number | The height of the canvas | Your canvas default height |
alpha | Boolean | Should the canvas be transparent | false |
clearColor | String | The background colour if you clear the screen | Black (#000000) |
pixelSize | Number | The size of a pixel on the canvas; eg.: if 4, each pixel drawn will take up 4 pixels on the screen. | 1 |
antiAlias | Boolean | Anti Aliasing, smooth picture | false |
Last updated