/ghibli-threejs:threejs-webgl-wake-simulationfrom ghibli-threejs
Simulates a physically dispersive Kelvin wake in three.js WebGL using a ping-pong half-float GPU height-field with iWave kernel, hull-footprint forcing, foam, and relief shading. Use when a moving object needs a persistent, spreading wake.
Ships in ghibli-threejs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The boat leaves a real wake in the water: the 19.5° Kelvin V with feathered divergent crests,
transverse waves behind the stern (wavelength 2πv²/g), bow and stern wave systems — all emerging
from the physics, left in the water where they were made, spreading and settling, with streaky
foam at the bow and in steep crests. A hull-attached analytic bow wave covers the first metre.
Runs as a 256² fragment-shader simulation in the three.js WebGLRenderer (two HalfFloat render
targets), read by the water material from threejs-webgl-realistic-water.
Replace
{{boat}}'s wake with an interactive simulation: a ping-pong half-float render target (height, previous height, foam) over a window that follows the boat but stays world-locked. Deep-water dispersion via the iWave kernel, so the Kelvin V, its divergent and transverse waves and the bow/stern wave systems come out by themselves at a scale right for a small, slow wooden boat. The hull's moving footprint displaces the water; bobbing rings it; foam comes from steep crests and the hull rim and fades. The water shader displaces vertices with it, bends normals, shades crests and troughs, and shows foam, blended with the ambient swell. Keep a hull-attached near-field bow wave. Keyboard steering to test. Draw the height field to a debug canvas before judging the shading.
WebGLRenderTarget(256, 256, { type: HalfFloatType, depthBuffer: false }), RGBA:
R = height (cm), G = previous height, B = foam. Clear to 0 at start.c = round(pos/dx)·dx) and read the previous state at uv + shift, so nothing blurs.h *= mix(0.9, 1, smoothstep(0, .08, edgeDist)) — nothing reflects back.h' = (h(2 − αdt) − h_prev − (g/dx)·dt²·s·(G ⊗ h)) / (1 + αdt),
G(r) = Σ q² e^(−σq²) J0(qr) normalised to G(0) = 1.s on the discrete taps, so the response to cos(kx) equals k at k = 0.25 rad/texel.0.03·∇²(h − h_prev) to kill grid-scale noise.uniform vec3[]) tracks dispersion to about k ≈ 0.5 and is isotropic.exp(−0.04·dt).See references/iwave-kernel.js (Bessel J0, taps, calibration) and references/wake-sim.glsl.js.
F(pose) ∈ 0..1: pointed bow, full body, slightly narrowed transom, deepest amidships.force·(F(pose_now) − F(pose_prev)) to both the new height and the stored previous height.− bob·heaveVelocity·dt·F. Force scales with speed (0.7 + 0.6·min(v, 2)).max(0, slope − 16 cm/m)·0.003, lingering (× exp(−dt/2.2)), spreading 12% to neighbours.smoothstep(0, .12, F)·(1 − smoothstep(.12, .3, F)), weighted to bow and transom. Using |ΔF| over
the whole footprint whitens the entire track.smoothstep(.3, .9, foam·(.35 + 1.1·n))). A soft threshold on low-frequency noise gives cotton-wool blobs.y += h·0.01 (cm → m) inside the window, faded at its edge.× 3.5 to the ripple normal.
Normal gain ×8 smears the reflection (picks up the hull and bank); ~×3.5 is the limit.col *= 1 + clamp(dot(slope, normalize(sunDir.xz))·6.5, −.28, .36) — readable from above.col *= 1 − clamp(−h·7, 0, .14). Keep the crest highlight tiny
(it multiplies by sun brightness).In the boat frame (a = ahead, c = across, stem at +1.5 m): water heaped at the stem
exp(−sa²/.022 − c²/.035), two shoulder crests peeling aft and outward (~35–40° from the centreline,
narrowing with speed), a trough along the sides amidships, a white lip at the bow only. Slope by three
taps (e = 2 cm). The simulation carries everything beyond ~1 m.
A steady height field wakeH(p) in the boat frame (s = metres behind the bow, x = |c|/s/0.354):
V wedge of half-angle 19.47° (tan = 0.354) from just ahead of the bow; transverse waves
(wavelength 2πU²/g floored at 0.62 m) curving forward toward the edges; divergent feathers crossing
the wedge edge; a bright cusp line; bow pile-up; stern wash. Slope by finite differences (3 calls,
e = 2.5 cm), added after the ripple normal's distance fade at full strength; crest lines
pow(max(sin(phase), 0), 6) as a light term; textured foam by value noise + smoothstep.
It looks wrong because a pattern fixed in the boat's frame swings rigidly when the boat turns and
vanishes the moment it stops. A real wake is left in the water.
readPixels of the sim needs a Uint16Array + half-float decode for debugging.readRenderTargetPixels to see the V first.threejs-webgl-realistic-water · threejs-boat-buoyancy-steering · threejs-webgl-rain-effect
· threejs-webgl-performance-profiling · threejs-headless-visual-verification
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
boat-wake, kelvin-wake, gpu-simulation, water-ripples, threejs-water
Other plugins' skills for the same job
npx claudepluginhub nicksonthc/ghibli-threejs --plugin ghibli-threejs31 skills in this plugin
/threejs-blender-glb-pipelineBuilds a reference-image-driven asset pipeline from headless Blender to GLB for a three.js scene — an asset contract (units, axes, grounding, required mesh/material names, budgets, attachment numbers), one parallel subagent per asset group writing craft_<slug>.py generators, preview renders compared against the reference, measured-bounding-box placement in the web scene, Draco compression, and a scored asset quality pass. Use when the user has a reference picture and wants a 3D scene from it, asks to model props/trees/characters in Blender for three.js, export GLBs, fix glTF export issues (vertex-colour alpha, UV flip, axes, custom normals), compress models, or rate and improve every asset in a scene./threejs-boat-buoyancy-steeringFloats a boat (or any buoyant prop) on three.js water with Gerstner waves generated from one JS table that feeds both the GLSL vertex shader and a CPU waveHeight(), four-probe heave/pitch/roll damped springs, an arc-length drift lane that bends round rocks, click-to-steer W/A/S/D rowing with momentum and drag, an autopilot that pursues the lane back, and a chase camera that keeps the orbit. Use when the user wants a drifting or steerable boat, buoyancy, objects bobbing on waves, Gerstner waves on a river/lake, a boat autopilot, or a follow/chase camera behind a vehicle on water./threejs-camera-guided-tourBuilds a hands-free guided camera tour for a three.js scene — keyframes as data, a time-parametrised Catmull-Rom (Hermite) path with continuous velocity, one camera-owner flag, the tour driving time of day and a day→night blend, staged creatures crossing the frame, handwritten captions, portrait-phone lens widening, instant hand-back on drag/scroll/tap/Esc, and a seek() hook for screenshots and video capture. Use when adding a tour mode, cinematic flythrough, attract mode, camera path animation, keyframed camera, spline camera or showcase video capture to a WebGL scene./threejs-cinematic-loading-screenBuilds a cinematic loading gate for a three.js scene — a painted CSS dawn (layered gradients, drifting blurred mist bands, optional conic god rays, SVG feTurbulence grain, vignette), a 2D-canvas layer of falling petals and glowing motes, a handwritten title that animates in, a gold progress line with stage captions, then "tap anywhere to enter" whose tap is the browser gesture that unlocks audio; uses a still captured from the live scene as the backdrop that cross-fades into the real render, and warms up shaders before lifting so the first interaction never stalls. Use when adding a loading screen, splash screen, intro curtain, preloader, tap-to-start / audio unlock gate or shader pre-compilation to a WebGL scene./threejs-day-cycle-lightingAnimates the sun in a three.js scene from sunrise to sunset through a single applySun(az, el) writer — azimuth sweep, elevation arc, warm-to-gold light colour, horizon falloff, warming sky dome and fog, re-aimed god rays and every sun-driven shader uniform — plus a cinematic "sun follows the lens" mode that keeps the sun beside the camera heading for backlit shots with boosted god rays and forward scattering. Use when adding a day/night cycle, time-of-day slider, sunrise/sunset, moving sun, backlit tour shots, or when several systems fight over the sun direction in WebGL/R3F./threejs-dreamy-glass-hudTurns a three.js scene's DOM overlay into one coherent, dreamlike HUD — a single frosted-glass material shared by every pill, badge and popover whose colours are registered CSS properties so the whole HUD cross-fades from pearl to deep indigo as the scene turns to night; an inline-SVG icon dock whose lit toggles glow gold instead of shouting; a glass popover in place of a native select; first-visit hints "whispered" in handwriting that step aside the moment the visitor understands; a HUD that drifts away after half a minute of stillness; a mote of light under each tap; a staggered arrival after the loading gate; and letterbox bars during a camera tour. Use when the overlay UI looks like a dev panel on top of a beautiful scene, when asked for a dreamy, cinematic, premium or 梦幻 / 绝美 UI, glassmorphism, a day/night-aware HUD, onboarding hints, auto-hiding UI, tap feedback, or to restyle lil-gui to match.