oneshotlm
Compare all models on this prompt →

3D solar system · gpt-oss-120b

Using the pre-provided three.min.js (global THREE), build a 3D solar system with the sun and orbiting planets at varied speeds and sizes, orbit-drag camera controls, and a starfield.

⚠ no runnable output

This one-shot run produced no runnable artifact.

agent produced no index.html

The transcript below shows what the model did — read it to see why the one shot fell short.

transcript · 2 messages
user

Using the pre-provided three.min.js (global THREE), build a 3D solar system with the sun and orbiting planets at varied speeds and sizes, orbit-drag camera controls, and a starfield.

assistant
thinking
We need to create index.html containing everything: load three.min.js via <script src="three.min.js"></script>. Build a 3D solar system with sun and planets, orbital motion, camera controls (orbit drag). Since THREE is available, we can use OrbitControls which is part of examples, but not sure if included. The only library present is three.min.js; OrbitControls may not be present. But we can implement simple controls by listening to mouse drag to rotate camera around target.

Simplify: implement basic orbit controls manually: track mouse move, change spherical coordinates theta, phi, radius.

Create scene, camera (PerspectiveCamera), renderer, add starfield: many points in sphere.

Add Sun: sphere mesh with emissive material.

Add planets: array with parameters: distance from sun, size, orbital speed, color.

In animation loop update each planet's position based on time.

Add simple ambient light and point light at sun.

Add resize handling.

Write to index.html.

We need to ensure script runs without external dependencies.

Let's write index.html accordingly.

