Skip to content

About

绒绒星球:适配移动端的电子萌宠网页

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

绒绒星球 v4.5 — 生命循环动画

五角色同屏轻养成网页游戏。v4.5 只重构糯团的 PixiJS 表现层,不修改金币、等级、存档、商店、任务、图鉴、成就或人格数据结构。

本地运行

python -m http.server 8765

打开 http://127.0.0.1:8765/。

Character Animation Engine

js/pixi/lifeAnimationController.js 在现有单一 Pixi ticker 中并行合成六个控制器:

  • BreathingController:3–5 秒随机扰动呼吸,scaleY 按 1 → 0.995 → 0.99 → 0.995 → 1 循环;每 5–10 秒缓慢改变重心。
  • EyeController:3–8 秒自然眨眼、100–200ms 闭眼和左右视线微移。
  • EarController:±5° 自然耳动及低频耳朵抽动。
  • TailController:根据糯团高粘人性格持续摆尾,并接受情绪与动作频率加成。
  • EmotionController:将 joy、sleepy、shy 作为连续数值混合到呼吸、表情、弹动和尾巴通道。
  • ActionController:每个动作都经过 anticipation → action → settle,并用 easing 在动作及中断之间混合。

动作不再独占角色。开心表现为正常呼吸、情绪弹动、眼睛、嘴角、尾巴和粒子的同时叠加。

微动作池

每 8–24 秒低频触发一次,保证 30 秒内出现:

  • blink
  • glance_left
  • glance_right
  • ear_twitch
  • tail_follow
  • groom
  • tiny_yawn
  • sit_adjust
  • curious

原有 10–30 秒主动生命行为继续通过同一 ActionController 排队混合,不创建额外动画循环。

验证

node tests/smoke.cjs
node tests/pixi-smoke.cjs
node tests/personality-smoke.cjs
node tests/life-smoke.cjs
node tests/animation-engine-smoke.cjs

animation-engine-smoke.cjs 加速运行完整 10 分钟生命循环,验证至少 20 次微动作、全部九种微动作、持续眨眼/呼吸、三阶段动作以及无逐帧跳变。

项目为纯静态站点,入口为根目录 index.html,兼容 GitHub Pages 项目路径部署。

About

绒绒星球:适配移动端的电子萌宠网页

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages