Four-stroke engine cutaway: crank, piston and cam-driven valves (Three.js)
Build a Three.js scene: A single-cylinder engine is shown in a half-transparent steel block, with crankshaft, connecting rod, piston and two cam-driven poppe…
More
1 test · 8 finished runs (0 agent, 8 raw one-shot) · 8 live demos
The prompt
Build a Three.js scene: A single-cylinder engine is shown in a half-transparent steel block, with crankshaft, connecting rod, piston and two cam-driven poppet valves animating in sync through intake, compression, power and exhaust. Fuel-air mix is shown as blue particles, the spark as a white flash, and exhaust as grey smoke particles. The up and down arrow keys change RPM, and a floating label names the current stroke. The camera orbits on drag with a workshop-grey backdrop and warm key light. Everything is built in code from Three.js geometry, materials and shaders; no external models, textures or fonts. The scene must visibly animate from the moment it loads and run in a browser with software WebGL (no GPU). Deliver ONE self-contained HTML file; load Three.js only through an import map from https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js (addons from https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/), with no other external requests. Output ONLY the complete HTML file, starting with <!DOCTYPE html> and ending with </html>, with no explanation or markdown fences.
Same prompt, all models: step through 8 runsIn the gallery: one player, arrow keys or swipe.