lower-body.js
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// lower-body.js — lower_body 轨道动作(腿/胯)。
// hip 归 lower_body,使「跪下」等下肢动作能同时降低胯部(下沉身体)+ 折叠腿。
/** @type {Record<string, import('../types.js').AnimationClip>} */
export const LOWER_BODY_CLIPS = {
'leg.stand_together': {
id: 'leg.stand_together', track: 'lower_body', kind: 'pose', duration: 0,
bones: { thigh_l: [{ t: 0 }], thigh_r: [{ t: 0 }], shin_l: [{ t: 0 }], shin_r: [{ t: 0 }] },
},
'leg.stand_apart': {
id: 'leg.stand_apart', track: 'lower_body', kind: 'pose', duration: 0,
bones: {
thigh_l: [{ t: 0, drot: 11 }], thigh_r: [{ t: 0, drot: -11 }],
shin_l: [{ t: 0, drot: -5 }], shin_r: [{ t: 0, drot: 5 }],
},
},
// 走路(基准朝向状态下向屏幕左 -x 行进;facing 镜像翻到另一侧):
// 两个易错点都已校正:
// 1) 支撑腿伸直留地面、随身体往后(+x)蹬;摆动腿屈膝把脚明显抬离地面(否则「地面滑」=月球漫步)。
// 2) 摆动脚必须在「后侧」抬起、再向「前(行进方向)」荡落 —— 若在前侧抬起会变成「倒着走」。
// 故 shin 与 thigh 的方向需一致镜像(本组为向左行进版本)。
'leg.walk': {
id: 'leg.walk', track: 'lower_body', kind: 'loop', duration: 760,
bones: {
thigh_r: [{ t: 0, drot: 16 }, { t: 0.5, drot: -16 }, { t: 1, drot: 16 }],
thigh_l: [{ t: 0, drot: -16 }, { t: 0.5, drot: 16 }, { t: 1, drot: -16 }],
shin_r: [{ t: 0, drot: -6 }, { t: 0.5, drot: -6 }, { t: 0.72, drot: -72 }, { t: 1, drot: -6 }],
shin_l: [{ t: 0, drot: -6 }, { t: 0.22, drot: -72 }, { t: 0.5, drot: -6 }, { t: 1, drot: -6 }],
},
},
// 跪下:降低胯部使身体下沉(hip dy),双膝落地(大腿近竖直略外展),小腿向后折叠贴地,上身保持直立。
'leg.kneel': {
id: 'leg.kneel', track: 'lower_body', kind: 'pose', duration: 0,
bones: {
hip: [{ t: 0, dy: 132 }],
thigh_l: [{ t: 0, drot: 6 }],
thigh_r: [{ t: 0, drot: -6 }],
shin_l: [{ t: 0, drot: -88 }],
shin_r: [{ t: 0, drot: -88 }],
},
},
}