---
catalog_id: "P-014"
kind: "pattern"
domain: "frontend"
domain_label: "前端动效 / Frontend & Motion"
date: "2026-11-27"
title: "手绘像素风格化、参考动效逐帧逆向复刻与多运行时确定性寻帧闭环（Hand-Drawn/Pixel Stylization, Animation Remake & Deterministic Stepping Loop）"
verdict: "手绘像素四通道风格化、逆向逐帧复刻与多引擎离线寻帧闭环"
summary: "贯通手绘墨线/日式作画/CPU双缓冲像素四通道风格化、参考动画跨Worker逆向复刻与4,288动作实测去机械门禁、GSAP/Motion/R3F/Theatre.js离线寻帧契约及Claude插件209文件合规扇出的全链路闭环。"
summary_en: "Unifies 4-channel hand-drawn/pixel stylization, frame-level motion remakes, and offline seeking contracts across GSAP, Motion, R3F, and Theatre."
canonical_url: "https://oumuatown.com/patterns/hand-drawn-pixel-stylization-and-animation-remake-loop/"
markdown_url: "https://oumuatown.com/patterns/hand-drawn-pixel-stylization-and-animation-remake-loop.md"
og_image_zh: "https://oumuatown.com/og/zh/P-014.png"
og_image_en: "https://oumuatown.com/og/en/P-014.png"
cite_count: 54
tags:
  - "pattern"
  - "hand-drawn-animation"
  - "pixel-art"
  - "motion-cloning"
  - "anti-slop"
  - "deterministic-rendering"
  - "gsap"
  - "motion"
  - "react-three-fiber"
  - "theatrejs"
  - "claude-code-plugin"
github_repos:
  - "https://github.com/patch-gg/pixelfx/tree/5294518"
  - "https://github.com/tejashmakwana/motionmaxxing/tree/8c8ec0f"
  - "https://github.com/niazmorshed2007/reanimate/tree/3f7a55a"
  - "https://github.com/remotion-dev/claude-code-plugin/tree/f96c742"
  - "https://github.com/greensock/gsap/tree/5e6c35f"
  - "https://github.com/motiondivision/motion/tree/6390e6d"
  - "https://github.com/theatre-js/theatre/tree/6ea82b9"
  - "https://github.com/pmndrs/react-three-fiber/tree/d74622e"
  - "https://github.com/ahujasid/mcp-for-blender/tree/7f31a46"
  - "https://github.com/heygen-com/hyperframes/tree/61cea64"
  - "https://github.com/jdhruv14/line-art-animation/tree/c43d698"
  - "https://github.com/finktheartist/sakuga-vfx/tree/c3dabb1"
  - "https://github.com/rough-stuff/rough/tree/56a2762"
  - "https://github.com/nutlope/hallmark/tree/04977e1"
  - "https://github.com/greensock/gsap-skills/tree/aed9cfd"
  - "https://github.com/remotion-dev/skills/tree/a3f4098"
---

# P-014 · 手绘像素风格化、参考动效逐帧逆向复刻与多运行时确定性寻帧闭环（Hand-Drawn/Pixel Stylization, Animation Remake & Deterministic Stepping Loop）

> **结论 / Verdict**: 手绘像素四通道风格化、逆向逐帧复刻与多引擎离线寻帧闭环
> **EN Summary**: Unifies 4-channel hand-drawn/pixel stylization, frame-level motion remakes, and offline seeking contracts across GSAP, Motion, R3F, and Theatre.

## Provenance & Evidence

