I made something similar a while back: http://jathu.me/pixels/
Check the source: https://github.com/jathu/pixels. You can also undo/redo by pressing z and y on the keyboard.
Check the source: https://github.com/jathu/pixels. You can also undo/redo by pressing z and y on the keyboard.