a node.js module for low-level animated 2D-Pixel Art
This library draw, fill, move and resize 2D-Pixel art to a grid like a LED-Matrix.
run
npm test
eg:
node consoleDebug.js polygon 1,0 5,0 7,5 1,5
or
node consoleDebug.js line 1,0 5,0
- Point
- Line
- Polygon
To build and debug your animation code, use the ConsolePrinter. See examples in /examples directory
var dirarare = require('dirarare-client-lib');
var matrix = new dirarare.Matrix(8, 8);
var ConsolePrinter = new dirarare.ConsolePrinter(matrix);
matrix.setTarget( ConsolePrinter );
To run your animation on the dirarare pixel matrix, just replace the printer with the ArtNetPrinter module.
var Matrix = require('./lib/matrix')
var ArtNetPrinter = require('./lib/printer/artnet')(matrix);
matrix.setTarget( ArtNetPrinter );
It is possible to add two ore more printer targets to the matrix:
var dirarare = require('dirarare-client-lib');
var matrix = new dirarare.Matrix(8, 8);
var ConsolePrinter = new dirarare.ConsolePrinter(matrix);
var ArtNetPrinter = new dirarare.ArtNetPrinter(matrix);
matrix.setTarget( ConsolePrinter, ArtNetPrinter );
A working Pong in 155 lines of code is here: Dirarare Pong
- Polygons
- Lines
- Movement
- Resizing
- Dimming
- Multi Server Support (Multiplxing)
Yes, please! If you want to help, feel free! I am glad about every pull request.