• Jim MacArthur
Robots, automata and electronics


HTML5/Javascript demos

Spinning cube demo (mouseover)

This is my first attempt at programming javascript. It's a lot easier than I thought. This is a simple rotating cube with backface culling. It glitches in some spots, for example if you put the cursor at the very top left corner of the canvas. View the source of this page to see the code. It isn't very well written, but you should be able to see how to create a canvas and draw lines on it.

This is a modified copy of the interactive canvas gradient by Remy Sharp, from It is provided under Creative Commons Share Alike 2.0.