BUILD REQUEST - PL-112 Ember Isle Rescue - please build this now I'm sending you this as my request: please build the one-file HTML app described below. Start now and do the whole build in your answer to this message. - This is a build job, not a document to summarize, review or discuss. Don't ask me anything first: if a detail is unclear, pick the most sensible option and keep going. - The spec is everything between the BEGIN SPEC and END SPEC lines. Follow all of it exactly. - If your tool can create files, also save the finished file as PL-112-ember-isle-rescue.html. ===== BEGIN SPEC ===== PL-112 — Ember Isle Rescue: 360° Floating Island Fire Brigade — Hard WHAT THIS TESTS: Road-following vehicle AI, fire spread and extinguish simulation, particle water and smoke, and a charming 360° orbit diorama in one file. Build a 3D Three.js diorama of a small FLOATING ISLAND hanging in the sky, where little fire trucks drive around real roads and put out fires that break out across the island. It should feel like a living toy town you want to keep watching: stylized low-poly with soft clay-like shading, warm sunlight, and lots of small moving details. THE ISLAND One floating island about 120 m across: grassy top, a rocky underside that tapers to a point, with hanging roots, small rocks drifting below it and a waterfall pouring off one edge into mist. On top: a fire station with an opening bay door, 10–14 small houses, a barn, a windmill, a pine forest patch (at least 40 trees, instanced), a pond with a dock, and 2–3 fire hydrants placed on the roads. A closed road network: one loop road plus at least 2 side branches reaching houses or the forest. Roads are a graph of nodes and edges, drawn as flat strips with dashed center lines that sit on the ground with no floating or z-fighting. Soft clouds drift past and below the island. Seed 112 makes the layout the same every time. 360° CAMERA Default view is a slow auto-orbit around the whole island (one full turn in about 60 s), slightly above it, so the top and the underside both read. Drag (mouse or one finger) orbits a full 360°, wheel or pinch zooms, with limits so the camera never goes inside the island. Dragging pauses the auto-orbit; it resumes after 5 s idle. Buttons: Orbit, Follow Truck (chase camera behind the selected truck, smooth, never clipping through houses), and Top-down. Tap a truck to select and follow it. FIRE TRUCKS (at least 3) Each truck is a detailed low-poly model: red cab and body, ladder on top, hose reel, 4 wheels that spin at a rate matching speed, flashing red and blue light bars, and headlights. Trucks drive ONLY on the road graph. They pick routes with A* or Dijkstra to the nearest active fire they are assigned, slow down for turns, keep their wheels on the road, and turn smoothly (no snapping or sliding sideways). Trucks never drive through each other: keep at least 4 m gap on the same edge, and wait at junctions if another truck is crossing. On arrival a truck parks beside the road at the nearest point to the fire, the ladder or hose turret swivels to aim at the fire, and it sprays a water arc made of particles that follows a real ballistic curve and lands on the fire. Each truck has a water tank shown as a small bar over it. Spraying drains it. When empty it drives to a hydrant or the pond to refill, then returns to the job or the station. With no fires, trucks return to the station and park inside the bay. FIRES Fires start at random times (seeded) on trees, the barn, houses or grass patches, at most 4 at once, and you can also tap any tree, house or grass tile to start one. A fire has an intensity from 0 to 100 that grows over time and can spread to neighbors within 8 m if it stays above 70 for 10 s. Show it with flame particles plus rising dark smoke that drifts with a light wind; flame size and light glow scale with intensity. A point light flickers at each fire. Water hitting the fire (particles landing inside its radius) lowers intensity. At 0 the fire is out, leaves steam for 2 s, and the object turns scorched dark but stays in place. A dispatch center assigns the nearest free truck to each new fire; two trucks may share a big fire. HUD AND CONTROLS Small clean HUD: active fires, fires put out, trucks busy/idle, and each truck's status (Idle, Driving, Spraying, Refilling). Counters must change only when the real event happens. Buttons: Start Fire (random), Pause, Speed x1/x2/x4, Day/Night toggle (at night, headlights, siren lights and fire glow light the scene and house windows glow), Mute, Reset. SOUND (Web Audio, generated — no outside audio files) Siren and engine sounds plus crackling fire and water hiss, made with Web Audio, starting on the first tap. No outside audio files. Touch targets at least 44 px, text at least 14 px, and on a 390x844 phone the HUD must not cover the island. BUILD CONTRACT Deliver ONE self-contained index.html with inline CSS and JS. Load Three.js and addons from a public CDN with a pinned version through an import map. No other outside files: no models, textures, fonts or audio. Must work in desktop Chrome and iPhone Safari. Target 60 fps on desktop and stay smooth on a phone (clamp pixel ratio to 2, use instancing for trees and particles, pause when the tab is hidden). HONEST TESTING Expose read-only window.__sim with trucks (position, road edge, state, tank, target fire), fires (position, intensity, state), counters and the fps. Add ?test=1 to run an accelerated test that measures real world positions, not self-set flags, and logs PASS/FAIL to console and window.__testResults: Every truck stays within 1.5 m of a road centerline every frame it is driving. No two trucks ever get closer than 3 m. Each fire that starts gets a truck assigned within 2 s and is put out within 90 s of game time when trucks are free. Water particles land within the fire radius while spraying (at least 70% of them). "Fires put out" equals the number of fires whose intensity really reached 0. Trucks refill when the tank hits 0 and never spray while empty. Zero console errors. WORK LOOP AND OUTPUT Build, run, test, fix, and retest yourself. Take screenshots at 1280x720 and 390x844 in Orbit, Follow Truck and Night views, look at them, and fix what looks wrong. Mark anything you could not run as UNMEASURED and never invent results. If you are chat-only: first list the checklist with how your code meets each item, then give one corrected complete file. Output ONE complete HTML code block, then the PASS/FAIL/UNMEASURED checklist. No snippets. ===== END SPEC ===== Now build it. Reply with ONE complete HTML file in ONE code block.