oneshotlm
Compare all models on this prompt →

Rubik's Cube · qwen3-coder

Output generated Cost / run $0.0059 Runtime 165.6s

Prompt for this run

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 ↗

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

modelqwen3-coder
vendorQwen
harnesspi-agent
generated2026-08-01

METRICS

runtime165.6s
tokens in8.0k
tokens out4.9k
cached6.8k
cost / run$0.0059
Transcript · 4 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

I'll create a 3D Rubik's Cube with interactive face rotations, camera controls, and a scramble feature. Let me build this self-contained in an index.html file.

→ write index.html (19931 bytes)
toolResult

Successfully wrote 19931 bytes to index.html

assistant

I've created a fully interactive 3D Rubik's Cube web application with the following features: 1. **Interactive 3D Cube** - Built with Three.js showing all 6 faces with proper colors 2. **Face Rotations** - Click on any face to rotate it, or use keyboard shortcuts (R, L, U, D, F, B) 3. **Camera Controls** - Drag to orbit the camera around the cube, scroll to zoom 4. **Scramble Button** - Randomly scrambles the cube with 20 random moves 5. **Reset Button** - Returns the cube to its solved state 6. **Visual Feedback** - Red highlight shows which face will be rotated on click 7. **Responsive Design** - Adapts to different screen sizes 8. **Keyboard Shortcuts** - Instructions for rotating faces using keys The application is completely self-contained in a single HTML file with no external dependencies except the provided three.min.js. All CSS and JavaScript are inline. To use the application: - Click and drag to rotate the view - Scroll to zoom in/out - Click on a face to rotate it - Use the scramble button to randomize the cube - Use the reset button to solve it - Use keyboard keys R, L, U, D, F, B for face rotations The cube is built with proper Rubik's Cube coloring: - Right face: Red - Left face: Orange - Up face: White - Down face: Yellow - Front face: Green - Back face: Blue All the code is in index.html which is now ready to run in any modern browser.