led-matrix
Version:
Utility for storing graphical data in a matrix
27 lines (26 loc) • 635 B
TypeScript
import { IMatrix } from 'matrix-display-store';
export interface ILedMatrixOptions {
x?: number;
y?: number;
pixelWidth?: number;
pixelHeight?: number;
margin?: number;
glow?: boolean;
animated?: boolean;
}
export declare class LedMatrix {
private canvas;
private ctx;
private opts;
private data;
private offset;
private rAF;
constructor(canvas: HTMLCanvasElement, opts?: ILedMatrixOptions);
private setup();
render(): void;
private draw();
animate(): void;
clear(): void;
setNewOptions(opts: ILedMatrixOptions): void;
setData(data: IMatrix): void;
}