- Referenced Repository: https://github.com/patch-gg/pixelfx/tree/5294518
- Referenced Repository: https://github.com/tejashmakwana/motionmaxxing/tree/8c8ec0f
- Referenced Repository: https://github.com/niazmorshed2007/reanimate/tree/3f7a55a
- Referenced Repository: https://github.com/remotion-dev/claude-code-plugin/tree/f96c742
- Referenced Repository: https://github.com/greensock/gsap/tree/5e6c35f
- Referenced Repository: https://github.com/motiondivision/motion/tree/6390e6d
- Referenced Repository: https://github.com/theatre-js/theatre/tree/6ea82b9
- Referenced Repository: https://github.com/pmndrs/react-three-fiber/tree/d74622e
- Referenced Repository: https://github.com/ahujasid/mcp-for-blender/tree/7f31a46
- Referenced Repository: https://github.com/heygen-com/hyperframes/tree/61cea64
- Referenced Repository: https://github.com/jdhruv14/line-art-animation/tree/c43d698
- Referenced Repository: https://github.com/finktheartist/sakuga-vfx/tree/c3dabb1
- Referenced Repository: https://github.com/rough-stuff/rough/tree/56a2762
- Referenced Repository: https://github.com/nutlope/hallmark/tree/04977e1
- Referenced Repository: https://github.com/greensock/gsap-skills/tree/aed9cfd
- Referenced Repository: https://github.com/remotion-dev/skills/tree/a3f4098
- Verified Source Citations (#Lxx): 54
- Web Reader: https://oumuatown.com/patterns/hand-drawn-pixel-stylization-and-animation-remake-loop/

# 手绘像素风格化、参考动效逐帧逆向复刻与多运行时确定性寻帧闭环（Hand-Drawn/Pixel Stylization, Animation Remake & Deterministic Stepping Loop）

## 触发场景（When to Use）

- **什么时候应当采用本模式**：
  - 使用代码生成面向营销/科普/游戏展示的手绘墨线、日式作画（Sakuga）或复古像素风动画短片，或需要在浏览器的 `GSAP`、`Motion`、`React Three Fiber`、`Theatre.js` 之间为不同场景选择正确运行时并完成离线确定性 MP4/图集导出（衔接 [deterministic-code-film-contract](../patterns/deterministic-code-film-contract.md)）。
  - 需要对已有优质网页、WebGL/WebGPU 动效或参考视频做精确到毫秒和缓动曲线的 1:1 逆向克隆，或清除 LLM 默认代码动画中常见的“PPT 翻页、等速直线漂移、HUD 角标、紫蓝光晕与 AI 自我宣判通过”等机械感（衔接 [anti-ai-slop-design-and-numeric-prompts](../patterns/anti-ai-slop-design-and-numeric-prompts.md)）。
  - 需要把含可执行脚本/地理数据的多媒体 Agent Skill 编译分发到 Claude Code `/plugin` 等受限插件市场，同时守住多宿主文件上限与 Blender/HyperFrames 安全护栏（衔接 [agentic-video-and-3d-toolchain-matrix](../patterns/agentic-video-and-3d-toolchain-matrix.md)）。
- **什么时候不该用（过度设计信号）**：
  - 纯内部 CRUD 管理后台或一次性静态海报，无需引入 `pixelfx` 双缓冲光栅、`reanimate` 跨 Worker CDP 追踪或 `Theatre.js` 关键帧工程；常规交互网站直接遵守 `greensock/gsap-skills` 与 `Motion` 默认合成器管线即可。

## 问题本质

- **为何手写/AI 直出的矢量代码片总有“塑料机械感”**：干净矢量与默认 CSS/GSAP 样板缺失物理顿挫（如 `12fps` 抽帧与 `>= 120 Hz` 子步）、亚像素抗锯齿会糊掉像素边缘、且大模型缺乏实测运动统计先验（退化成 `scale: 0` 放大、逐字打字机标题、均速直线与过长淡入）。
- **为何“看截图盲调”与“普通虚拟时钟录屏”频频翻车**：参考动效的真实节奏与 3D Uniform 靠肉眼估算必然失真；而跨运行时离线抓帧时，`Motion` v14 的 `TransformGroup` 会直接绕过 `element.animate`、`batcher` 会以 `maxElapsed = 40ms` 钳位增量时间、`R3F` 默认在分支卸载时异步 `.dispose` 共享几何体、`Theatre.js` 主干 `main@6ea82b9` 尚未完成 `Saaz` 持久化重构——若不按运行时特性显式注入确定性接管协议，渲染必现跳帧、漏帧或黑屏。

## 标准解法与最小实现骨架

### 1. 手绘墨线、日式作画与 CPU 双缓冲复古像素风格化

按表现媒介将浏览器纯代码视觉分化为**四条零外部资产风格通道**（均已由 `2026-11-27` 源码核验）：

| 视觉通道 | 代表仓库（`owner/repo@sha`） | 核心渲染与运动原语 | 确定性 / 导出关键边界 |
|---|---|---|---|
| **复古像素 VFX 与 3D IK 演武** | [`patch-gg/pixelfx@5294518`](../repos/patch-gg__pixelfx.md) | `color`（小端 `ABGR`）+ 加性 `light` 双 `Uint32Array`；`4×4` Bayer 硬抖动；`12fps` 抽帧双骨 `ik` + `out.src` 贴身搬运 | 全程整像素坐标 + `>= 120 Hz` 子步 + Murmur `hash`/`Rng`；`edgeFade(frame, 8)` 消切片黑框，`check.mjs` 自动化守门 |
| **钢笔手绘角色循环** | [`JDhruv14/line-art-animation@c43d698`](../repos/JDhruv14__line-art-animation.md) | `gait.ts` 零滑步生物力学逆解 + 2 骨 IK + 开放双线 `limb` + 昼夜反色 | 锁定二维侧视与约 `95` 单位身高；`?debug` + `window.__step(s)` 步进，`spring` 显式欧拉要求 `dt <= 0.05` |
| **日式作画（Sakuga）冲击特效** | [`finktheartist/sakuga-vfx@c3dabb1`](../repos/finktheartist__sakuga-vfx.md) | 全页前景 + 局部背层双 Canvas、子步阻塞 `Spring`、4 拍反色打击帧 + Potrace 拟声词 | 通过 `SakugaFX.paused` + `advance(1/60)` 接管时钟；留意局部 `backLayer` 默认高 `z-index` |
| **铅笔/墨水矢量草图抖动** | [`rough-stuff/rough@56a2762`](../repos/rough-stuff__rough.md) | `RoughGenerator -> OpSet -> Canvas/SVG` 后端无关 IR、长度阻尼双笔弓形、6 种扫描线填充 | 沸腾线按 `seed = baseSeed + Math.floor(t * boilFps)`（`6–8 fps`）；避开未种子化 `Math.random` 的 `DotFiller` |

在像素级风格化与角色打击感实现中，直接复用 [`patch-gg/pixelfx@5294518`](../repos/patch-gg__pixelfx.md) 的五条核心机制：
1. **双缓冲软光栅与硬抖动分离**：`createFrame(w, h, ox, oy)` 分配独立的 `color` 与 `light` 两块 `Uint32Array(w * h)` 并通过 `WeakMap` 复用 `Painter`（`src/core/fx.js#L12-L27`）；`Painter.place(x, y, flip, angle)` 在局部原点建立整数仿射映射并经 `each`/`shade` 逐像素着色（`src/core/painter.js#L30-L44,#L108-L135`）。普通图元走 `put` 按 `4×4` `BAYER` 有序抖动阈值直接丢弃半透明像素（`painter.js#L10,#L46-L53`），仅烟雾/尘埃/蒸汽调用 `blendPx`/`disc`（`#L69-L89`）。
2. **透明底图集辉光反解与两端保真调色板**：导出的透明精灵表在 `composite` 中通过 `na = min(1, max(pa, max(lr, lg, lb) / 255))` 反解加性发光 Alpha（`fx.js#L116-L126`，注意仅适配暗背景或拆层合成），并以 Hermite `edgeFade(frame, 8)` 将距边 `8px` 辉光衰减至零防贴片截断框（`tools/lib/fxlib.mjs#L130-L143`）；调用方传入任意长度 `palette` 时由 `fit(r, n)` 保真两端重采样到期待步长，再由 `at(r, t)` 离散索引 27 套色相偏移色阶 `PAL`（`src/core/color.js#L37-L83`）。
3. **120 Hz 物理子步与无缝循环噪声**：`createFx` 对动态粒子/刚体 `update(dt)` 强制细分至 `Math.max(1, Math.ceil(dt * 120 - 1e-9))`（`>= 120 Hz`，`fx.js#L63-L69`），配合 Murmur 雪崩整数 `hash`/`mulberry32` 状态机 `Rng` 及周期平铺噪声 `tileNoise`/`tileFbm`/`loopNoise(phase)`（`src/core/math.js#L54-L152`），保证 30fps 导出图集与 144fps 游戏运行弹道一致。
4. **`12fps` 抽帧骨架与 `out.src` 贴身效果迁移**：`poseAt` 将四肢关节插值量化至 `12fps` 阶梯而保持脚部全局移动顺滑（`src/core/act.js#L30-L51`）；`rig.js` 在 `300×240` 暂存 Z-Buffer 上执行双骨解析 `ik`（16 方位搜索持握极向量）、4 阶卡通色阶量化与 `INK`/`SEAM` 描边（`src/core/rig.js#L112-L158,#L355-L428`），并将每个像素反投影回 `24×38` 站立原图索引存入 `out.src`（`rig.js#L406-L412`）；`onBody: true` 特效由 `act.js` 通过明暗比例保真函数 `carry`（`#L189-L195,#L369-L435`）无缝贴合奔跑/挥砍骨骼，并用 `actTiming` 导出前摇/命中/恢复 JSON（`#L454-L466`）。
5. **四重自动机检门禁（`tools/check.mjs#L26-L165`）**：静态拦截 `Math.random`；分配外扩 `M = 24px` 哨兵画布多随机种子抓越界溢光；断言循环首尾跳变 `seam <= max(typical*2, 12)` 且非循环末帧清零；Monkey-Patch `Painter.prototype.put` 注入 4 色短调色板查越界 `undefined`/`NaN`；校验双跑逐像素一致与单帧中位耗时 `<= 4ms`（附 `act` 手腕够不到 `shortfall > 3.5` 与单帧瞬移 `>30px` 检测）。

---

### 2. 参考动效逐帧逆向克隆、实证运动去机械门禁与多 Agent 导演成本护栏

#### 2.1 参考动画 1:1 逆向克隆闭环（[`NiazMorshed2007/reanimate@3f7a55a`](../repos/NiazMorshed2007__reanimate.md)）
1. **三档量化交付契约**（`skills/reanimate/SKILL.md#L12-L20,#L83-L94`，`references/verify.md#L18-L41`）：先定档立约并在 **`<= 5` 轮**验证内收敛，严禁口头自评：
   - **`motion-faithful`（默认）**：起止与时长误差 `<= 0.08s`、缓动族一致且 `RMSE <= 0.05`、位移误差 `<= 10%`；
   - **`pixel-faithful`**：平均像素失配 `<= 2%`、峰值 `<= 5%`、静止帧 `<= 0.5%`；
   - **`mixed`**：结构与运动窗口对齐 + 关键过渡帧像素核验。
2. **四层同序探针 + CDP 跨 Worker 确定性时钟**：`capture.ts#L346-L350` 按 `CTX_PROBE -> inpage/clock.js -> inpage/gl-hooks.js -> TRACKER` 顺序注入；`clock.js#L117-L248` 在接管时间 API 与 `AnimationTimeline.currentTime` 时，超 `endTime` 主动调用 `a.finish` 触发 Framer Motion `finished` Promise，并在每个 `advance(ms)` 间用 `MessageChannel` 让出微任务使 React 状态落盘；针对不走 `addInitScript` 的 Web Worker，`capture.ts#L358-L390,#L536-L559` 通过非扁平 CDP `Target.setAutoAttach({ waitForDebuggerOnStart: true, flatten: false })` 在首行前注入盐值种子 `seed + 7919*(idx+1)`，结束时依 `__mcClock.history` 将真实时间戳折算回虚拟轴。
3. **5 大 3D 引擎透视与通道语义分类**：`gl-hooks.js#L84-L590` 截获 WebGL1/2/`OffscreenCanvas` 的 `(program, ord)` 增量 Uniform 变化、重写 `Response.prototype.blob`/`createImageBitmap` 保住异步贴图原 URL、并直连 Three.js（`__THREE_DEVTOOLS__`/`ObjectLoader`）、PixiJS、PlayCanvas、Babylon.js、OGL 场景树及 WebGPU（`<= 1024B` `writeBuffer`）/Canvas 2D（每 15 帧详单）；`gl.ts#L19-L235` 自动将序列归类为 `clock`（线性 `R² > 0.995`）、`transition`、`there-and-back`、`oscillation`（`>=3` 拐点且活跃度 `>60%`）或 `steps`。
4. **自由声明时长拟合与去品牌自差分验收**：针对 `easeOutExpo`/`Quint` 长尾导致视觉静止早于声明时长，`easing.ts#L101-L128` 在 `[1.0x, 2.0x]`（步长 `0.05`）联合搜索 `durationMs` 最小化 `cubic-bezier` RMSE（过冲 `>2%` 转阻尼春振反推 `ζ`/`stiffness`，`implementation.md#L18`）；`compare.ts#L82-L170` 用自差分活动度曲线 `activity(imgs)`（相邻帧自身变动像素占比 `mismatch(imgs[i-1], imgs[i])`）剥离文案/品牌色验证运动窗口，并配合双遍可分离盒式均值模糊 `--blur R` 度量非同源随机粒子分布密度。

#### 2.2 商业动效去机械实证规律与双脚本不可辩解门禁（[`Tejashmakwana/motionmaxxing@8c8ec0f`](../repos/Tejashmakwana__motionmaxxing.md) + [`Nutlope/hallmark@04977e1`](../repos/Nutlope__hallmark.md)）
基于 50 个商业人类样片（**4,288 个实测动作**）提炼硬规律与机器门禁，杜绝“AI 自证干净”：
- **实测运动学铁律**（`references/motion.md#L15-L259`、`references/type.md#L45-L48`、`runtime/motion.js#L19-L91,#L273-L495`）：
  1. **中位极短、缓动以稳为主**：全样本中位时长仅 **`10 帧`（`0.33s @30fps`）**，CTA 辅助动效缩至 **`6 帧`**；12 条聚类缓动 `M.ease.*`（`89%` `RMSE <= 0.12`）中主力是平滑减速的 `softLand`（`expoOut(3.41)`, 12f）与 `glide`（`powerOut(1.7)`, 10f），`snapSettle` 总体仅占 `8%`（在 CTA 才升至 `23%`）。
  2. **进退不对称与过冲配额**：进场 `58%` 减速停靠且以位移/缩放入场为主（3,392 次对仅 584 次纯透明度渐变）；身份元素（Logo `3.5–3.75x`、光标 `1.5–5x`）必须从超尺寸减速落回，**严禁从 `scale: 0` 放大**；退场（`accelExit`/`crashOut`）加速甩出并在峰值速度直接硬切；全样本过冲率 **`<= 8.8%`**（88% 属于晚峰值 `popOver` 在 `t=0.72` 达 `1.08`），**全片最多花费 1 次可见弹簧**。
  3. **呼吸感与反逐字标题**：全片平均帧间亮度差对照人类中位数 **`6.8`（IQR `4.4–9.8`）**，驻留 `>3f` 加 `1–3 px/f` `M.drift`；**严禁标题逐字打字机**（标题用 `M.words` 不等距词间隔 + `0.13–0.28s` 强调色回落），`M.type` 仅限真实产品输入框且必配 `Intl.Segmenter` 与 `cadence` 人类停顿（空格后停 `4–10f`）。
  4. **防二阶 House-Style 套路与非同质化检索**：`references/slop.md#L59-L73` 警觉过度纠偏套路（如每片都裁切巨字开场、每镜圆圈擦除），`scripts/precedent.py#L170-L175` 检索先例强制同一匿名参考片最多命中 1 条，并结合 `Nutlope/hallmark@04977e1` 的 `.hallmark/log.json` 防收敛发牌巩固差异化。
- **四道硬门禁（零豁免，仅准原样抄写脚本读数进 `NOTE.md`）**：
  - **`Motion.selfTest`**（`runtime/motion.js#L532-L557`）：24 帧顺序采样 DOM + `<canvas>` FNV-1a 像素哈希，对比随机洗牌及经 `total/2` 绕行回跳，逐字节零差异（8/8 故障注入检出）；
  - **`lint.mjs` `G5` 时序双采样 DOM Linter**（`scripts/lint.mjs#L203-L317`）：在 `(t, t+0.1s)` 成对取样并用 `stable` 放行掠过过渡帧，拦截角标/章节编号 `C1–C7`、PPT 左右分栏 `D1`、单调进度条 `P1`、逐字标题 `T1`、AI 模板词与 Tailwind Zinc 聚类 `V1–V5`；
  - **`look.py` `G0/G2/G3`**（`scripts/look.py#L90-L375`）：禁止连续 `>3` 帧纯平空帧、末帧静止 `<= 1.4s` 且尾镜占比 `<= 25%`、验证 `±80ms` 音画切点对齐并导出 `sheet.jpg`/`mid.jpg`/`strips.jpg`；
  - **`mix.py` 语音闪避与响度归一**（`scripts/mix.py#L92-L332`）：人声静音包络生成 48kHz WAV 经 `amultiply` 对配乐精确闪避 **`-9 dB`**，双遍归一至 **`-14 LUFS` / `-1 dBTP`**。

#### 2.3 多 Agent 导演室与 Effort 保额护栏（[`@seeconvm` 20 章实证](../articles/2026-11-27-0xnicc0-12-hand-drawn-motion-repos.md)）
- **§15 三大败因与 5 部门导演室**：28 支团队 / ~25,000 次运行 / 471 个世界的实测教训表明——① 仅改名字的相同 Brief 会让 3 个团队独立撞车出相同“动物龙卷风”，子团队目标必须实质差异化；② 12 张静帧盲审面板会诱发过拟合刷分，必须叠全片运动学检查；③ 共享规则膨胀至 204 节 / 87,500 词使产能从 `30+` 跌至 `~12` 世界/天，**共享规则硬限 `<= 40` 行**，隔离独立 `reviewer`，并写死整数上限（`at most 2 render processes`防 3/4 运行拉起 7–10 进程、`at most 3 revisions per shot`）。生产推荐 `{ "advisorModel": "fable" }` 规划纠偏，批处理显式钉死 `claude -p --model sonnet`。
- **§16 Effort 成本账本**：坚持 **`medium`（`$3.80` 静帧定稿）→ 同会话切 `high`（`$9.08` 主力构建，保 `~98%` Prompt Cache）** 路线；`low`（`$3.10`）易保守停机、`xhigh`（`$14.83`）仅作复杂 3D 兜底、**视觉任务严禁盲开 `max`（`$26.54`，近 `High` 3 倍价且实测耗尽 128K 思考 token 零出图或烧出 `$2,618` 通宵账单）**；常规故障按 §19 14 行「症状 → 直接粘贴句」（如 `switch Max to High. Nothing else.`、`Name defaults in a BANS line.`）单次只改 1–2 项精确数值修复。

---

### 3. Web 动效引擎与声明式 3D 场景离线确定性寻帧契约

在 `window.renderAt(t)` 确定性渲染器下，四大前端动效/3D 库存在根本架构差异——**不能用同一套 `VIRTUAL_TIME_SHIM` 笼统假定其均可随机跳帧**：

| 运行时（`owner/repo@sha`） | 核心状态机制与交互优势 | 离线 `renderAt(t)` / 并发切片隐患 | 必选确定性接管协议（`2026-11-27`） |
|---|---|---|---|
| **`greensock/GSAP@5e6c35f`**（`v3.15.1`） | 纯 JS 双向链表 + `GSCache` 矩阵缓存 + 正逆双向遍历；现全套商业插件已免费内置 | 默认 `lagSmoothing(500, 33)` 会压缩超过 `500ms` 的步进；`"random(...)"`/数字 `scrub: 1`/`repeat: -1` 破坏确定性 | `gsap.ticker.sleep` + `gsap.ticker.lagSmoothing(0)` + `tl.pause.totalTime(t, false)` 同步直刷 DOM（配 [`greensock/gsap-skills`](../repos/greensock__gsap-skills.md) 禁 `.npmrc` 私有源与 `useGSAP` 清理） |
| **`motiondivision/motion@6390e6d`**（`v14.14.0`） | 8 阶段读写隔离 `frameloop`、解析解弹簧 + `linear`、`ProjectionNode` `treeScale` 逆缩放、`AnimatePresence` `popLayout` | ① `TransformGroup` 直调 `new Animation(new KeyframeEffect(...))` **绕过 `element.animate`**；② `batcher` 默认 `maxElapsed = 40ms` 且无全局 root timeline；③ `DOMKeyframesResolver` & 布局动画有 **1 帧异步延迟** | 挂载前设 `MotionGlobalConfig.useManualTiming = true`（或同步拦截 `window.Animation` + `document.getAnimations`）、预跑 `1–2` 次 rAF 预热解析，再从 `t = 0` 以 **`dt <= 40ms`** 单调递增步进（不宜多 Worker 乱序冷跳） |
| **`pmndrs/react-three-fiber@d74622e`** | React 19 延迟构造 + `Zustand` `useFrame` 优先级队列（`priority > 0` 移交 `gl.render`）+ 冒泡遮挡拾取 | ① `advance(timestamp)` **直接赋值 `elapsedTime = timestamp`（秒制**，与 XR 毫秒相反）；② 缺省 `preserveDrawingBuffer: false` 异步截图黑屏；③ 分支卸载时未标 `dispose={null}` 会空闲销毁共享几何/材质 | `<Canvas frameloop="never" dpr={1} gl={{ preserveDrawingBuffer: true }}>` + `await root.ready` / `WebGPURenderer.init` + 传**秒**调 `advance(frame / fps)`；共享资产一律加 `dispose={null}` 或走 `<primitive>` |
| **`theatre-js/theatre@6ea82b9`** | Dataverse `Atom/Pointer/Prism` + 四层 WeakMap 合并 + `[validFrom, validTo)` `UnitBezier` 缓存 + **Oklab** `rgba` 插值 + Shadow DOM 编辑器 | ① 缺 `config.state` 且无 Studio 时 `1s` 后抛未捕获异常；② `project.ready` 异步 `setTimeout(0)`；③ **`main@6ea82b9` 处于 `Saaz` 半成品态**（`StudioStore.ts#L71` 硬编码 `|| true` 退回内存且导出函数 `throw 'Implement me'`） | 生产/导出必须传 `config = { state }`（`definitionVersion: "0.4.0"`）并 `await project.ready`；写 `sequence.position = Math.max(0, t)` 配自控 `createRafDriver.tick`；生产剥离 AGPL `@theatre/studio` 且**锁定 `0.7.x` 发布 tag** |

```javascript
// 面向 HyperFrames / Playwright 的多运行时统一确定性步进骨架
export async function stepRuntimeAt(tSec, { mode, tl, r3fAdvance, theatreSeq, rafDriver, stepMs = 1000 / 60 }) {
  if (mode === "gsap") {
    // 1. 初始化期已执行: gsap.ticker.sleep(); gsap.ticker.lagSmoothing(0); await document.fonts.ready;
    tl.pause().totalTime(tSec, false); // _lazySafeRender 同步更新 DOM 内联样式
  } else if (mode === "motion-v14") {
    // 2. 初始化期已设置: MotionGlobalConfig.useManualTiming = true; 并预跑 2 帧 flush DOMKeyframesResolver
    // 不可任意冷跳: 仅支持从 0 按 stepMs <= 40ms 单调递增驱动frameloop，避免 maxElapsed=40ms 截断
    advanceManualFrameLoop(stepMs);
  } else if (mode === "r3f") {
    // 3. <Canvas frameloop="never" dpr={1} gl={{ preserveDrawingBuffer: true }}> 且共享资源已设 dispose={null}
    r3fAdvance(tSec); // 注意: R3F loop.ts 直接设 elapsedTime = timestamp，必须传秒！
  } else if (mode === "theatre") {
    // 4. 初始化期已传 config.state 且 await project.ready (锁定 0.7.x 发布版，避开 main@6ea82b9)
    theatreSeq.position = Math.max(0, tSec);
    rafDriver?.tick(tSec * 1000);
  }
}
```

---

### 4. 多宿主插件合规编译扇出与上游渲染/DCC 安全增量

1. **只读插件仓库编译扇出模式（[`remotion-dev/claude-code-plugin@f96c742`](../repos/remotion-dev__claude-code-plugin.md) + [`remotion-dev/skills@a3f4098`](../repos/remotion-dev__skills.md)）**：
   - **单一插件入口**：`.claude-plugin/plugin.json` 只暴露 `"skills": "./skills/"`（零 `commands/`/`hooks/`），利用 Claude Code 自动把顶层 `SKILL.md` 注册为 `/<skill-name>`；`.claude-plugin/marketplace.json` 声明自托管 GitHub 市场源。
   - **入口去重与位置感知重写**：全仓仅顶层保留 **14 份 `SKILL.md`**，所有被嵌入聚合的副本（含二级嵌套）全部更名为 **`REFERENCE.md`（15 份）**；独立技能内的跨技能相对链接编译降级为纯文本提示，总聚合包内的引用重写为相对路径。
   - **源码文本化绕过安全审校与膨胀审计**：将禁止的 `.tsx`/`.ts`/`.mjs` 样本剥离 `#!/usr/bin/env node` 后包装为 **20 个 `*.{tsx,ts,mjs}.md`**（前 3 行注入目录还原指令，保留 `CesiumFlythrough.tsx.md` 双 `delayRender` + 连续 9 帧 `tilesLoaded` 稳态计数与 `prep-cesium-path.mjs.md` `0.1km` 重采样 + `±2.8km` 滑动平均航线平滑），`.geojson` 改为 `.json`。但必须严格审计多级嵌套副本膨胀率：本仓仅因 `remotion-maps` 被两层复用就展开成 `4 × 16 = 64` 文件（占全仓 **209 文件的 `30.6%`**），须紧盯插件市场 `512` 文件 / `256 KiB` 配额上限。
2. **Blender MCP 安全与 4.4+/5.0+ 增量（[`ahujasid/mcp-for-blender@7f31a46`](../repos/ahujasid__mcp-for-blender.md)）**：
   - Extension 加载期移除 `bl_info` 前在模块级固化 `ADDON_NAME`/`ADDON_VERSION`（`addon.py#L44-L48`）；
   - 通过 `_action_fcurves(anim_data, action)`（`addon.py#L1983-L2035`）优先经 `action_get_channelbag_for_slot` 适配 Blender 4.4+/5.0+ Slotted Actions（移除 `Action.fcurves`）并兼容旧版；
   - `look` 回退闭包 `native` 同步受 `args["max_size"]` `[200, 2000]` 钳制（`server.py#L1626-L1629`）；
   - `safe_mode.py` `visit_Call` 对**任意**调用拦截 `use_scripts=` 关键字并封禁 `_FILE_LOAD_OPS` 的 `**kwargs` 动态解包（`#L47-L49,#L383-L394,#L794-L803`），单测在 `conftest.py` 强制 `DISABLE_TELEMETRY=1`。
3. **HyperFrames 进程管道、云端包校验与 3D 显存 Lint 增量（[`heygen-com/hyperframes@8a6e87f`](../repos/heygen-com__hyperframes.md)）**：
   - **退出观测与 `EPIPE` 精确隔离**：`waitForExitStatus(browser)` 在连接断开后等待至多 `500ms` 获取真实进程退出码（`openPage.ts#L3-L48`），`WeakSet` 去重的 `absorbBrowserPipeErrors(browser)` 仅吞掉濒死浏览器 `proc.stdio` 的 `EPIPE`/`ECONNRESET`（`browserManager.ts#L1066-L1085`），同时移除 CLI 顶层笼统 `uncaughtException` `EPIPE` 吞错分支（`cli.ts#L569-L575`）；
   - **上传前包体积快速失败**：`planLargestWhileOver` + `projectAfterOffload` + `beforeUpload` 钩子 `assertProjectedArchiveFits`（每文件 `256B` ZIP 头 + `1024B` 尾，超限直测压缩大小提前报错，`offload.ts#L763-L1037`，`cloud/render.ts#L846-L883`）；
   - **3D 显存护栏与密封预览**：第 13 组规则 `three_d_layer_far_larger_than_stage`（跳过 `@keyframes` 与平面 `translate3d`）拦截面积超舞台 `MAX_STAGE_MULTIPLE = 4` 倍的真 3D 图层防整层光栅爆显存（`rules/layers.ts#L1-L111`）；Studio 强制 `MAX_MESSAGE_LIST = 1000` / `MAX_FRAME_CLIPS = 100_000` 边界、`pointerrawupdate` 群组拖拽对齐、`cgroupV2CpuLimit` 并发对齐及同源 `blob:`/`data:` 运行时音频物化（单条 `<= 64 MiB` / 总计 `<= 128 MiB`）。

## 反模式与常见踩坑

- **只拦截 `Element.prototype.animate` 就以为接管了 Motion v14**：`TransformGroup` 直接实例化 `new Animation(new KeyframeEffect(...))` 会完全逃逸，`maxElapsed = 40ms` 与 `DOMKeyframesResolver` 1 帧延迟同样会导致冷跳首帧错位。
- **向 R3F `advance` 传毫秒时间戳或共享 `<mesh>` 漏写 `dispose={null}`**：前者会把动画速度放大 1000 倍，后者在条件分支卸载时触发空闲 GPU 资源销毁导致同屏其他网格黑屏。
- **直接使用 `Theatre.js` `main@6ea82b9` 做 Studio 导出，或无 `config.state` 启动无头页面**：`main` 主干 `Saaz` 重构处于 `throw new Error('Implement me')` 半成品态；缺少 `config.state` 且无 Studio 会在 1 秒后异步炸裂。
- **在 `pixelfx` / `motionmaxxing` 中保留“AI 自证”或视觉盲开 `Max` 档**：`Max` 档（`$26.54`）可耗尽 128K token 零出图；禁止以“12 张静帧截图看起来不错”替代 `Motion.selfTest`、`check.mjs`、`look.py` 与 `lint.mjs` 数值门禁。
- **向只读生成仓库（`remotion-dev/claude-code-plugin`）直接提交 PR 或忽略嵌套副本膨胀**：下游编译产物会在下次发版被覆盖，且多层嵌入会按乘法耗尽 512 文件配额。

## 溯源（文章与源码锚点）

- 文章拆解：[2026-11-27-0xnicc0-12-hand-drawn-motion-repos](../articles/2026-11-27-0xnicc0-12-hand-drawn-motion-repos.md)
- 相邻模式：[deterministic-code-film-contract](../patterns/deterministic-code-film-contract.md) · [anti-ai-slop-design-and-numeric-prompts](../patterns/anti-ai-slop-design-and-numeric-prompts.md) · [agentic-video-and-3d-toolchain-matrix](../patterns/agentic-video-and-3d-toolchain-matrix.md)
- 源码实例（新增 8 仓 + 增量 2 仓 + 复用 6 仓）：
  - [`patch-gg/pixelfx@5294518`](../repos/patch-gg__pixelfx.md) · [`Tejashmakwana/motionmaxxing@8c8ec0f`](../repos/Tejashmakwana__motionmaxxing.md) · [`NiazMorshed2007/reanimate@3f7a55a`](../repos/NiazMorshed2007__reanimate.md) · [`remotion-dev/claude-code-plugin@f96c742`](../repos/remotion-dev__claude-code-plugin.md)
  - [`greensock/GSAP@5e6c35f`](../repos/greensock__GSAP.md) · [`motiondivision/motion@6390e6d`](../repos/motiondivision__motion.md) · [`theatre-js/theatre@6ea82b9`](../repos/theatre-js__theatre.md) · [`pmndrs/react-three-fiber@d74622e`](../repos/pmndrs__react-three-fiber.md)
  - [`ahujasid/mcp-for-blender@7f31a46`](../repos/ahujasid__mcp-for-blender.md) · [`heygen-com/hyperframes@8a6e87f`](../repos/heygen-com__hyperframes.md)
  - [`JDhruv14/line-art-animation@c43d698`](../repos/JDhruv14__line-art-animation.md) · [`finktheartist/sakuga-vfx@c3dabb1`](../repos/finktheartist__sakuga-vfx.md) · [`rough-stuff/rough@56a2762`](../repos/rough-stuff__rough.md) · [`Nutlope/hallmark@04977e1`](../repos/Nutlope__hallmark.md) · [`greensock/gsap-skills@aed9cfd`](../repos/greensock__gsap-skills.md) · [`remotion-dev/skills@a3f4098`](../repos/remotion-dev__skills.md)

## Cross-Referenced Specimens

- [A-007 · 12 个手绘与像素动效开源仓库管线 + @seeconvm Fable 5.2 20 章全流程实战课程](https://oumuatown.com/articles/2026-11-27-0xnicc0-12-hand-drawn-motion-repos.md) — 手绘像素动效七仓补位与二十章代码成片排障资产库
- [R-071 · patch-gg/pixelfx](https://oumuatown.com/repos/patch-gg__pixelfx.md) — 零依赖软光栅配抖动出244像素特效，带自检闭环
- [R-085 · Tejashmakwana/motionmaxxing](https://oumuatown.com/repos/Tejashmakwana__motionmaxxing.md) — 拆解53条商业样片提炼12条曲线，配寻帧安全GSAP硬门禁
- [R-067 · NiazMorshed2007/reanimate](https://oumuatown.com/repos/NiazMorshed2007__reanimate.md) — 虚拟时钟配引擎场景探针，像素级克隆WebGL网页动效
- [R-076 · remotion-dev/claude-code-plugin](https://oumuatown.com/repos/remotion-dev__claude-code-plugin.md) — 双清单文本化封装14项视频技能，过审零脚本插件市场
- [R-046 · greensock/GSAP](https://oumuatown.com/repos/greensock__GSAP.md) — 双向链表场景树配时间轴随机定位，稳撑交互动效与逐帧录屏
- [R-062 · motiondivision/motion](https://oumuatown.com/repos/motiondivision__motion.md) — WAAPI卸载配FLiP投影，离线逐帧踩双时钟陷阱
- [R-087 · theatre-js/theatre](https://oumuatown.com/repos/theatre-js__theatre.md) — 细粒度信号图配四层合并，精确解耦动画运行时与可视化编辑器
- [R-073 · pmndrs/react-three-fiber](https://oumuatown.com/repos/pmndrs__react-three-fiber.md) — React协调器接管Three.js，支持按需步进离线渲染
- [R-022 · ahujasid/mcp-for-blender](https://oumuatown.com/repos/ahujasid__mcp-for-blender.md) — 主线程队列串行调度Blender，带离屏预览与AST门禁
- [R-178 · heygen-com/hyperframes](https://oumuatown.com/repos/heygen-com__hyperframes.md) — 虚拟时间垫片配 CDP 帧捕获，稳把网页动效渲染成视频
- [R-009 · JDhruv14/line-art-animation](https://oumuatown.com/repos/JDhruv14__line-art-animation.md) — 零依赖TS手绘动画技能：双边留白描边与步态逆解去塑料感
- [R-003 · finktheartist/sakuga-vfx](https://oumuatown.com/repos/finktheartist__sakuga-vfx.md) — 全局单画布与弹簧挤压形变，零依赖实现动漫作画打击感
- [R-018 · rough-stuff/rough](https://oumuatown.com/repos/rough-stuff__rough.md) — OpSet中间表示配双笔抖动，同一扫线填充双出矢量与位图
- [R-013 · Nutlope/hallmark](https://oumuatown.com/repos/Nutlope__hallmark.md) — 前端反套路双层门禁：主题发牌防趋同配像素级冷审
- [R-005 · greensock/gsap-skills](https://oumuatown.com/repos/greensock__gsap-skills.md) — 官方八大模块动效指南，把生命周期清理与合成器红线写死
- [R-017 · remotion-dev/skills](https://oumuatown.com/repos/remotion-dev__skills.md) — 路由技能配14子技能与硬约束，稳控Agent写视频代码
- [P-004 · 确定性代码成片帧契约与无损流式渲染管线（Deterministic Code-Film Contract）](https://oumuatown.com/patterns/deterministic-code-film-contract.md) — 纯时间函数、单主时钟与无头流式直写消除代码成片漂移
- [P-002 · 反 AI Slop 审美门禁、防收敛发牌与物理数值提示词体系（Anti-AI-Slop & Numeric Prompting）](https://oumuatown.com/patterns/anti-ai-slop-design-and-numeric-prompts.md) — 用物理数值契约、有状态发牌与像素验收根除 AI 模板味
- [P-001 · Agent 驱动视频剪辑、2D/3D 动画与跨宿主技能选型矩阵（Agentic Video, 3D & Skill Toolchain Matrix）](https://oumuatown.com/patterns/agentic-video-and-3d-toolchain-matrix.md) — 视频生成、三维自动化与跨宿主技能选型边界与避坑矩阵
- [P-030 · 视频逆向拆解、三轨音频预分离、VIDEO.md 分层上下文与分路由局部复刻模式（Video Reverse Engineering & VIDEO.md Layered Context）](https://oumuatown.com/patterns/video-reverse-engineering-and-videomd-layered-context.md) — 以三轨分音、信号取证与四层拆片包实现参考视频精准复刻
