Passed to the draw function of a GameObject
DrawOptions
const options: DrawOptions = { canvas: document.getElementById("canvas") as HTMLCanvasElement, ctx: document.getElementById("canvas").getContext("2d"), camera: [0, 0] } Copy
const options: DrawOptions = { canvas: document.getElementById("canvas") as HTMLCanvasElement, ctx: document.getElementById("canvas").getContext("2d"), camera: [0, 0] }
Position of the camera in the scene
Optional
Used for positional calculations.
Canvas rendering context that the object draws with
Generated using TypeDoc
Passed to the draw function of a GameObject
DrawOptions
Example