Section 4/4:去掉 intensity 后的最终设计
[表现:emotion]
或
[表现:emotion,动作:action]
| emotion | action(可选) | blendshape 权重 | |
|---|---|---|---|
| 取值范围 | joy, sad, surprised, angry, neutral | wave, nod, celebrate, surprised_react | 统一 0.7(有 emotion 时) |
正则简化为 ^\[表现:(\w+)(?:,动作:(\w+))?\]\n?
BehaviorParser.Feed() 返回 (text, emotion, action),buffer 上限 60 字节
emit chat:behavior → {emotion: "joy", action: "wave"}(action 空串即纯情绪)
保留旧 chat:emotion 兼容(Live2D 暂时继续消费)
监听 chat:behavior 替代 VRMPet 内的 useEmotionEvents
applyBehavior({emotion, action}) 替代 applyEmotion():
petState watch 瘦身:只负责 mouth blendshape(speaking)、error 表情、idle 时清除 emotion
聊天空时从前端 emit chat:emotion(兼容事件)→ Live2DPet 现有的 useEmotionEvents 继续工作,无需改动。