zen: calmer UB — live speed control (default 0.7×) + a touch bigger (scale 1.2)

Swim1_norm read a bit restless; add a tunable playback speed (default 0.7× for a calm
glide, ×0.7 again under reduced-motion) wired into the render tuner, and bump the default
scale to 1.2 for more presence. Both live-adjustable at /zen?debug=1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jay
2026-07-01 19:37:20 -04:00
parent a47897e7b1
commit 9365f69b4a
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -26,7 +26,8 @@ const MODEL_URL = '/models/ub-angelfish.glb';
export const DEFAULTS = {
yaw: Math.PI / 2, // ub.rotation.y — side-on-ish (tune live; head faces ±Z)
pitch: 0, // ub.rotation.x — nose up/down
scale: 1, // multiplier on the auto-fit size
scale: 1.2, // multiplier on the auto-fit size (a touch bigger = more presence)
speed: 0.7, // swim playback rate — <1 = calmer glide
finTranslucent: false, // false = opaque alpha-tested (coherent); true = blended
finSide: 'double', // front | back | double (fins are thin → double reads fuller)
finOpacity: 0.9, // only when translucent
@@ -124,7 +125,8 @@ export async function createAquarium(canvas, initial = {}) {
const baseClip = mixer.clipAction(gltf.animations[0]); // the trimmed swim loop
baseClip.play();
const baseDuration = baseClip.getClip().duration || 1;
mixer.timeScale = reduced ? 0.6 : 1; // calmer when reduced-motion
const applySpeed = () => { mixer.timeScale = (params.speed ?? 0.7) * (reduced ? 0.7 : 1); };
applySpeed(); // calm glide by default; extra-calm under reduced-motion
resize();
// The canvas lives in a responsive container; a ResizeObserver catches layout
@@ -153,6 +155,7 @@ export async function createAquarium(canvas, initial = {}) {
Object.assign(params, next);
applyMaterials();
applyTransform();
applySpeed();
return { ...params };
},
getParams() { return { ...params }; },
+2
View File
@@ -95,6 +95,8 @@
<input type="range" min="-0.6" max="0.6" step="0.01" bind:value={dbg.pitch} oninput={apply} /></label>
<label>scale <span>{dbg.scale.toFixed(2)}</span>
<input type="range" min="0.3" max="2.5" step="0.05" bind:value={dbg.scale} oninput={apply} /></label>
<label>speed <span>{dbg.speed.toFixed(2)}</span>
<input type="range" min="0.2" max="1.5" step="0.05" bind:value={dbg.speed} oninput={apply} /></label>
<hr />
<div class="ph">Fins &amp; tail</div>