oneshotlm
Compare all models on this prompt →

Rotating icosahedron · gpt-4o-mini

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 · 4 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

Here's a complete HTML structure for a single-page web app that achieves the desired 3D scene using Three.js. The web page will render a full-screen rotating icosahedron lit by two colored point lights with a subtle starfield background. I'll write everything into an `index.html` file. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>3D Icosahedron Scene</title> <style> body { margin: 0; overflow: hidden; } canvas { display: block; } .starfield { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 1%, transparent 40%); z-index: -1; } </style> </head> <body> <div class="starfield"></div> <script src="three.min.js"></script> <script> const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // Create an icosahedron geometry const geometry = new THREE.IcosahedronGeometry(1, 0); const material = new THREE.MeshStandardMaterial({ color: 0x0077ff }); const icosahedron = new THREE.Mesh(geometry, material); scene.add(icosahedron); // Add point lights const light1 = new THREE.PointLight(0xff0000, 1, 100); light1.position.set(5, 5, 5); scene.add(light1); const light2 = new THREE.PointLight(0x0000ff, 1, 100); light2.position.set(-5, -5, -5); scene.add(light2); camera.position.z = 5; // Create the starfield const starFieldGeo = new THREE.BufferGeometry(); const starFieldCount = 10000; const positions = new Float32Array(starFieldCount * 3); for (let i = 0; i < starFieldCount; i++) { positions[i * 3] = (Math.random() - 0.5) * 1000; positions[i * 3 + 1] = (Math.random() - 0.5) * 1000; positions[i * 3 + 2] = (Math.random() - 0.5) * 1000; } starFieldGeo.setAttribute('position', new THREE.BufferAttribute(positions, 3)); const starFieldMaterial = new THREE.PointsMaterial({ color: 0xffffff, size: 0.5 }); const stars = new THREE.Points(starFieldGeo, starFieldMaterial); scene.add(stars); // Animate function animate() { requestAnimationFrame(animate); icosahedron.rotation.y += 0.01; icosahedron.rotation.x += 0.01; renderer.render(scene, camera); } animate(); // Handle window resize window.addEventListener('resize', () => { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); }); </script> </body> </html> ``` I will create this `index.html` file in the current directory.

write index.html (2900 bytes)
toolResult

Successfully wrote 2900 bytes to index.html

assistant

The `index.html` file has been successfully created with the full-screen rotating icosahedron scene, including the colored point lights and a subtle starfield background. You can open this file in a web browser to see the rendering in action.

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

modelgpt-4o-mini
vendorOpenAI
harnesspi-agent
generated2026-07-22

EVALUATION

2/5 working

Dark scene with small rotating icosahedron and starfield, but no visible colored point lights or camera response to input.

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 click0.0%
on drag0.0%
on wheel0.0%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread1.4 / 255
console errors0
js errors none

METRICS

runtime22.1s
tokens in1.3k
tokens out1.7k
cached2.8k
cost / run$0.0014