@flodlc/nebula
Version:
Including configurable Stars, Nebulas, Comets, Planets and Suns. Nebula comes with a vanilla JS and a React wrapper. Compatible with SSR
12 lines (11 loc) • 360 B
TypeScript
export declare abstract class Drawable {
protected ctx: CanvasRenderingContext2D;
constructor({ ctx }: {
ctx: CanvasRenderingContext2D;
});
abstract draw: () => void;
protected getCanvasWidth(): number;
protected getCanvasHeight(): number;
protected get canvasMinSide(): number;
protected get canvasMaxSide(): number;
}