imgFormatter = (name, w = 32, h = 32) => {
const canvas = DOM.canvas(w, h);
const ctx = canvas.getContext('2d');
canvas.className = 'sketch-pad ' + name;
ctx.fillStyle = '#333';
canvas.clear = () => {
ctx.clearRect(0, 0, canvas.width, canvas.height);
};
canvas.copyFrom = img => {
canvas.clear();
ctx.drawImage(img, 0, 0, w, h);
};
return canvas;
}