WebGL Rubik's Cube

Rotate

To twist the cube:
Drag a part into the desired direction or click on a part.

  • Click twists into clockwise direction.
  • Alt+Click or Ctrl+Click twists into the opposite direction.
  • Shift+Click twists by 180°.

To rotate the cube:
Drag the area behind the cube into the desired direction.

Scramble, Wobble, Explode
Press Alt+Click or Ctrl+Click for modified effect.

 

This applet has been programmed in JavaScript and WebGL.

WebGL Rubik's Cube is © Werner Randelshofer. Parts of the code (as marked) are from the WebGL demo repository. This code is copyright by Apple Inc. and by Google Inc. and is used under permission.

If the applet does not display, you may need to use a different browser.
At the time of writing (August 2011) WebGL is supported in Chrome 12, Firefox 5 and in Safari 5.1*.

*You may have to enable WebGL in Safari. See this blog article.

Download

WebGL applet:

rubikscube-1.0.4.zip (84 KB)

Cinema 4D Model of the cube used by the applet:

Rubik's Cube.c4d (66 KB)

All files are for use under Creative Commons Attribution Non-Commercial 3.0 only. Contact me if you want to use this for commercial use.

External Links

WebGL documentation at Khronos.org

WebGL demo repository.

Copyright © Werner Randelshofer. All Rights Reserved.