For a demonstration, I want to draw a cube with canvas in HTML5. This cube will be rotatable like this example. But further, the cube will contain some cubes inside. While the container cube rotates, the the internal cubes will hold their respective position and rotate accordingly.
Is there any open source example available already?
If not, can anybody suggest a way (with a nearest open source example if possible)?
The demo you linked to contains code. It seem to use the Pre3D library.