/ghibli-threejs:threejs-camera-guided-tourfrom ghibli-threejs
Adds a hands-free guided camera tour to a three.js scene using keyframed Catmull-Rom paths, day-to-night blending, staged creatures, captions, and a seek() hook for screenshots or video capture.
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.
A ▶ Tour button (or ?tour) plays a ~80–90 s camera journey that shows every core view in one smooth flow,
day into night, with one short caption per beat. The visitor can take over at any moment — the camera stays where
it is and the orbit controls pick up from there, no jump.
Stack: three.js WebGLRenderer + OrbitControls, an existing sun/day-cycle function and ideally a night blend
(see threejs-day-cycle-lighting, threejs-ghibli-night-mode). Vanilla or R3F (drive it from useFrame).
Add a Tour mode to
{{entry file}}: a hands-free camera journey of about{{90}}s that shows every core view in one smooth flow, ending at night.
- Entry/exit: a "▶ Tour" HUD button.
?tourdoes not skip the loading gate: it changes "tap to enter" into "tap to start the tour", so that tap is the gesture that lets the music start.?tour&silentkeeps the music off for capture. The visitor leaves any time via the controls'startevent,wheel, or Esc; the camera stays put and the controls take over. While it plays, atouringclass on<body>hides the HUD and slides in two soft letterbox bars (CSS only).- Sequence (every move eased, no hard cuts):
{{beats, e.g. 1 wide establishing orbit · 2 look up at the sun through backlit leaves · 3 glide down through the water surface · 4 slow glide under the surface while 2–3 fish cross the frame, then rise · 5 core views · 6 pull back while day turns to night, tilt up to the moon · 7 final wide night shot, fade in "tap to explore"}}. One short handwritten caption per beat.- How: keys
{ t, pos, target }plus[t, value]tracks for time of day and night blend; first keynull= the visitor's current camera. Time-parametrised Catmull-Rom on position and target, zero tangents only at the ends. Reuse the scene's cinematic flag ('tour'). The tour owns the time of day. Stage the fish, don't chase them. Widen the lens on portrait phones. Exposetour.seek(seconds).- Verify: screenshot every beat by seeking and calling
frame()directly, at 16:9 and phone portrait. Test drag, Esc, wheel and completion paths.
references/tour-path.js)keys: [ { t:0, pos:null, target:null }, // null = wherever the camera is now
{ t:5, pos:[7.5, 8.6, 10.8], target:[1.8, .4, -1.2] }, … ],
day: [[0, .25], [61, .25], [70, .97], [80, .97]], // dayPhase 0 sunrise … 1 sunset
night: [[0, 0], [65, 0], [75, 1], [80, 1]],
captions: [[2, 10, 'somewhere along the river'], …]
Tracks are piecewise with smoothstep between samples.
(p[i+1] − p[i−1]) · dt_seg / (t[i+1] − t[i−1]). Velocity is continuous
through every key: no stop-and-go. Tangents are zero only at the first and last key, so the tour eases in and out.pos and target; camera.position.copy(pos); controls.target.copy(target); camera.lookAt(target).'tour' — whatever already skips controls.update() and the
ground/waterline clamp. Audit every reader of that flag: in the reference scene it also hid the hero object's
hover glow, which the tour's close-up needed (the ring gets a special case for 'tour').k every frame, then calls the one applySun.k ≥ 0.5, else restore the visitor's day-cycle setting. Always switch autoRotate
back on at the end (OrbitControls pauses it during drags and resumes by itself — just make sure no path leaves it off).1 − exp(−dt/2.4) on the wrapped angle. Heading uses the sun's convention: az = atan2(fx, −fz) for
dir = (sin a, ·, −cos a). Side (±) is sticky: change only when the sun is > 8° from dead ahead.pow(dot(−V, sunDir), 4); fade the follow out (w → 0)
before the sunset sweep. Write absolute values (params.rays * (1 + boost*w)), and restore them in
stopTour when a tour is cut short mid-day.{ t, dur, fish, dist, dy, dir }. Each frame, place the fish on a line dist m (≈ 1–1.8) ahead of the
lens, moving along the camera's screen-right axis from just past one frame edge
(dist·tan(vfov/2)·aspect + body length) to the other, with a small bow toward the lens (.14·sin(πu)), heading
from the path. Pure function of tour time, so seek lands mid-crossing.scripted fish; on release, hand it a velocity along its crossing so it swims on.vfov = 2·atan(tan(25°)/aspect), capped at ~80°. Pulling back from a
target high in the sky pushed the camera into the canopy and under the water. Restore fov on exit.tour.start / tour.stop already toggle body.touring (it hides the HUD); hang a letterbox on the same class,
with no script: two position:fixed; pointer-events:none pseudo-elements, 8.5vh tall (6vh under
max-aspect-ratio:3/4), each a gradient from near-black (#05090c to 55 %) to transparent, parked at
translateY(∓101%) and brought to transform:none under body.touring over a 1.6 s transition.bottom:13vh).frame() clock: screenshots right after a seek
show stale captions. Drive captions from the tour clock if you capture video.requestAnimationFrame: tweens freeze and FPS reads 0 — not a bug.uStrength *= boost compounds every frame when the night code returns early in pure day (it
reached 1e167). Always write absolute values.tour.seek(s) + direct frame() calls for each beat, at 16:9 and ~390×844 portrait.autoRotate on, day/night state sensible.threejs-day-cycle-lighting · threejs-ghibli-night-mode · threejs-fish-school-boids ·
threejs-cinematic-loading-screen (?tour gate) · threejs-webaudio-generative-soundtrack ·
threejs-object-interaction · threejs-headless-visual-verification
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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.npx claudepluginhub nicksonthc/ghibli-threejs --plugin ghibli-threejs