Skip to content

feat: interactive agent-swarm intro (GSAP redesign)#65

Open
joyehuang wants to merge 1 commit into
mainfrom
claude/magical-shockley-25067e
Open

feat: interactive agent-swarm intro (GSAP redesign)#65
joyehuang wants to merge 1 commit into
mainfrom
claude/magical-shockley-25067e

Conversation

@joyehuang

Copy link
Copy Markdown
Owner

概要

用 GSAP 重写主页入场动画:从"看一段扩散动画"变成"一个可以上手把玩的群体智能玩具"。

叙事即机制:每个粒子是一个 agent,群体的共同目标是拼出文字。访客可以随意扰动这个系统 —— 它永远会自组织收敛回目标。顶部 HUD 实时汇报群体状态(assembling… / re-organizing… / converged ✓),扰动和自愈的过程是真实发生的,不是贴标签。

交互(把玩点)

手势 效果
拖动 流体搅动:粒子继承光标速度,快扫大乱、慢扫轻抚
按住 引力漩涡:粒子被吸入旋涡,松手弹回 + 释放脉冲
单击 冲击波环,径向脉冲扫过字形
双击 / 底部 chips 换词 morph(JOYE → 你好 → AGENT → BUILD),从点击处波浪式扩散重组
闲置 5 秒 一个紫色 scout agent 自己溜进来逛,扰动粒子勾引你动手

光标本身是自绘的能量环(蓄力时膨胀);进入时全场爆散 + 冲击波退场。

技术

  • GSAP timeline 编排 boot / morph 波 / 冲击波环 / UI stagger / 退场;物理 sim 跑在 gsap.ticker 上(弹簧 + 阻尼 + 湍流)
  • 保留原有行为:session 门控、prefers-reduced-motion 禁用、跳过、重播、/en 文案(EN 词组用 HELLO 替代你好)
  • 收敛后粒子间浮现 neighbor-link 网格(电路板质感)
  • 新增分析事件 intro_enter(action/word/duration_ms/interactions/morphs)和 intro_replay,契约已写入 ANALYTICS.md

验证

  • bun run check 0 errors
  • 本地 dev 全流程实测:boot 聚合 → converged HUD → 双击 morph 到"你好"(附截图)→ enter 爆散退场露出主页 → 重播按钮重跑
  • 无 console 错误

🤖 Generated with Claude Code

Replace the passive diffusion intro with a playable swarm: every particle
is an agent whose shared goal is to spell a word, and the visitor can
perturb the system any way they like — it always self-organizes back.

- drag stirs the field (particles inherit cursor velocity)
- press-and-hold creates a gravity vortex; release snaps back
- click/tap fires a shockwave ring with radial impulse
- double-click or goal chips morph the word (JOYE / 你好 / AGENT / BUILD,
  EN locale gets HELLO instead of 你好) as a wave from the click origin
- idle 5s spawns a scout agent that wanders in and stirs the field
- live HUD reports swarm status (assembling / re-organizing / converged)
- GSAP drives boot timeline, morph waves, rings, UI staggers, exit burst;
  the physics sim runs on gsap.ticker

Keeps parity: session gate, prefers-reduced-motion, skip, replay, locale
strings. Adds intro_enter / intro_replay events to the analytics contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 2, 2026 3:49pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant