/led-matrix

An HTML5 Canvas LED Matrix Simulator

Primary LanguageTypeScriptMIT LicenseMIT

HTML5 LED Matrix

Build Status

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