pixelated-canvas
v0.5.4
Published
A canvas that lets you draw in a pixelated, 8-bit style.
Readme
Pixelated Canvas
A canvas that lets you draw in a pixelated, 8-bit style.

Demo
Quickstart
import Canvas from 'pixelated-canvas';
const canvas = new Canvas();
canvas.render(document.body);API
The following props are supported:
widthheightxPixelsyPixels
const canvas = new Canvas({
width: 500,
height: 500,
xPixels: 20,
yPixels: 10,
});pixelSize can also be set after instantiation with:
canvas.setPixelSize(20, 20);The following callbacks are supported:
onMouseDownonMouseUponMouseMove
canvas.onMouseDown((e) => {
});
canvas.onMouseUp((e) => {
});
canvas.onMouseMove((e) => {
});