diff options
Diffstat (limited to 'public/bluebey-studio/src/animation.js')
| -rw-r--r-- | public/bluebey-studio/src/animation.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/public/bluebey-studio/src/animation.js b/public/bluebey-studio/src/animation.js index 4446878..47f1cfb 100644 --- a/public/bluebey-studio/src/animation.js +++ b/public/bluebey-studio/src/animation.js @@ -111,6 +111,18 @@ export class Animator { return { bones, root }; } + if (mode === 'wave') { + // One flipper is held up and sweeps back and forth, with the hand lagging a + // little behind it; the body and the other flipper rock along gently. The + // +84 X holds the arm up on its own, so the wave reads from a plain stance. + const wave = Math.sin(t * 3.2); + add('arm.l', 84 + wave * 14, 0, wave * 12); + add('hand.l', 0, 0, Math.sin(t * 3.2 + 0.6) * 22); + add('arm.r', 0, 0, Math.sin(t * 1.6 + 1) * 4); + add('master', Math.sin(t * 1.6) * 1.2, 0, Math.sin(t * 1.6 + 0.4) * 3); + return { bones, root }; + } + // Default: gentle breathing, as if standing there alive. add('master', Math.sin(t * 1.5) * 1.3, 0, Math.sin(t * 0.81) * 1.6); add('arm.l', 0, 0, Math.sin(t * 1.28) * 4.5); |
