Canvas JavaScript Example
A canvas drawing tool, with a basic GUI interface.
The 'commands history' is shown on the right.
Instructions:
- command: draw(shape, x, y, size, colour)
- command: clear()
Note:
- shape is 1 for circle, 0 for square
- colour is an rgb string e.g. "#FF1C0A"
- size is in pixels
- canvas is 300 x 300