This code demonstrates how to use the HTML5 canvas in a couple simple ways
README.md
- the source of this help text, in markdown formatcanvas-form.html
- an HTML5 canvas connected to an HTML so you can draw circles by typing in the parameterscanvas-mouse.html
- an HTML5 canvas that tracks your mouse position within itself and logs the (X,Y) to the debug console
Create a new file called canvas-painter.html
and combine the concepts demonstrated in
canvas-form.html
and canvas-mouse.html
so that the user can "paint" on the canvas by moving their mouse.
This assignment starts at 10 points when you achieve painting under the mouse cursor. Each extra feature you invent and implement is worth an extra point, up to a maximum of 20 points total for the assignment.
Some ideas for extra features:
- read keyboard presses or use form buttons to enable changing colors, shapes, and/or sizes (worth 1 point for each parameter you enable changing)
- restyle the page around the canvas with CSS
- markup and style an introduction and/or instructions for your app
- make it so that it only paints while you're holding a mouse button down