[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110931":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":15,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":32,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":36,"discoverSource":37},110931,"grokbot-animation-anatomy","ArvinYin1\u002Fgrokbot-animation-anatomy","ArvinYin1","Grok Bot 头像动画引擎的逆向解剖：可交互讲解页 + 动画编辑器（程序化 SVG \u002F 贝塞尔 clip \u002F 弹簧 \u002F 球面眼睛），0 依赖 0 构建 · Reverse-engineered anatomy of the GrokBot avatar animation engine — interactive explainer + editor, zero-dependency procedural SVG","https:\u002F\u002Fgrokbot.yin.wiki\u002F",null,"JavaScript",73,12,51,2,0,9,21,46.94,false,"main",true,[24,25,26,27,28,29,30,31],"animation","animation-engine","grokbot","interactive-explainer","javascript","procedural-animation","reverse-engineering","svg","2026-10-21 07:12:04","2026-11-23 16:33:38","# GrokBot Animation Anatomy\n\n[English](README.md) | [中文](README.zh-CN.md)\n\nAn interactive explainer dissecting the **GrokBot avatar animation engine** — how the Grok Bot macOS app (Electron) animates its avatar with zero animation libraries, and why its procedural-SVG approach beats Lottie, video\u002FGIF, WebGL shaders and CSS animation for a living, interactive character.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fhero.gif\" width=\"260\" alt=\"GrokBot avatar idling — every frame computed at runtime\">\n  &nbsp;&nbsp;&nbsp;\n  \u003Cimg src=\"docs\u002Fmedia\u002Fstates.gif\" width=\"260\" alt=\"State switching: idle → thinking → waiting → idle, with spring-driven decor\">\n\u003C\u002Fp>\n\nThe page practices what it preaches: **0 third-party runtime dependencies, 0 build step** — plain HTML + CSS + native ES modules, every demo computed live. The showcase bots (hero and sections 01\u002F03\u002F05\u002F07\u002F08) run `js\u002Fvendor\u002Fgrok-player.js`, a faithful line-level port of the original engine, driven by `js\u002Fvendor\u002Fgrok-recipes.json` (animation data extracted from the local app).\n\nThere's also an **[animation editor](https:\u002F\u002Fgrokbot.yin.wiki\u002Feditor.html)**: a clip\u002Fstate editor built on the same engine — visual keyframe tracks (position \u002F rotation \u002F squash \u002F scale \u002F lids \u002F expression), draggable keyframe diamonds, per-keyframe Bézier easing editor, state config (face \u002F morph \u002F next \u002F holdSeconds), live preview in the real engine, and JSON export in the engine's native format.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fgallery.png\" width=\"49%\" alt=\"State gallery — all 53 states running live engine instances\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Feditor.png\" width=\"49%\" alt=\"Animation editor — timeline, keyframes, easing editor, live engine preview\">\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fclip-lab.png\" width=\"49%\" alt=\"Cubic-Bézier playground and live clip track inspector\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fstate-machine.png\" width=\"49%\" alt=\"State machine demo with transition-anatomy timeline\">\n\u003C\u002Fp>\n\n## Live demo \u002F Run\n\nGitHub Pages: **https:\u002F\u002Fgrokbot.yin.wiki\u002F**\n\nOr run locally (ES modules require HTTP, don't open the file directly):\n\n```bash\npython3 -m http.server 8000\n# open http:\u002F\u002F127.0.0.1:8000\u002F\n```\n\n## What's inside\n\n- **Every frame is computed** — procedural SVG + a DOM-diff writer, with a live attribute panel\n- **Shape morph: radial outline interpolation** — 192 ray samples, per-angle lerp, sampling-density comparison\n- **Choreography in Bézier: clip keyframes** — 28 hand-authored clips × 6 tracks, cubic-bezier easing with out-of-range overshoot; draggable-curve playground + a live track inspector synced to the running engine\n- **Springs, not timers** — a 120 Hz semi-implicit Euler integrator playground vs ease-out\n- **Where the springs live** — live measured curves of the amount \u002F swap \u002F spin spring trio during state switches\n- **Pseudo-3D: the eyes live on a sphere** — Rodrigues rotation + orthographic projection, flat-vs-sphere comparison\n- **Blinks & liveliness** — blinks are clip-embedded keyframe events (0.26 s, closed at 45%) + imperative `blink()`; no ambient scheduler exists in the original bundle\n- **State machine & recipe shuffle** — 53 states, seeded-PRNG clip shuffle with random phase; plus a transition-anatomy timeline (Bézier bridge vs measured springs)\n- **State gallery** — all 53 states running live engine instances on one page, filterable by the five lifecycle groups, click to poke\n- **Head-to-head comparison** — procedural SVG vs Lottie vs video\u002FGIF vs WebGL vs CSS, plus a decision wizard\n\n## Repository layout\n\n- `index.html` + `js\u002Fsections\u002F` — the explainer page, one ES module per section\n- `shapes.html` — the shape-system explainer\n- `workshop.html` — the shape workshop (add-your-own-shape guide + playground)\n- `editor.html` + `js\u002Feditor.js` — the animation editor\n- `glow.html` + `js\u002Fglow.js` — Glow Lab: the pseudo-3D look comes from fill, not geometry\n- `design-system\u002F` — site-wide design tokens, components, shared shell and per-page CSS (zero build, hand-written)\n- `js\u002Fvendor\u002Fgrok-player.js` — line-level port of the original engine (browser ESM, zero deps)\n- `js\u002Fvendor\u002Fgrok-recipes.json` — animation data extracted from the app: 28 clips, 53 states, 9 expressions, 25 shapes, all constants\n- `tools\u002Fverify-frame.mjs` — frame-by-frame numeric regression of the port against the original engine\n- `tools\u002Fextract-recipes.mjs` — extraction script for the animation data\n- `tools\u002Fcapture\u002F` — deterministic frame renderer used to produce the README GIFs\n- `docs\u002Fmedia\u002F` — README assets (every one captured from the running port, not hand-drawn)\n\n## Source\n\nAll findings come from static analysis of the unpacked `app.asar` of Grok Bot (Electron, macOS), for study and research only. `js\u002Fvendor\u002Fgrok-player.js` is a **re-written port** of the engine logic (line-level, frame-verified against the original); `js\u002Fvendor\u002Fgrok-recipes.json` is **animation data extracted from the local app** (clip keyframes, state registry, expressions, constants). The underlying design and data remain the property of their original owners; this material is published for study only and will be taken down on request. Grok and x.ai trademarks belong to their owners.\n\nSee also: [bloub](https:\u002F\u002Fgithub.com\u002Fjeremy-prt\u002Fbloub) — another independent recreation, measured frame-by-frame from video.\n\n## License\n\nMIT\n","这是一个对 Grok Bot 头像动画引擎的逆向解析与交互式教学项目，提供可运行的动画原理讲解页和轻量级 SVG 动画编辑器。核心功能包括程序化 SVG 渲染、贝塞尔曲线驱动的裁剪动画（clip）、物理弹簧系统（120Hz 半隐式欧拉积分）、球面眼睛投影与动态眨眼机制，全部基于原生 JavaScript 实现，无第三方依赖、无构建流程。适用于前端动画原理学习、SVG 高性能交互设计、轻量级头像动效开发等场景。","2026-11-24 04:40:00","CREATED_QUERY"]