**File created:** `index.html` ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>3D Solar System (Three.js)</title> <style> body { margin:0; overflow:hidden; background:#000; } canvas { display:block; } </style> </head> <body> <!-- Load the pre‑provided Three.js library --> <script src="three.min.js"></script> <script> /* -------------------------------------------------------------- Simple orbit‑drag controls (mouse‑drag rotates around the Sun) -------------------------------------------------------------- */ class SimpleOrbitControls { constructor(camera, domElement) { this.camera = camera; this.dom = domElement; this.target = new THREE.Vector3(0, 0, 0); this.enabled = true; // Spherical coordinates const offset = new THREE.Vector3().copy(camera.position).sub(this.target); this.spherical = new THREE.Spherical().setFromVector3(offset); this.spherical.makeSafe(); this._onMouseDown = this._onMouseDown.bind(this); this._onMouseMove = this._onMouseMove.bind(this); this._onMouseUp = this._onMouseUp.bind(this); this._onWheel = this._onWheel.bind(this); this.dom.addEventListener('mousedown', this._onMouseDown); this.dom.addEventListener('wheel', this._onWheel, { passive: false }); } dispose() { this.dom.removeEventListener('mousedown', this._onMouseDown); this.dom.removeEventListener('wheel', this._onWheel); } _onMouseDown(event) { if (!this.enabled) return; this.isDragging = true; this.startX = event.clientX; this.startY = event.clientY; this.startTheta = this.spherical.theta; this.startPhi = this.spherical.phi; document.addEventListener('mousemove', this._onMouseMove); document.addEventListener('mouseup', this._onMouseUp); } _onMouseMove(event) { if (!this.isDragging) return; const dx = event.clientX - this.startX; const dy = event.clientY - this.startY; const rotSpeed = 0.005; this.spherical.theta = this.startTheta - dx * rotSpeed; this.spherical.phi = this.startPhi + dy * rotSpeed; // clamp phi to avoid pole flips const EPS = 0.0001; this.spherical.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.spherical.phi)); this.updateCamera(); } _onMouseUp() { this.isDragging = false; document.removeEventListener('mousemove', this._onMouseMove); document.removeEventListener('mouseup', this._onMouseUp); } _onWheel(event) { if (!this.enabled) return; event.preventDefault(); const delta = event.deltaY * 0.001; this.spherical.radius = Math.max(5, this.spherical.radius + delta); this.updateCamera(); } updateCamera() { const pos = new THREE.Vector3().setFromSpherical(this.spherical).add(this.target); this.camera.position.copy(pos); this.camera.lookAt(this.target); } } /* -------------------------------------------------------------- Scene setup -------------------------------------------------------------- */ const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 2000); camera.position.set(0, 30, 100); const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // Controls const controls = new SimpleOrbitControls(camera, renderer.domElement); /* -------------------------------------------------------------- Light – Sun as an emissive object + PointLight -------------------------------------------------------------- */ const sunGeometry = new THREE.SphereGeometry(5, 32, 32); const sunMaterial = new THREE.MeshBasicMaterial({ color: 0xffff00 }); const sun = new THREE.Mesh(sunGeometry, sunMaterial); scene.add(sun); const sunLight = new THREE.PointLight(0xffffff, 2, 0, 2); sunLight.position.set(0, 0, 0); scene.add(sunLight); scene.add(new THREE.AmbientLight(0x222222)); /* -------------------------------------------------------------- Starfield (simple Points) -------------------------------------------------------------- */ function createStarfield(count = 2000, radius = 500) { const geometry = new THREE.BufferGeometry(); const positions = new Float32Array(count * 3); for (let i = 0; i < count; i++) { const phi = Math.acos(2 * Math.random() - 1); const theta = 2 * Math.PI * Math.random(); const r = radius * Math.cbrt(Math.random()); positions[i * 3] = r * Math.sin(phi) * Math.cos(theta); positions[i * 3 + 1] = r * Math.sin(phi) * Math.sin(theta); positions[i * 3 + 2] = r * Math.cos(phi); } geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3)); const material = new THREE.PointsMaterial({ color: 0xffffff, size: 0.7 }); const stars = new THREE.Points(geometry, material); scene.add(stars); } createStarfield(); /* -------------------------------------------------------------- Planets definition -------------------------------------------------------------- */ const planetsData = [ { name: 'Mercury', distance: 12, size: 0.5, speed: 0.04, color: 0xaaaaaa }, { name: 'Venus', distance: 16, size: 0.9, speed: 0.015, color: 0xffa500 }, { name: 'Earth', distance: 20, size: 1, speed: 0.01, color: 0x2233ff }, { name: 'Mars', distance: 24, size: 0.7, speed: 0.008, color: 0xff5533 }, { name: 'Jupiter', distance: 35, size: 3, speed: 0.004, color: 0xd2b48c }, { name: 'Saturn', distance: 45, size: 2.5, speed: 0.003, color: 0xf5deb3 }, { name: 'Uranus', distance: 55, size: 2, speed: 0.002, color: 0x7fffd4 }, { name: 'Neptune', distance: 65, size: 2, speed: 0.0015,color: 0x4169e1 }, ]; const planetMeshes = []; planetsData.forEach(p => { const geom = new THREE.SphereGeometry(p.size, 32, 32); const mat = new THREE.MeshStandardMaterial({ color: p.color }); const mesh = new THREE.Mesh(geom, mat); scene.add(mesh); planetMeshes.push({ mesh, data: p, angle: Math.random() * Math.PI * 2 }); }); /* -------------------------------------------------------------- Animation loop -------------------------------------------------------------- */ let clock = new THREE.Clock(); function animate() { requestAnimationFrame(animate); const delta = clock.getDelta(); planetMeshes.forEach(pObj => { const p = pObj.data; pObj.angle += p.speed * delta * 60; // speed normalized to ~60fps const x = Math.cos(pObj.angle) * p.distance; const z = Math.sin(pObj.angle) * p.distance; pObj.mesh.position.set(x, 0, z); }); renderer.render(scene, camera); } animate(); /* -------------------------------------------------------------- Responsive resize -------------------------------------------------------------- */ window.addEventListener('resize', () => { const w = window.innerWidth, h = window.innerHeight; camera.aspect = w / h; camera.updateProjectionMatrix(); renderer.setSize(w, h); }); </script> </body> </html> ```

TAKE IT TO CODE

This run produced no artifact — reuse the prompt with a different model or your own pi-agent run.

RUN

modelgpt-oss-120b
vendorOpenAI
harnesspi-agent
generated2026-07-22

METRICS

runtime
tokens in1.3k
tokens out2.0k
cached0
cost / run$0.0004