/ghibli-threejs:threejs-dreamy-glass-hudfrom ghibli-threejs
Replaces a three.js scene's DOM overlay with a cohesive frosted-glass HUD: day/night-aware colors, inline SVG icons, glass popovers, auto-hiding, and onboarding hints. Use when the overlay UI looks like a dev panel on top of a beautiful 3D scene.
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 hand-painted scene is easily let down by its overlay: a native <select>, unicode glyphs for icons, five pill
styles that grew one feature at a time. This skill replaces all of that with one material and a few manners:
body can transition them: the HUD crosses from
pearl to indigo over the same seconds the scene does.Stack: plain CSS + ~40 lines of DOM JS over a three.js canvas. No framework. In R3F keep the HUD outside <Canvas>
and call ui.step() from useFrame.
Restyle the DOM overlay of
{{entry file}}as one dreamlike glass HUD, without changing what any control does:
- Define glass tokens (
--glass,--glass-hi,--edge,--text,--text-soft,--gold,--glow,--shade) with@propertyso they can transition;body.nightoverrides them; toggle that class when the scene's night blend crosses .5. Every pill, badge, popover and prompt uses the tokens — no literal colours left in the HUD.- Replace glyph icons with inline SVG (24 px viewBox,
stroke:currentColor, 1.6 px round strokes). A lit toggle takes the gold and a small glowing dot under it; group the dock with thin separators.- Replace
{{native select / settings control}}with a glass popover opened from a dock button; keep the original control hidden as the state holder.- First visit only: whisper
{{2–3 hints}}one at a time in the handwriting font, each leaving when the visitor does the thing it describes. Never during reading, touring or steering.- After 28 s without input, fade the whole HUD out; any pointer, key, wheel or touch brings it back.
- A tap (not a drag) on the canvas leaves a small ring and a few sparks at the pointer.
- After the loading gate lifts, bring the HUD in piece by piece over ~2 s.
- During the camera tour, slide in two soft letterbox bars.
- Respect
prefers-reduced-motion, safe-area insets, and 36–38 px touch targets. Verify at 1440×900 and 390×844, by day and by night, in every language the page ships.
references/glass-tokens.css)@property --glass { syntax:'<color>'; inherits:true; initial-value:… }. An unregistered
custom property cannot be interpolated; a registered one can, so
body { transition: --glass 1.8s, --text 1.8s, … } animates every element that reads it — with no per-element
transition rules, and without fighting the opacity/transform transitions those elements already have.--glass rgba(255,250,240,.52), --glass-hi …,.86 (popovers,
hover, anything with body text); night rgba(14,24,52,.46) / rgba(20,32,66,.84); text #22302a → #f4ecd8;
gold #c8743a → #ffd28a. backdrop-filter: blur(14px) saturate(1.35); a popover over flowers needs
blur(22px) saturate(1.1) or the petals show through the words.0 10px 34px var(--shade), inset 0 0 0 1px var(--edge), inset 0 1px 0 var(--edge).const n = night.k > .5; if (n !== isNight) body.classList.toggle('night', isNight = n). Also set
<meta name="theme-color"> so a phone's browser chrome follows.<i> for the light: fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round. Glyph characters (☀ ☾ ♪ ⚙) come from whatever font the OS has: two of
them looked identical and none matched the scene.color: var(--gold) + drop-shadow(0 0 5px var(--glow)) on the icon + the dot scaling in. With three
toggles lit by default, filled orange discs were the loudest thing on screen.<hr> (1 px × 16 px, currentColor at .16). Tooltip from ::before { content: attr(data-label) };
left-align the first button's tooltip so it cannot leave the screen; hide tooltips on coarse pointers.button.firstElementChild.innerHTML, never textContent
(that would delete the dot).<select hidden> and its onchange: the popover's radio buttons set select.value and call it. Nothing
downstream changes.transform-origin at the button; close on outside pointerdown and Escape; stop
pointerdown inside it from reaching the canvas.references/hud-manners.js)blur(8px) → none, letter-spacing .12em → .03em, 1.1 s.[text, ms]. Wait 1.3 s between lines; if the HUD is busy (reading, tour, steering, a popover open)
the line is skipped, not delayed into an unrelated moment.start event — the visitor has dragged, so they know.localStorage marks them seen. Capture runs (?silent) get none, with a ?whisper override for testing.last = performance.now() updated by capture-phase, passive pointermove / pointerdown / keydown / wheel / touchstart listeners. In the frame loop: after 28 s and not busy, add body.admire.body.admire sets opacity:0 !important; pointer-events:none !important; transition:opacity 2.6s on the HUD
roots and cursor:none on the canvas. pointer-events:none matters on touch: the tap that wakes the HUD must
not also press an invisible button.pointerdown stores position and time; pointerup within 6 px and 450 ms appends <i class="spark"> at the
pointer and removes it after 850 ms. The ring is a scaled box-shadow; the five sparks are one pseudo-element
whose box-shadow list animates outward. Skip under pointer lock and reduced motion.body.entering for 3.2 s. Under it only transition-delay differs (counters 1.1 s, language
1.3 s, dock 1.5 s, wordmark 1.8 s), so the same fade rules stagger once and never again.translateY(∓101%) → none over 1.6 s under body.touring. The tour caption sits just above the lower bar
and the "tap to explore" hint inside it.--background-color, --title-background-color, --widget-color,
--number-color, --text-color, --font-family on .lil-gui.root, add the same backdrop-filter and a 14 px
radius, and it stops looking like a different app.#toggles button { width:36px; border-radius:50% } also styled
the popover's buttons (it lives inside the dock so it can anchor to it) and gave each a tooltip. Use
#toggles > button for the dock's own buttons.left:50%; transform:translateX(-50%) holds
left-aligned lines: a short headline sat visibly left of the longer small print under it. Give it
text-align:center; width:max-content; max-width:88vw, and text-wrap:balance for anything that may wrap.transition: background 1s on a shared .glass class is
overridden by each element's own transition: shorthand. Animating the registered properties on body avoids
the conflict entirely..36 alpha over sunlit flowers left dark icons unreadable;
.52 with icons at .8 opacity held. Check the dock over the brightest and busiest part of the frame.body:has(#popover.open) #whisper { opacity:0 }.npx serve redirects /index.html?lang=zh to /, so a
translated or flagged page silently tests as the default. Navigate to /?lang=zh and assert location.search.page.screenshot, not canvas.toDataURL) at 1440×900 and 390×844: gate, entered,
popover open, night, tour, reading, each language.body.night flips once as the blend crosses .5 and every glass element changes together..spark; a drag leaves none.prefers-reduced-motion: no blur-ins, no sparks, no pulsing.backdrop-filter on a handful of small elements was free here).references/glass-tokens.css — tokens, night override, dock, popover, whisper, stillness, spark, letterbox.references/hud-manners.js — night class, whisper queue, stillness timer, tap sparkle, popover wiring.threejs-hud-objective-markers (the badges and fly-to this dresses) · threejs-cinematic-loading-screen · threejs-camera-guided-tour · threejs-ghibli-night-mode · threejs-headless-visual-verification
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
glassmorphism, hud, threejs-ui, day-night, auto-hide, onboarding
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-first-person-bvh-walkLands a character on a landmark and lets the visitor walk it in first person in three.js — a floating-down arrival, the camera slipping from a three-quarter view into her eyes, WASD + pointer-lock look, Shift run, E use, V over-shoulder, Esc leave, a touch thumb stick, a levitation lift between floors, interiors lit by the nearest lamps — with a three-mesh-bvh capsule controller that never gets stuck (footprint ground, sideways-only capsule push-out, glancing along edges, climb-back for every drop, a breadcrumb unstick) and a headless flood-fill + random-wander soak test that proves it. Use when the user wants first-person or third-person walking inside a GLB building or island, WASD movement with collision, a character controller, pointer lock, or says the player gets stuck on walls, balconies, stairs, rails or seams.