Rubik's Cube · ministral-3b-2512
Output generated Cost / run $0.0007 Runtime 13.3s
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.
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
METRICS
Transcript · 8 messages
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.
{"path":"three.min.js"}/** * @license * Copyright 2010-2021 Three.js Authors * SPDX-License-Identifier: MIT */ [Showing lines 1-5 of 7 (50.0KB limit). Use offset=6 to continue.]
{"command":"ls -la"}total 592 drwxr-sr-x. 2 node node 26 Aug 1 20:42 . drwxrwsrwx. 3 root node 16 Aug 1 20:42 .. -rw-r--r--. 1 node node 603445 Aug 1 20:42 three.min.js
index.html (9733 bytes)Successfully wrote 9733 bytes to index.html
The `index.html` file has been created with an interactive 3D Rubik's Cube using Three.js. Here's a summary of the features implemented: ### Features: 1. **Interactive 3D Cube**: - Six faces (Red, Green, Blue, Yellow, White, Orange). - Click on any face to rotate it 90 degrees. 2. **Orbit-Drag Camera**: - Left-click and drag to orbit around the cube. - Right-click and drag to pan the view. 3. **Scramble Button**: - Randomly scrambles the cube by performing multiple face rotations. - Disabled during scrambling to prevent accidental clicks. 4. **Responsive Design**: - Adapts to window resizing. --- ### How to Use: - **Rotate Faces**: Click on any face to rotate it. - **Orbit Camera**: Left-click and drag to rotate the view. - **Pan Camera**: Right-click and drag to move the camera. - **Scramble**: Click the "Scramble Cube" button to randomize the cube's state. The cube is fully self-contained and runs without external dependencies. The artifact is ready in `/tmp/ws/index.html`.