Build a single self-contained HTML file (inline CSS and JS; the only external script is Three.js r128 from https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js) called "Reef Lagoon": an interactive top-down view of a sunlit Maldives-style lagoon where the user throws sea creatures into the water and watches them swim. Output the complete file, no placeholders, no omitted sections.
CAMERA AND LAYOUT
- Perspective camera straight overhead (height ~26 world units, up vector (0,0,-1)). Fit the vertical FOV so the visible water is about ±8.4 units in the short screen direction; the long direction scales with the aspect ratio. Recompute on resize.
- The whole screen is water. One world unit is roughly 1 m at toy scale: dolphin ~2.4, white shark ~3.3, hammerhead ~3.1, orca ~4.5, humpback ~6, turtle ~1.35 shell length, manta ~1.6 length / 3.2 wingspan.
WATER SIMULATION
- GPU ripple height field (ping-pong float/half-float render targets, about 440 texels on the long side, stepped at 90 Hz). Update: average of 4 neighbours, velocity += (avg − h)*1.8, velocity *= 0.9935, h += velocity, h *= 0.9993. Absorbing "sponge" edges, so waves leaving the screen don't reflect.
- Drops are queued (x, z, radius, amplitude, foam) and applied with a smooth cosine bump; a second channel stores foam that diffuses and fades.
RENDERING (draw order per frame)
1. A tileable animated caustics texture (512², mipmapped).
2. A shadow pass: creature geometry projected along the sun onto the floor, rendered from the main camera into a half-res target with MAX blending.
3. The underwater scene into an off-screen target. Its alpha stores depth*0.22, which later scales refraction and blur.
- Floor: a large heightfield mesh. Depth goes from ~1.35 near the bottom of the screen to ~4.3 at the top, with gentle undulation.
- Coral heads come from noise masks: raised 1–1.4 units, warm ochre/purple/yellow colours with knobbly and brain-coral detail, plus a rubble ring around them.
- Pale sand with soft irregular ripple shading.
- Lighting: ambient + sun × (base + caustics focused by the Laplacian of the ripple field) × shadow × drifting cloud shadows (large slow noise).
- Water absorption along the light path plus the view path, e.g. T = exp(−(0.30, 0.058, 0.04)·path), plus depth-based turquoise→blue scatter.
4. A full-screen water-surface pass. Each pixel is ray-cast through the inverse view-projection to the plane y=0.
- Surface normal from the ripple field + scrolling wind-ripple gradient noise + a gentle swell.
- Refraction: offset sampling of the underwater target, with chromatic split and depth blur.
- Fresnel sky reflection with clouds, sun glints, foam, splash craters (a short-lived analytic bowl around each impact; brighten it, never let it go dark), and an optional whirlpool funnel with spiral foam arms.
- Mild tone curve.
5. An overlay pass, depth-tested, drawn after the surface: creatures above water, water droplets (point sprites, gravity 20), soft mist sprites, rain streaks, expanding ring quads, and a drop-target marker.
CREATURES (procedural geometry, no external models)
- Local frame: nose at +x (x=0.5), tail toward −x, up +y, body length 1.
- Body: lofted elliptical cross-sections along x. Half-width W(u), half-height H(u) and centre offset C(u) are Catmull-Rom curves through control points, where u runs 0 at the nose to 1 at the tail. Flatten the belly, cap the ends, compute normals from the grid.
- Fins: thin double-sided sheets made as bilinear patches between a root chord and a tip chord, with bowed leading and trailing edges.
- Species:
1. Great white shark: slate-grey back with a ragged countershading line to a white belly, gill slits, tall triangular dorsal fin, big swept pectorals with dark tips underneath, crescent tail with a longer upper lobe.
2. Great hammerhead: flat wide cephalofoil with eyes at its tips, bronze-grey colour, tall sickle dorsal fin.
3. Humpback whale: near-black back, mottled white belly with throat pleats, knobs on the head, very long scalloped white pectorals, small dorsal hump, serrated flukes.
4. Orca: black, with the white eye patch, white chin, belly and flank lobe, grey saddle behind a towering dorsal fin, paddle-shaped pectorals.
5. Bottlenose dolphin: beak and melon forehead, dark cape over grey flanks and a pale belly, curved dorsal fin.
6. Green sea turtle: domed shell with scute pattern and amber streaks, pale belly plate, scaly head, long front flippers and small rear flippers.
7. Manta ray: diamond-shaped swept-back wings, curled horn-like fins at the mouth, whip tail, black top with white shoulder chevrons, white spotted belly.
- Draw each species as one InstancedBufferGeometry. Per-instance data: position, orientation quaternion, (swim phase, wave amplitude, turn, fin phase), (scale, alpha, body arch, fin amplitude), (seed, water-class flag, wetness, flipper angle offset).
- Vertex shader:
- Swimming body wave: side to side for sharks, up and down for whales, orca and dolphins, none for turtle and manta.
- Amplitude envelope grows toward the tail, plus turn curvature and arch.
- Rotate each cross-section to stay perpendicular to the bent spine.
- Rotate flippers on hinges about the body axis.
- Manta wing beat travels outward with amplitude ∝ |z|^1.45.
- Sample the GPU water height at the vertex for the waterline.
- Render each species in three passes: under water (discard fragments above the local water height, tint by water), above water (discard below), shadow (project to the floor). Also render card thumbnails with the same materials.
- Fade with an ordered (Bayer) dither. Lighting: sky/ground ambient, sun diffuse with caustics under water, glossy specular that increases when wet, rim light, eyes as dark spheres in the shader.
BEHAVIOUR
- Swimming: wander steering inside the screen (stay above the bottom dock UI), separation between creatures, preferred depth with floor clearance, pitch toward the target depth, roll into turns, currents from the whirlpool.
- Whales, orcas and dolphins periodically surface to breathe and spout: droplet column plus soft mist sprites plus a blow sound. Humpback spout is bushy, orca tall, dolphin a small puff. The humpback dives fluke-up.
- Sharks often cruise with the dorsal fin cutting the surface and leaving a V-wake of small drops.
- Turtles surface to breathe; mantas glide with wing beats.
- Dolphins porpoise-leap often; orca, humpback, shark and manta occasionally breach. A breach means rising fast, launching out of the water with an exit splash, then re-entering in the species style below.
- Tapping the water makes ripples. Sharks, dolphins and orcas come to look at the spot; turtles and mantas flee.
ENTERING THE WATER: EACH SPECIES DIFFERENT (the core feature)
- Tapping a creature card throws the creature from the card's screen position (projected onto the water plane, y=0.6) along a ballistic arc to a random free spot.
- Per-species gravity (whale 6.2, orca 7.5, dolphin 11, others 10) and flight time (whale 1.8 s, orca 1.5, hammerhead 1.3, manta 1.35, shark 1.2, dolphin 1.15, turtle 1.0). Start velocity: vy = (−y0 + ½gT²)/T.
- In the air, orientation is scripted against flight progress τ ∈ [0,1], relative to the trajectory pitch, and blended in from the start orientation over the first 22%:
- Shark: noses steeply down for a knife entry; tail thrashes.
- Hammerhead: corkscrews, two full rolls.
- Humpback: rolls onto its back (≈2.75 rad) and levels out, pectorals raised, body arched: a backflop.
- Orca: rolls onto its side (≈1.5 rad) and levels out.
- Dolphin: follows the arc for a clean head-first dive.
- Turtle: wobbles with flippers flapping into a belly-flop.
- Manta: forward somersault (−2π) into a flat wing slap, wings beating.
- Each entry has its own splash: a crater drop plus several drops along the body line for long animals, expanding rings, a droplet crown with species-specific counts and speeds, mist, bubbles, and sound.
- Dolphin: tiny "rip" splash.
- Sharks: tall crown; hammerhead adds spiral droplets.
- Humpback: huge white curtain (~500 droplets), mist and a low boom.
- Orca: big side splash.
- Turtle: low flat plop.
- Manta: wide low sheet of spray and a sharp slap.
- After entry the creature decelerates under water with a bubble trail, slerps back to its swimming orientation over 1.6–3.2 s (the whale rolls back over from its back), then swims.
- Dragging a card holds the creature above the water under the pointer (with a target ring on the water) and drops it on release with its own entry style.
- The user can grab any creature from the water (pick by distance to its projected body axis), carry it, and throw it back.
UI (English)
- Frosted-glass dock at the bottom: 7 creature cards with thumbnails rendered from the real models and a short description each ("Knifes straight in", "Corkscrew dive", "Backflop breach", "Lands on its side", "Clean arc dive", "Belly plop", "Wing slap"). On phones show short names.
- Tool buttons: Rain (streaks, ring ripples, dimmer sun), Whirlpool (draggable vortex that carries creatures), Calm, Clear (all creatures swim off and fade), Sound (synthesized Web Audio: splashes, plops, blows, slaps, booms, occasional humpback song, dolphin whistles, orca calls, ambient water), Hide UI.
- Top-left name plate "Reef Lagoon" with a live creature count; toasts and a hint line.
- Keyboard: 1–7 throw creatures, R W C M H.
QUALITY AND ROBUSTNESS
- Works on desktop and mobile (touch, pointer events, no horizontal overflow) and in both WebGL2 and WebGL1.
- Adaptive pixel ratio when frames are slow.
- Caps: 24 creatures total, max 3 humpbacks.
- Start with two dolphins, a turtle, a shark and a manta already swimming; a humpback breaches 1 s after load.
- Show a toast for runtime errors and lost WebGL contexts.
Build a single-file interactive WebGL diorama called "Mangrove Lights" (Three.js r160 via import map, OrbitControls, no external models or textures, English UI). A mangrove island sits inside a rounded rectangular block of water, about 10×10 units and 1.7 deep, on a cream plinth, over a transparent canvas with a soft contact shadow.
Island: a procedural heightfield with a dry forest floor at the back, shallow mud flats, creeks, and an open inlet at the front corner. Mangrove fringes stand in about 0.5 of water along both glass walls that face the camera, so the stilt roots show above the water and through the glass. The terrain's side walls are a layered mud cross-section with root fibres. Mud below the high-tide line stays dark, wet and glossy.
Trees (about 140): each has a short trunk; 8–11 arching prop roots built as CatmullRom tube geometry that reach into the mud; hanging aerial roots; and a dense crown of displaced icosphere blobs with per-instance AO and dark glossy greens. Bark is algae- and barnacle-stained below the high-tide line. Add pencil-root pneumatophores on the flats, a fisherman's hut on stilts with a lit window and lamp plus a boardwalk, a canoe that bobs on the waves, wading egrets, an egret flying by day, and schools of silver fish that swim between the roots and flee the cursor.
Water: refraction, Beer–Lambert absorption from real thickness, Fresnel sky, screen-space reflections, sun glints, and almost no shore foam. A 256² GPU wave-equation ripple sim responds to the cursor and clicks. Low mist layers part around the cursor.
Fireflies: about 1600 Kuramoto oscillators around the crowns, coupled to a local spatial-hash mean field plus the global field, with a position-dependent phase offset so the synchronized flash sweeps across the forest as a wave. Use an asymmetric flash curve and additive point sprites drawn after the water, with a manual depth test. Mirrored copies show reflections on the water. Two point lights pulse with the average glow. The cursor randomizes the phase of nearby fireflies and pushes them away; a click scatters a wider area; they drift home and resync.
Lighting: day/night palettes with moonlight, a warm hut lamp, ACES tone mapping and tilt-shift.
UI: brand "bakau°"; headline "A forest that blinks in time."; dock buttons Reset, Night/Day, High/Low tide, Tune and Fullscreen; a settings panel (time, fireflies, pull to sync, mist, water color, tide, waves, ripples, clarity, light azimuth, tilt-shift); a live sync % and clock; a "How it's made" note. The page theme turns dark at night. Include adaptive DPR, a low-detail mode for touch devices, reduced-motion support and a WebGL2 fallback.
Build a single-file interactive 3D web experience called "Jelly Billiards." using Three.js (WebGL), all procedural, zero external assets. Soft, translucent jelly balls roll, collide and wobble on a round glass table in a dark, moody room.
LOOK AND FEEL
- Near-black warm background with a soft colored vignette glow that matches the current jelly color.
- Serif title "Jelly Billiards." top left with a small italic subtitle "The Soft Play Collection".
- A round, shallow, frosted glass table seen from a three-quarter top view, with a soft rim highlight and a faint glow underneath.
- Small refined UI. Quiet luxury feeling, like a limited edition design object.
THE BALLS
- Smooth spheres of translucent jelly with glossy highlights, soft inner glow and a subtle subsurface look.
- Each ball has a small white number disc or a soft circular marking, with numbers readable but delicate.
- Pastel flavors: pink, lavender, mint, sky blue, butter yellow, peach. Balls in a set share the chosen flavor with slight tone variation.
JELLY PHYSICS
- Rigid body rolling and collisions with a soft-body wobble layer: balls squash on impact, jiggle and recover with damping.
- Elastic collisions between balls and with the table rim, believable rolling friction, balls settle smoothly.
- Click and drag on a ball to aim and release to shoot, with a faint aim line and power indicator. A ball can also be nudged by touch.
- Soft deformation visible at the contact point during collisions.
CONTROLS
- A pill button "Roll the balls" that scatters all balls with a random but pleasant impulse.
- Ball count stepper (1 to 9) with minus and plus buttons.
- Jelly color swatches along the bottom left. Switching one smoothly recolors the balls and the ambient glow.
- Top right buttons: "Table view" (top-down camera) and "Settings".
- Settings panel: jelly softness slider, auto-rotate toggle, sound toggle.
- Keyboard: Space to roll, plus and minus to change ball count, T for table view.
SOUND AND POLISH
- Soft squishy clacks and low thuds synthesized with WebAudio (no files), pitch and volume tied to impact speed.
- 60 fps, adaptive pixel ratio, filmic tone mapping, subtle bloom on highlights, soft contact shadows on the glass.
- Smooth camera orbit with inertia and a gentle auto-rotate option.
- Works on desktop and mobile touch. Clean, commented code in one HTML file with constants grouped at the top.
04 · 视觉与生态@MengTo
樱花溪谷撑船漫游
严格零文字电影级 3D 画作:木舟逆流撑篙穿过樱花谷与朱红拱桥,实时平面倒影、昼夜雷暴雨分叉闪电与入夜河灯。
Create from scratch a fully interactive 3D scene of a traditional wooden riverboat being poled upstream through a mountain river valley in feudal Japan during cherry-blossom season. The visual style should be cinematic and painterly rather than photorealistic, while still being exceptionally rich, detailed, polished, and visually sophisticated. Build the valley terrain, river, riverbanks, rocks, cherry trees, maples, pines, forest, ground cover, temple architecture, boat, boatman, villagers, sky, clouds, distant mountains, lighting, materials, water, reflections, petals, mist, particles, wildlife, weather, a full day-and-night cycle, sound, animation, camera work, composition, atmospheric depth, and color grading. The final result should feel like a premium, high-production 3D artwork, not a prototype, technical demo, or low-quality scene.
Start from a completely blank page. Do not reuse or depend on any previous project or scene. You may create the assets yourself or use reliable, trusted, open-source assets and libraries when necessary.
Mandatory requirements:
No text of any kind may appear anywhere inside the scene, including the loading screen. No titles, names, logos, descriptions, credits, labels, or control instructions in any language. Any loading indicator must be purely graphic. Deliver the entire project as one final standalone page file that can be opened directly in a web browser, with assets embedded inside it as much as reasonably possible and no runtime requests to external CDNs.
The valley must feel like one continuous, believable place. A winding river flows down a long valley that narrows into a gorge upstream. It has a deep channel and shallow pebbled margins. Its banks vary between gravel bars and steeper earthen banks. Forested valley walls rise into rounded mountains, and far ranges fade layer by layer into haze. Build these landmarks along the river:
- An arched vermilion wooden bridge on piers that stand in the water.
- A torii gate at the bridge's end.
- A path to stone steps and a temple terrace held up by dry-stone retaining walls.
- A main hall with a curved tile hip-and-gable roof, upturned corners, bracket sets, a railed veranda, and lattice doors.
- A five-storey pagoda with a ringed spire on a knoll.
- Stone lanterns along the approach.
- A small wayside shrine in a clearing on the far bank.
- A tunnel of small vermilion torii climbing the bank upstream to a hillside shrine.
- A rope fence with paper streamers.
- Bells hanging from the roof corners that swing in the wind.
For vegetation, place hero cherry trees by hand, including a weeping cherry. Give them gnarled, leaning trunks, let some overhang the water, and cover them in dense blossom. Add Japanese maples, cloud-pruned pines, and a dense mixed forest of cedars and broadleaf crowns on the slopes. Cover the ground with wind-blown grass, reeds, spring wildflowers, ferns, clipped azalea shrubs, mossy boulders, and exposed roots at the water's edge. All foliage must move in one shared, gusting wind, and the blossoms must glow when backlit.
The hero boat is a takasebune-style river cargo boat. It needs a planked hull with real thickness, ribs, thwarts, floorboards, and iron clamps. Give it a reed-mat canopy on bamboo hoops, a cargo of rice bales, crates, and a glazed jar, plus coiled rope, a bow lantern on an arching bamboo pole, and a sculling oar stowed at the stern quarter. A boatman in a straw cape stands on a raised bow platform and poles the boat with a long bamboo pole, using his whole body: hips drop, the spine leans into the push, the feet stay planted, and both hands grip the pole firmly. The cape reacts to the wind and to each stroke. The pole must never pass through the hull, the hands, or anything else.
Add two villagers. A woman under a red oiled-paper umbrella stands at the bridge rail watching the boats. An old monk sweeps petals off the temple approach. Both breathe and move subtly.
The water must be the centrepiece. It needs:
- Accurate reflections of everything above it.
- Refraction and depth-based color absorption, with the pebbled riverbed visible in the shallows.
- Ripples that follow the flow.
- Faster water and white foam collars around boulders and bridge piers, with foam trailing downstream.
- A convincing wake that follows the boat: a bow wave, V-shaped arms, and a disturbed band along the hull.
- Rafts of petals drifting in the slack water along the banks.
Fill the valley with life and particles:
- Petals tumble from each cherry canopy and through the air.
- Petals ride the current downstream and settle on the banks, the steps, and the bridge deck.
- Dust motes glow only inside the sunbeams.
- Banks of low river mist drift over the water.
- Flocks of birds wheel over the valley, and a pair of herons sometimes crosses the river ahead of the boat.
- Fireflies come out at dusk.
Run a continuous day-and-night cycle of several minutes that loops: dawn, morning, afternoon, a thunderstorm, golden hour, sunset, blue hour, moonlit night, pre-dawn. The sun travels a real arc, the moon takes over as the key light at night, and shadows follow whichever one is lit. Sky color, clouds with silver-gold linings, fog, ambient light, exposure, and the color grade all change with the hour. At night, show stars, a faint Milky Way band, and a cratered moon. The afternoon storm thickens the clouds into a dark overcast. It brings rain streaks, splash crowns on the river, and branching lightning that lights the clouds and the whole valley. Surfaces turn wet and glossy, then dry slowly through sunset.
After dusk:
- The stone lanterns and the hall's doors glow.
- Paper lanterns set adrift on the river (tōrō nagashi) flow past and part around the boat.
- Pale spirit wisps with comet-like trails drift above the water. Each one lights the water, mist, and banks around it and appears in the reflections.
Golden hour is the signature look: a low warm sun up the valley, long shadows, god rays through the trees and mist, backlit blossoms, and a warm haze. Add a quiet synthesized soundscape of flowing river, rain, and thunder that rolls in after each flash, with a keyboard toggle to mute it.
The boat must travel upstream on its own. An autopilot threads it between rocks and bridge piers without ever touching them. The viewer can take over with WASD or the arrow keys. Steering needs momentum, turning inertia, water drag, and a heel into turns. Banks, rocks, and piers push the boat back physically. After a short idle period, the autopilot resumes. A third-person chase camera follows the boat with drag-to-orbit, scroll-to-zoom, and a slow cinematic drift. It must never dip below the banks or into tree canopies. Holding a key fast-forwards the time of day. When the boat reaches the head of the gorge, the scene fades into mist and restarts downstream, so the journey loops forever.
The water, boat, boatman, foliage, petals, and camera must all be animated naturally and smoothly. Avoid artificial slow motion or sluggish movement. The boat should feel like it is genuinely being pushed upstream against the current. Do not rely on primitive geometric shapes as the finished result. The trees, architecture, boat, characters, and rocks need carefully shaped geometry and clearly visible small-scale details: bark, roof tiles, rafters, joinery, planking, rope lashings, and bamboo nodes. Use detailed, scanned, or high-quality textures for rock, bark, ground, stone walls, and wood. Everything must rest on the ground or the water. Nothing may float, and no objects may intersect. Lighting must reveal the geometry and materials clearly at every hour. Use soft shadows, ambient occlusion in crevices and at roots, light shafts, bloom, and a filmic grade. Shadow sides must stay readable, never crushed to black.
Maintain a strong balance between visual quality and real-time performance, including on high-density (Retina) displays, preserving smooth interaction and animation without making an obvious sacrifice in quality. Automatically use the most appropriate skills, tools, libraries, techniques, and available assets needed to achieve the best result. Do not wait for me to specify which technologies to use.
Actually test the finished result in a desktop web browser. Capture screenshots at morning, during the storm, at golden hour, and at night. Inspect the browser console for errors, and fix every visible or technical issue you find. That includes distorted geometry, black screens, failed asset loading, broken animation, poor composition, rendering artifacts, floating or intersecting objects, the boat or pole clipping through anything, and camera problems. At the end, verify that the final file opens and works directly, that the scene contains no text whatsoever, and that there are no remaining runtime or loading errors. Then finish the task with only a brief response.
You know, build me a boss fight. Insanely good game feel, something that looks and feels like a modern indie hit. Keep it small in scope: one arena, one boss, one player. Make the boss fight the best 3 minutes of my day.
Make it a single HTML file I can play right here in the browser. Use Three.js from cdnjs (or plain WebGL). No external images or sound files: every model, texture, particle and sound is generated in code (Web Audio for sound).
The fight:
- Third-person camera behind the player, stylised dark-fantasy arena at dusk, strong rim light, fog, embers in the air.
- Player: move (WASD), dodge roll with i-frames (Space), light attack (left click), heavy attack (hold left click), health bar and stamina bar.
- Boss: an original giant armoured creature with its own name shown at the top with a big health bar. 3 phases: phase 2 at 66% HP, phase 3 at 33% HP. Each phase adds a new readable attack with a clear wind-up (glow, sound cue). At least: a sweeping swipe, a ground slam with shockwave ring, a charge, and in phase 3 a rain of fire projectiles.
- Feel: hit-stop on every hit, screen shake, damage numbers, sparks, boss stagger after 3 heavy hits, slow-motion on the final blow.
- Sound: synthesized music that changes per phase, impact sounds, boss roar on phase change.
Flow: title screen with the game name and "Click to start" -> fight -> victory screen with time and hits taken, or "YOU DIED" screen -> restart on click. Show controls on screen for the first 8 seconds.
Original game only: no names, characters or designs from existing games.
Target 60 fps on a normal laptop. Fix any bug you notice before you finish, and make sure the whole loop from title to victory works.
06 · 动作与射击@superalesha
雾线突围 // FOGLINE
双场景防穿墙 3D 枪模:步枪全息红点、霰弹与精准步枪机瞄 ADS、后坐力惯性、抛壳火光与分层合成枪声。
Make me the most insane and blast of a shooter you can possibly build on ThreeJS + Web shaders bro! The most important things are shooting, dynamics, recoil, graphics, hit impact, gunplay. It's a beautifully designed arena where enemies swarm in hordes. Must have ADS aiming, weapon inertia/weight. 3 weapon types: assault rifle / submachine gun, shotgun, and a heavy-hitting marksman rifle. Red dot sight only on the rifle, iron sights on the rest. This is a Call Of Duty Style AAA game in the browser. Do it right bro, I believe in you!
Create a real-time interactive 3D particle system with Three.js (single self-contained HTML file). Requirements:
- Control the scaling and expansion of the particle group by detecting the tension and closing of both hands through the webcam (MediaPipe Hands).
- Provide a clean modern panel to choose templates: hearts / flowers / Saturn / Buddha statues / fireworks.
- Support a colour selector to adjust the particle colour in real time.
- Particles must respond smoothly to gesture changes at 60 fps. The interface should be minimal and modern.
Build me a cel-shaded arcade boat racing game in Three.js, running on an infinite open ocean, at a level of visual and mechanical quality that a AAA studio would ship. Not a demo, not a prototype — a finished, beautiful, playable game.
Non-negotiable constraints
Stack: Vite + Three.js (latest r1xx), TypeScript, ES modules. I must be able to run npm install then npm run dev and play it in the browser immediately. Nothing else. No frameworks I have to configure, no build steps I have to debug.
Zero external assets. No downloaded models, textures, HDRIs, or audio. Every mesh is built in code (procedural geometry / BufferGeometry), every texture is generated in-code (canvas 2D or noise in a shader), every sound is synthesized with the Web Audio API. If it isn't generated by your own code, it doesn't ship.
Target hardware: MacBook M5 Pro, Chrome. Lock a solid 60fps at retina resolution. Use instancing, frustum culling, adaptive pixel ratio, and a proper LOD scheme. Performance is a quality requirement, not an afterthought — a beautiful game that stutters is a failed game.
Art direction — this is the heart of the project
The entire game is NPR (non-photorealistic rendering), anime cel-shaded. Think Guilty Gear Xrd's ink work and Wave Race 64's stylized water energy, rendered with modern shader technique. Zero PBR realism. If any surface in the final game reads as "physically based," you have failed the art direction.
Implement, properly, all of the following:
- Ramp / step lighting with 3–4 band gradient ramp texture, NearestFilter, no interpolation.
- Inverted-hull outlines on boats, riders, buoys, and gates scaled with view distance.
- Screen-space edge detection as a post pass (EffectComposer + normal/depth MRT + Sobel filter).
- Fresnel rim light on every character and boat.
- Banded specular and graphic cel sky dome with drifting flat cel clouds.
The water — treat this as its own AAA-sized problem
- Sum of 4–6 Gerstner waves in vertex shader, infinite recentering ocean mesh.
- Cel-shaded water color banded by wave height and depth, stylized foam rings, persistent wake ribbons, spray particles, quantized sparkle highlights.
The game
- Format: 4 boats (player + 3 AI opponents), 3 laps, countdown start, finish line, results screen.
- Course: closed circuit with glowing green CatmullRomCurve3 racing line, floating checkpoint gates, wrong-way detection.
- Boat handling: buoyancy sampled at 5–6 hull points, drift/powerslide with boost payoff, airtime off crests.
- AI racers with distinct personalities, mild rubber-banding, collision avoidance.
- Rigged cel-shaded riders leaning into turns and celebrating on finish.
- Spring-damped chase cam, cel HUD, synthesized Web Audio engine + water rush + start horn.
How I want you to work
Fan out sub-agents (water, cel pipeline, boat physics, AI racers, riders, HUD/camera/audio, performance), build a Playwright headless screenshot harness, run a harsh visual critic sub-agent, and /loop each subsystem until polished.