UNPKG

ridder

Version:

A straightforward game engine for simple data-driven games in JavaScript

19 lines (18 loc) 726 B
export declare const canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D; export declare const scale: import("./vector.js").Vector; /** * Setup the main rendering canvas that automatically resizes to the window while maintaining aspect ratio. */ export declare function setupCanvas(w: number, h: number): void; /** * Return the logical width of the canvas. * * NOTE - This is the width you used in the `run` function, not the actual width of the canvas element. */ export declare function getWidth(): number; /** * Return the logical height of the canvas. * * NOTE - This is the height you used in the `run` function, not the actual height of the canvas element. */ export declare function getHeight(): number;