aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/animation.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 13:51:53 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 13:51:53 +0900
commit7892cc6f46cdfcd6dfbbdc94d34cbf0c68f29fba (patch)
treecc353614365d2a2b56055b46e8b3c9e8d930ad12 /public/bluebey-studio/src/animation.js
parentc3046436182754c550d447d689c28af86d06b316 (diff)
public/bluebey-studio: 寝ているポーズと鼻ちょうちんを追加し、動きを修正
- ポーズ例に「ねている」を追加(体を横に倒した姿勢) - 「顔」タブに「鼻ちょうちん」を追加。鼻の横に泡を描き、大きさ・位置 ・色を調整できる。寝ている顔に使う - 「歩く」の腕と脚の位相を逆にし、右手が前に出るときは左足が前に出る ように修正 - 「てをふる」の腕の上げ幅を抑え、手が顔にめり込まないように修正
Diffstat (limited to 'public/bluebey-studio/src/animation.js')
-rw-r--r--public/bluebey-studio/src/animation.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/public/bluebey-studio/src/animation.js b/public/bluebey-studio/src/animation.js
index 47f1cfb..3233e43 100644
--- a/public/bluebey-studio/src/animation.js
+++ b/public/bluebey-studio/src/animation.js
@@ -97,7 +97,9 @@ export class Animator {
// wants. X (which the first version used) is the *lift*, so opposite signs
// there just raised one flipper and dropped the other one.
// `legsupport` pivots at the middle of the body, so the legs take a much
- // smaller angle than the arms.
+ // smaller angle than the arms. The legs swing on the OPPOSITE phase to the
+ // arms, so when a hand comes forward it is the opposite foot that steps out
+ // (the same value as the arms put them in step, i.e. a "same-side" waddle).
const phase = Math.sin(t * 2.4);
const bob = Math.abs(Math.sin(t * 2.4));
add('master', -2, 0, phase * 4);
@@ -105,8 +107,8 @@ export class Animator {
add('arm.r', 6, 0, phase * 26);
add('hand.l', 0, 0, phase * 10);
add('hand.r', 0, 0, phase * 10);
- add('legsupport.l', 0, 0, phase * 9);
- add('legsupport.r', 0, 0, phase * 9);
+ add('legsupport.l', 0, 0, -phase * 9);
+ add('legsupport.r', 0, 0, -phase * 9);
root[1] += bob * 0.05;
return { bones, root };
}
@@ -114,10 +116,13 @@ export class Animator {
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.
+ // lift is kept modest: raising the arm much further folds the flipper over
+ // the top of the head, where its inner edge cuts into the face, so the X
+ // here (and its swing) stop well short of that. The Z swing is what reads
+ // as the wave, and it is biased slightly *back* for the same reason.
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.l', 66 + wave * 8, 0, 6 + wave * 10);
+ add('hand.l', 0, 0, Math.sin(t * 3.2 + 0.6) * 14);
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 };