This is a toy project form From Odin Project -> Foundations Path-> PROJECT: ETCH-A-SKETCH.
Here is Live Demo hosted on Github Pages.
- Practice more html, CSS and JavaScript.
- DOM manipulation using JavaScript:
document.querySelector
element.setAttribute
element.classList.add
element.addEventListener
- button click event handle
- ......
- Open the Live Demo
- Move mouse cursor on the canvas, the pixels your mouse have encountered will filled with black
- To clear your work, click the "Clear" button, there will be a prompt ask you to set the canvas pixel density yourself
- Add more options for pixels' fill-in color. Maybe even allow pop-up color picker.
About color picker, I found this tutorial from Educative.io may be useful. - Instead of prompt, use input box or drag bar to set the pixel density(pixel per row and column).
- Able to export the pixel art(.svg, .png or whatever, not familiar with these things yet).
- Some interesting features like symmetrical drawing.