UNPKG

@niuee/board

Version:

<h1 align="center"> board </h1> <p align="center"> board supercharges your html canvas element giving it the capabilities to pan, zoom, rotate, and much more. </p> <p align="center"> <a href="https://www.npmjs.com/package/@niuee/board">

29 lines (28 loc) 808 B
import { Point } from "../util/misc"; /** * @description The interface for the draw task. (WIP) * * @category Drawing Engine */ export interface DrawTask { draw(deltaTime: number): void; drawWithContext(context: CanvasRenderingContext2D, deltaTime: number): void; } /** * @description The container for the draw tasks. (WIP) * * @category Drawing Engine */ export declare class Container implements DrawTask { private _position; private _rotation; private _scale; private _children; private _context; constructor(context: CanvasRenderingContext2D); set position(position: Point); get position(): Point; addDrawTask(task: DrawTask): void; drawWithContext(context: CanvasRenderingContext2D, deltaTime: number): void; draw(deltaTime: number): void; }