oneshotlm
Compare all models on this prompt →

Rubik's Cube · minimax-m2.7

Using the pre-provided three.min.js (global THREE), render an interactive 3D Rubik's Cube with clickable face rotations, orbit-drag camera, and a scramble button.

⛨ sandboxed Open in new tab ↗
transcript · 8 messages
user

Using the pre-provided three.min.js (global THREE), render an interactive 3D Rubik's Cube with clickable face rotations, orbit-drag camera, and a scramble button.

assistant
thinking
The user wants me to build an interactive 3D Rubik's Cube using Three.js. Let me first check what's in the current directory to understand the setup.
bash {"command":"ls -la"}
toolResult

total 644 drwxrwxrwx 3 node node 96 Jul 10 00:31 . drwxr-xr-x 1 root root 4096 Jul 10 00:31 .. -rw-r--r-- 1 node node 603445 Jul 10 00:31 three.min.js

assistant
thinking
Good, three.min.js is present. Now let me create the index.html file with a complete interactive 3D Rubik's Cube implementation. This will include:

1. Three.js scene setup with orbit controls for camera
2. A 3x3 Rubik's Cube with colored faces
3. Click detection on cube faces for rotation
4. Animation for face rotations
5. A scramble button

Let me write this comprehensive implementation.
write /workspace/index.html (17653 bytes)
toolResult

Successfully wrote 17653 bytes to /workspace/index.html

assistant
thinking
I've created the index.html file with the Rubik's Cube implementation. Let me verify it was created correctly by checking if it exists.
bash {"command":"ls -la && head -50 index.html"}
toolResult

total 664 drwxrwxrwx 4 node node 128 Jul 10 00:32 . drwxr-xr-x 1 root root 4096 Jul 10 00:31 .. -rw-r--r-- 1 node node 17658 Jul 10 00:32 index.html -rw-r--r-- 1 node node 603445 Jul 10 00:31 three.min.js <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interactive Rubik's Cube</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', system-ui, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); min-height: 100vh; overflow: hidden; color: #fff; } #canvas-container { width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; } .ui-overlay { position: fixed; z-index: 100; pointer-events: none; } .ui-overlay > * { pointer-events: auto; } .top-bar { top: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px; align-items: center; } .title { font-size: 1.5rem;

assistant
thinking
The file was created successfully. Let me verify it compiles by checking for any syntax errors in the JavaScript. I'll also do a quick check that the script section looks correct.

Done! I've created a fully self-contained interactive 3D Rubik's Cube with: **Features:** - **27 cubies** with proper 6-color face mapping (red, orange, white, yellow, green, blue) - **Clickable face rotations** — click any visible face to rotate that layer 90° clockwise (Shift+click for counter-clockwise) - **Orbit camera controls** — drag to rotate view around the cube, scroll to zoom - **Scramble button** — performs 20 random moves with smooth animation - **Reset button** — restores the cube to solved state - **Move counter** — tracks total moves made **Technical highlights:** - Custom orbit controls (no external library needed) - Raycasting for accurate face detection - Smooth eased animations (400ms per 90° rotation) - Proper pivot-group technique for rotating cube layers - Grid position tracking for accurate face identification - Responsive design with touch support - Dark gradient background with glassmorphism UI Open `index.html` in any modern browser to interact with the cube.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelminimax-m2.7
vendorMiniMax
harnesspi-agent
generated2026-07-10

EVALUATION

3/5 partial

Rubik's cube renders and click rotates a face; drag rotates camera but keyboard inputs produce no additional change.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.0%
on click2.8%
on drag12.7%
on wheel2.5%
on enter + space3.3%
on arrow keys2.5%
on w/a/s/d3.5%
frame spread42.1 / 255
console errors0
js errors none

METRICS

runtime73.6s
tokens in2.6k
tokens out5.3k
cached14k
cost / run$0.0058