DrawFunction
The DrawFunction
type represents the function that is called every frame to draw an object in the game.
Definition
type DrawFunction = (ctx: CanvasRenderingContext2D) => void;
Parameters
ctx
- Type:
CanvasRenderingContext2D
- The canvas rendering context on which the object will be drawn.
- Type:
Return Value
void