Limited-time offerLifetime $349 $199left
← Back to 3D designs
three.js

Rubik's Cube — Self-Solving Puzzle Cube

Self-solving puzzle cube, in one HTML file. Scramble, solve, keyboard.

Self-solving puzzle cube, built entirely in code: one self-contained HTML file with no images, no 3D models and no build step. Under the hood: Three.js, 27 cubie groups, pivot-based layer rotation engine, auto scramble/solve. What a visitor can do: auto mode scrambles then solves in a loop, SCRAMBLE / SOLVE / AUTO buttons, keyboard U D L R F B (Shift = inverse), drag to orbit, 4 presets. Best for: Puzzles, education, problem-solving and 'solutions' brands. Three.js loads from a CDN through an import map, so there is still nothing to install. Every colour, count and speed sits in one CONFIG block, presets switch live from a glass dock, and ?embed strips the interface for a clean iframe or hero background.

How to run this

Nothing to install and nothing to configure. Works in any modern browser on Windows, macOS and Linux.

Built with
Single HTML file
Requires
A modern browser
  1. 1. Unzip the download.
  2. 2. Double-click index.html. It opens in your browser and runs. To serve it instead (the microphone and some browsers want a server), run npx serve . in the folder and open http://localhost:3000.

Note — Three.js loads from the jsDelivr CDN through an import map, so the first load needs an internet connection. Add ?embed to hide the interface for an iframe or hero background, and ?preset=N to start on a colour preset.