/ghibli-threejs:threejs-open-world-streamingfrom ghibli-threejs
Streams a three.js scene into a long, procedural open world along a river using signed-distance functions for terrain, water, and object placement. Use when extending a scene, adding landmarks, or fixing distant terrain/water/shadow issues.
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.
Grow a hand-built home scene into a ~600 m journey without touching the home reach: a
source upstream, chapters along the way, a finale downstream. Stack: three.js
WebGLRenderer (vanilla or R3F), everything procedural in JS plus GLB landmarks. The
core idea: one height function and one signed-distance function define the world, and
every system (terrain, water shader, scatter, boat bounds, camera clamps) asks them.
Extend
{{scene}}along the river to about{{600}}m:{{source, e.g. a spring pool under a waterfall}}upstream,{{chapters, e.g. rice terraces, a village road, a bridge}}on the way,{{finale, e.g. a lake with an island}}downstream. Keep the home reach identical. One signed-distance function (river ∪ lake ∪ pool, minus the island) drives terrain, scatter and boat bounds. Stream the ground as chunks. Populate deterministically, with crafted trees near the camera and painterly blobs beyond, and cull by distance. Verify the voyage numerically (clearance from banks, depth under the keel) and screenshot each chapter.
bankDist)Signed distance to the water's edge, < 0 in water (see references/world-sdf.js):
d = max(|x − c(z)| − half(z), z − z_lake, z_source − z) // river between pool and lake
d = smin(d, lakeCircle(wobbled radius), 6) // polynomial smooth-min
d = smin(d, poolCircle, 3)
d = max(d, −islandCircle) // the island is land again
riverCenter(z) piecewise: the home formula unchanged, extra meanders added only
beyond the home reach with smooth() ramps, so the original scene doesn't move.toFixed() constants) so the
water shader can clip itself to the land strip.terrainHeight(x, z) composes everythingbed → bank (smoothstep on d) → gentle rise → rolling hills → valley walls that rise with
distance upstream/downstream → cliffs → island mound → terraces → landmark pads.
k = floor(hb/step)); flat paddy,
smooth riser (smooth(.86, 1, f)), floor eased 6 cm under the water level, an earth bund
near the outer edge. The paddy water is a merged mesh of flooded cells at their level with
a tiny sky-Fresnel shader reading the live sky uniforms.h += (P.h − h)·smooth(P.r + 4, P.r, dist). Fix site positions and compute pads
before any terrain chunk is built, since pads are part of terrainHeight.references/terrain-chunks.js:
x = riverCenter(z) + u, so adjacent chunks share edge vertices exactly however
the river bends.x += .34 + max(0, x − 28)·.045.computeVertexNormals, then drop those rows → seams have matching normals.TER_DRAW (200 m) of the camera.pos = round(cam/s)·s, so world-anchored waves never swim. A low quality tier
takes 240 segments (79 cm cells): still 2.4 samples across the shortest 1.9 m wave train,
whose light comes from the analytic slope.frustumCulled = false. In the fragment shader: if (outsideWorld(vWPos.xz)) discard;
so no water sheet shows past the ends of the land.rsm): GLSL's smoothstep is undefined for reversed
edges (e0 > e1), which the ramps use.The home shadow frustum is ±13 m. When the target is > 14 m from home (or the boat camera
is on), move SUN_FOCUS to the target snapped to 2 m (so shadows don't crawl), and put
the sun at focus + sunDir·30. Only trees within the shadow square cast shadows.
mulberry32(seed)), rejection-sampled with
bankDist and a keep-out (home reach, pads + 2.5 m, road segments + 2.4 m).z (spring / terrace / upper / meadow / village / lake) pick species and density.references/tree-pool.js): N crafted trees per species (16 here),
re-seated every 0.5 s on the candidate sites nearest the camera (within 55 m). Each site
holds references to its blob instances (canopy + trunk), which are scaled to zero
(makeScale(0,0,0)) while a crafted tree stands there. Per-slot tint uniform on one shared
program varies the greens.sitOn(obj, x, z): reset, measure,
y − box.min.y). Skip quietly if a model is missing.updateMatrixWorld(true). A
just-placed object still holds its old matrix; a mill 245 m away registered at the origin
and was culled forever.//: a comment dropped mid-line silently commented out an
isMesh guard; build() threw halfway and the page sat at 100 % on the loading curtain.
Put comments on their own line.(−t.z, t.x) that points left
gets downward-facing triangles (back-face culled, lit from below). Build right to left or
flip the index order.flipY = false; the
canvas's top row is the sign's top.maxDistance silently pulls a far debug camera in. Raise it for aerials.references/world-sdf.js — noise, smin, bankDist, terrainHeight skeleton, GLSL centreline.references/terrain-chunks.js — curvilinear strip, hidden-row normals, streaming, water grid, shadow follow.references/tree-pool.js — crafted-tree pool re-seating and blob hiding; distance culling.threejs-webgl-realistic-water · threejs-boat-buoyancy-steering · threejs-procedural-vegetation · threejs-webgl-waterfall-effect · threejs-webgl-performance-profiling · threejs-blender-glb-pipeline · threejs-hud-objective-markers · threejs-headless-visual-verification
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
31 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.npx claudepluginhub nicksonthc/ghibli-threejs --plugin ghibli-threejs