Constructor
new Renderer2D(canvasopt)
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
canvas |
HTMLCanvasElement
|
<optional>
|
element to draw on |
Extends
Classes
- Renderer2D
Members
- Source:
- Overrides:
Type:
ctx :CanvasRenderingContext2D
- Source:
Type:
domElement :HTMLCanvasElement
- Source:
- Overrides:
Type:
height :number
- Description:
- Source:
- Overrides:
Height of the renderer
Type:
width :number
- Description:
- Source:
- Overrides:
Width of the renderer
Type:
Methods
bindTo(selector, focus)
- Source:
- Deprecated:
Parameters:
Name |
Type |
Default |
Description |
selector |
string
|
|
|
focus |
boolean
|
true
|
|
clear()
- Source:
- Deprecated:
setViewport(x, y)
- Source:
- Deprecated:
Parameters:
Name |
Type |
Description |
x |
number
|
|
y |
number
|
|
(static) clear(renderer)
- Source:
Parameters:
(static) render(ctx, position, orientation, scale, sprite, dt)
- Source:
Parameters:
Name |
Type |
Description |
ctx |
CanvasRenderingContext2D
|
|
position |
Vector2
|
|
orientation |
number
|
|
scale |
Vector2
|
|
sprite |
Sprite.<T, U>
|
|
dt |
number
|
|