Afterburner
A military turbofan run on an outdoor test stand at dusk: rotor lag, five afterburner stages with a pop each, the nozzle petals opening and shock diamonds spaced by nozzle pressure ratio. Drive the throttle, open a cutaway, strobe the blades.
Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.
Starting prompt
Build "Afterburner": a real-time 3D film of a military turbofan run on an outdoor engine test stand at dusk, from a quiet idle to full afterburner and back. It must look like a photograph of real hardware and behave like a real engine, and it is also a test-cell console you can drive yourself. Single self-contained HTML file; Three.js and its addons from a CDN via an import map and Google Fonts are fine; build everything procedurally, no external textures, models or images. No people, no markings, logos or brand names. The engine (generic low-bypass afterburning turbofan, no real type; metres, axis along x, about 5 m long plus the bellmouth, a fan about 1 m across): - A polished inlet bellmouth, then a three-stage fan (the first stage about 24 twisted blades on a disk with a spinner), a bypass duct and a core inside it. - A titanium fan case with flanges, bolt rows, pipes, harnesses, an accessory gearbox with pumps underneath, and a long afterburner duct in heat-tinted steel that turns straw, bronze and blue towards the hot end. - A variable convergent-divergent nozzle made of overlapping petals with actuators, which opens in afterburner and closes at idle and military power. - Inside (seen in the cutaway): fan, compressor stages, an annular combustor with flame, turbine stages, flameholder rings and spray bars. - The stand: a cantilevered steel thrust frame that carries the engine on a live frame with flexures and a thrust load cell, on a concrete pad with slab joints, wet patches and a scorched blast lane; an inclined, water-cooled blast deflector behind the nozzle; cable trays, an instrument cabinet, floodlight masts, a dark horizon and a dusk sky with the last orange glow. The physics (simulated, not keyframed): - The throttle sets fuel flow. N1 and N2 follow it through rotor inertia, a few seconds of lag up and down. EGT, fuel flow (kg/s) and thrust (kN) come from the model; about 75 kN dry and 125 kN in full afterburner. - Idle and military power: the exhaust is nearly clear, with strong heat shimmer done as screen-space refraction behind the nozzle. - Afterburner: five stages light one after another, each with a visible pop and thrust step. The nozzle petals open, and the plume becomes an orange-violet flame with a blue core and shock diamonds (Mach disks). Their spacing grows with nozzle pressure ratio by the Prandtl–Pack approximation s ≈ 1.22 · D · √(Mj² − 1), with the fully expanded Mach number Mj² = 2/(γ − 1) · (NPR^((γ − 1)/γ) − 1), γ ≈ 1.3 and D the nozzle exit diameter; quote it in a caption. - The blast lifts dust and grit off the pad, the deflector glows and steams, floodlit haze swirls, the engine rocks slightly on its mounts, and the flame lights the whole scene. The look: real metal (titanium, heat-tinted steel, inconel turning straw and blue near the hot end) with reflections from a procedural environment, crisp machining, no interpenetrating parts and nothing toy-like. ACES filmic tone mapping, sRGB output, bloom on the flame and lights only. Dramatic but readable, never muddy or washed out. The demo, a seamless 60-second loop that runs from the first frame without any input: it opens at military power, lights the afterburner stage by stage (full afterburner with shock diamonds by second 8), holds, cuts back to idle, opens the cutaway with a stroboscope pass, spools up and lights the afterburner inside the cut, closes the cut, cools down at idle and spools back to MIL to close the loop. The camera moves between a side view, a rear three-quarter view into the nozzle, the cutaway and the inlet, and the throttle handle visibly moves. Interface (a compact test-cell console, readable on a phone): - A big throttle lever with detents IDLE, MIL and AB 1 to 5: drag it, or use W/S or the arrow keys. - Gauges for N1 and N2 (%), EGT (°C), fuel flow, thrust (kN), nozzle area and the afterburner stage, all with units. - A cutaway toggle that slices the casing to show the fan, compressor, combustor flame and turbine turning, and a slow-motion stroboscope button so the blades become readable. - Drag to orbit, wheel or pinch to zoom. Any input takes over; after about 20 s with no input the demo resumes smoothly. - A tiny hint listing the keys. Everything eases smoothly, never jumps. The layout works on a phone. Engineering rules (the page must work on the first load, with no fixes): - Use Three.js r170 and only methods that exist on each of its classes. Give every custom ShaderMaterial `fog: false`, and declare every uniform, constant and varying its shaders use. - Declare each identifier once. Inside one calculation, never reuse a shared scratch vector for two values that are both still needed; use local vectors. - Guard every animated value against NaN. Drive time from performance.now, without allocations in the frame loop. - Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes. Keep planning brief and write the code. Aim for roughly 900 to 1,300 lines, compact and well structured. No black, untextured or placeholder objects anywhere.