chobit/shared/godot/data/gesture_defs.gd
2026-03-28 21:13:48 -07:00

70 lines
1.4 KiB
GDScript

class_name GestureDefs
extends RefCounted
## Data-driven gesture definitions for idle animation.
## bones: dict of output_name -> amplitude (float) or VRM bone -> euler degrees (Vector3)
## triggers: optional array of side-effects ("deep_breath", "slow_blink")
## disengage_gaze: whether to pause cursor tracking during gesture
static func create() -> Dictionary:
return {
"stretch":
{
"duration": 3.0,
"cooldown": Vector2(15.0, 30.0),
"disengage_gaze": true,
"bones":
{
"chest_y": 0.01,
"shoulder_l": -0.06,
"shoulder_r": -0.06,
},
},
"settle":
{
"duration": 2.0,
"cooldown": Vector2(10.0, 20.0),
"disengage_gaze": true,
"bones":
{
"hips_x": 0.04,
"shoulder_l": 0.03,
"shoulder_r": -0.025,
},
"use_side": true,
},
"curious":
{
"duration": 2.5,
"cooldown": Vector2(12.0, 25.0),
"bones": {"head_roll": 0.1, "head_yaw": 0.06},
"use_side": true,
},
"sigh":
{
"duration": 3.5,
"cooldown": Vector2(20.0, 40.0),
"disengage_gaze": true,
"triggers": ["deep_breath", "slow_blink"],
"bones": {"shoulder_l": 0.04, "shoulder_r": 0.04},
},
"wave":
{
"duration": 2.5,
"cooldown": Vector2(999.0, 999.0),
"bones":
{
"RightUpperArm": Vector3(20, 0, -80),
"RightLowerArm": Vector3(0, -100, 0),
},
"oscillations":
[
{
"bone": "RightHand",
"axis": Vector3.UP,
"freq": 3.0,
"amp_deg": 30.0,
},
],
},
}