oneshotlm
Compare all models on this prompt →

Rotating icosahedron · gemini-3-flash-preview

Using the pre-provided three.min.js (global THREE), render a full-screen scene with a rotating icosahedron lit by two colored point lights, orbit-style auto-rotation, and a subtle starfield background.

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

Using the pre-provided three.min.js (global THREE), render a full-screen scene with a rotating icosahedron lit by two colored point lights, orbit-style auto-rotation, and a subtle starfield background.

assistant
thinking
**Developing Single-Page App**

I'm focusing on building the `index.html` as a self-contained unit, ensuring it incorporates `three.min.js` locally. The core structure and initial feature integration are my current priorities.

bash {"command":"ls -F"}
toolResult

three.min.js

assistant
thinking
**Creating the Icosahedron**

I'm focusing on setting up the core scene. My next step is to create the `index.html` file and implement an icosahedron using `IcosahedronGeometry` with a `MeshStandardMaterial`. I'll also introduce two point lights, one red and one blue, to illuminate the geometry.

write index.html (3739 bytes)
toolResult

Successfully wrote 3739 bytes to index.html

assistant
thinking
**Building Initial Scene**

I've successfully assembled the foundational `index.html`, integrating HTML, CSS, and JavaScript into a single file. This setup now renders a full-screen view featuring a rotating icosahedron, illuminated by two distinct point lights.

The `index.html` file has been created with a self-contained Three.js scene featuring a rotating icosahedron, dual-colored point lights, an orbiting camera, and a starfield background. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Three.js Icosahedron Scene</title> <style> body { margin: 0; overflow: hidden; background-color: #000; } canvas { display: block; } </style> </head> <body> <!-- Using the local three.min.js as requested --> <script src="three.min.js"></script> <script> let scene, camera, renderer, icosahedron, stars; let light1, light2; function init() { // Scene & Camera setup scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); // Renderer setup renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); renderer.setPixelRatio(window.devicePixelRatio); document.body.appendChild(renderer.domElement); // 1. Rotating Icosahedron const geometry = new THREE.IcosahedronGeometry(10, 0); const material = new THREE.MeshStandardMaterial({ color: 0xffffff, flatShading: true, metalness: 0.4, roughness: 0.1 }); icosahedron = new THREE.Mesh(geometry, material); scene.add(icosahedron); // 2. Two Colored Point Lights const ambient = new THREE.AmbientLight(0x111111); // Subtle fill scene.add(ambient); light1 = new THREE.PointLight(0xff3300, 2, 100); // Warm light light1.position.set(20, 20, 20); scene.add(light1); light2 = new THREE.PointLight(0x0066ff, 2, 100); // Cool light light2.position.set(-20, -20, 20); scene.add(light2); // 3. Subtle Starfield const starGeometry = new THREE.BufferGeometry(); const starMaterial = new THREE.PointsMaterial({ color: 0xffffff, size: 0.15 }); const starVertices = []; for (let i = 0; i < 3000; i++) { const x = (Math.random() - 0.5) * 1000; const y = (Math.random() - 0.5) * 1000; const z = (Math.random() - 0.5) * 1000; starVertices.push(x, y, z); } starGeometry.setAttribute('position', new THREE.Float32BufferAttribute(starVertices, 3)); stars = new THREE.Points(starGeometry, starMaterial); scene.add(stars); // Resize Event window.addEventListener('resize', onWindowResize, false); animate(); } function onWindowResize() { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); } function animate() { requestAnimationFrame(animate); const time = Date.now() * 0.0005; // Rotate the icosahedron itself icosahedron.rotation.x += 0.005; icosahedron.rotation.y += 0.01; // "Orbit-style" auto-rotation: moving camera in a circle const radius = 40; camera.position.x = radius * Math.sin(time * 0.4); camera.position.z = radius * Math.cos(time * 0.4); camera.position.y = 10 * Math.sin(time * 0.2); camera.lookAt(0, 0, 0); // Animate light positions for dynamic reflections light1.position.x = 30 * Math.cos(time * 0.8); light2.position.y = 30 * Math.sin(time * 0.6); renderer.render(scene, camera); } init(); </script> </body> </html> ```

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

modelgemini-3-flash-preview
vendorGoogle
harnesspi-agent
generated2026-07-22

EVALUATION

3/5 working

Rotating icosahedron with orange and blue point lights over a starfield, but icosahedron is small and off-center.

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 motion4.0%
on click4.0%
on drag3.7%
on wheel4.4%
on enter + space4.0%
on arrow keys4.7%
on w/a/s/d3.5%
frame spread19.7 / 255
console errors0
js errors none

METRICS

runtime22.3s
tokens in6.0k
tokens out3.2k
cached0
cost / run$0.0125