led-matrix
v1.0.1
Published
Utility for storing graphical data in a matrix
Downloads
49
Maintainers
Readme
HTML5 LED Matrix
An HTML5 Matrix display simulator that accepts a matrix of pixel data and renders them using HTML5 Canvas.
Install
$ npm install led-matrix --save-dev
# or
$ yarn add led-matrix
Usage
import { LedMatrix } from 'led-matrix';
import { createStore } from 'matrix-display-store';
const store = createStore(32, 16);
const matrix = new LedMatrix(canvasElement, {
x: 32,
y: 16,
// other options...
});
matrix.setData(store.matrix);
matrix.render();
Options
{
x: number;
y: number;
pixelWidth: number;
pixelHeight: number;
margin: number;
glow: boolean;
animated: boolean;
}
Related
License
Licensed under the MIT License