3D Rubik's Cube Visualizer

Category: 3dPublished: Updated:

3D Rubik's Cube Visualizer – photo prompt for Gemini and AI image models

3D Rubik's Cube Visualizer Prompt

I asked Grok 4.20 to make me a Rubik's cube solver. One shot. No errors, no black squares. Pretty fast too. So far I am impressed but there are harder tests to come :)
---
Prompt:
---
Create a **single `index.html`** file that uses Three.js to visualize a standard Rubik’s Cube with interactive controls. Your generated code must include built-in checks for library availability and correct versions, so it fails gracefully if dependencies are missing or outdated. Otherwise, keep all requirements the same:
---
---
---
### 1. Dependency Validation
- At runtime, verify that Three.js and any addons (e.g. OrbitControls) have loaded and match the expected version (e.g. `0.152.2`).
- If a library is missing or the version doesn’t match, display a clear on-screen error and halt initialization.
---
### 2. HTML & Module Setup
- Single HTML file with full-window WebGL canvas.
- Use an **import map** to resolve bare specifiers, pointing `"three"` to `https ://unpkg.com/[email protected]/build/three.module.js`.
- `