Using npm:
$ npm i draw-on-canvas
import Draw from 'draw-on-canvas';
const element = document.getElementById('draw');
new Draw(element, 256, 256)
- live example: https://fkropfhamer.github.io/draw-on-canvas-example/
- repository: https://github.com/fkropfhamer/draw-on-canvas-example