Drawable
An object that the camera is capable of culling and drawing to the screen.
Method Summary
Public Methods | ||
public |
Set the rectangular bounds of the section to draw. |
|
public |
draw(ctx: CanvasRenderingContext2D, x: number, y: number) Draws at given position. |
Public Methods
public bounds(rect: Rect) source
Set the rectangular bounds of the section to draw.
Params:
Name | Type | Attribute | Description |
rect | Rect | Object bounds |
public draw(ctx: CanvasRenderingContext2D, x: number, y: number) source
Draws at given position.
Params:
Name | Type | Attribute | Description |
ctx | CanvasRenderingContext2D | Render context |
|
x | number | Transformed x coordinate |
|
y | number | Transformed y coordinate |