WebGL Rubik's Cube


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.


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.


rubikscube.zip (80 KB)

Creative Commons Attribution Non-Commercial 3.0

External Links

WebGL documentation at Khronos.org

WebGL demo repository.

Copyright © Werner Randelshofer. All Rights Reserved.