1实现原理 · 为什么它能做到
风格签名是一条可量化的时间契约:图形层在 24fps 成片里按 12fps 步进(每 2 帧保持同一值),而底图素材与音频保持 24fps 平滑——只顿 overlay,不顿底盘。
The single most recognizable trait of this style is **animating the map graphics at 12fps inside a 24fps edit**.
顿帧的实现方式是「先把帧号量化,再用量化后的值算一切图形量」,且步长由 fps 推导(Math.round(fps/12))而非硬编码 2,因此换帧率后风格仍成立。
const f = Math.floor(frame / STEP) * STEP; // use `f`, not `frame`, for graphic motion
两条生产路径按需求分派:要照片级地形/真 3D 建筑/电影感相机 → Google Earth Studio 出图像序列 + 相机 .jsx,在 After Effects 里重建相机并把 overlay 挂到 track null;要素描编辑风、全可控、数据驱动 → GeoJSON/SVG 走投影后代码渲染。
| Photoreal terrain, real satellite/3D buildings, cinematic camera | **Google Earth Studio → After Effects** | Image sequence + camera `.jsx`, composited in AE |
矢量路径的锁定靠共享投影:底图、pin、route、label 全部走同一个 projection([lng,lat]),相机只是对同一组做 scale/translate,所以元素不会随镜头漂移。
The same `projection([lng,lat])` converts every pin coordinate to a screen position, so pins, routes, and labels all share one coordinate space
覆盖层四件套各有机制:pin 掉落(spring 过冲后落定 + 可选脉冲)、route 绘入(pathLength=1 归一化 + dashoffset)、区域高亮(focus + context,目标亮其余压暗)、标签引导线(锚定投影点、保持水平)。
`pathLength="1"` normalizes any route length so one progress value (0→1) draws it.
编排走数据驱动:单一 beats 数组同时决定相机目标、pin 顺序、route 段与标签,总时长由 calculateMetadata 对 holds 求和算出,换数据即换片、无需重新 keyframe。
One array → camera targets, pin order, route segments, and labels stay in sync.
验证是地理保真导向:每个 pin 必须落在正确经纬度、路线连接正确城市、高亮区域是目标区域、标签拼写正确;并要求取「相邻两帧」确认 overlay 真的保持了两帧而底图相机仍在逐帧推进。
Two adjacent overlay frames are identical (12fps step holds) while the base camera advanced
Earth Studio 路径的关键操作是导出时勾选 3D Camera Export:只有勾了才会随图像序列一起给出相机 .jsx 与 track-point 数据,缺了它就只剩素材、无法在 AE 里重建相机、overlay 也就锁不住。
**CRITICAL — enable the After Effects / 3D Camera Export option**
2核心能力
3外部依赖
| Kind | Dependency / Endpoint |
|---|---|
| cli | npx remotion still / render(矢量路径的帧验证与编码) |
| package | d3-geo(geoMercator / geoPath / geoInterpolate 等投影与球面插值) |
| network | 底图数据源:Natural Earth(国家/州界 GeoJSON)或 world-atlas TopoJSON(用 topojson.feature 转换) |
| api | Google Earth Studio(浏览器工具,需 Google 账号;产出图像序列 + 相机 .jsx + track 数据) |
| package | zod(beats schema 校验) |
| cli | ffmpeg / ffprobe(contact-sheet.sh 拼图与 probe-mp4.sh 规格断言) |
4管控建议与判定依据
- scripts/: 执行本地脚本或命令: npx remotion still / render(SKILL.md Verify loop):按需从 npm 获取并执行 Remotion CL
- 网络端点: 声明外部网络访问: Google Earth Studio(earth.google.com/studio):Path A 的相机关键帧与人机交互在 Google 的浏览
- 本地工作目录: 文件读写与工件输出: out/*.mp4、out/demo.gif、out/f-*.png(成片与逐帧静帧)、sheet.png(拼图)
5第二遍独立确认
- [ok] 外部依赖调用点复核(npx remotion / d3-geo / zod / Earth Studio / 底图数据) — SKILL.md 确有 `npx remotion still MapSeq out/f-start.png ...` 与 `npx remotion render MapSeq out/map.mp4`;SKILL.md 代码块确有 `import { geoMercator, geoPath } from "d3-geo";`;vector-maps 确有 `export const schema = z.object({` 与 Natural Earth/world-atlas 建议;earth-studio-to-ae 确有 earth.google.com/studio 与 3D Camera Export 告警。全部落地。
- [ok] Earth Studio 路径是否引入 agent 侧凭证行为 — 文档措辞是「Keyframe in Earth Studio (browser)」「In After Effects: … Run Script File…」——由人操作;skill 未要求 agent 登录 Google、未涉及任何 cookie/token 读取。故不计入 credential_reads,只作为外部服务依赖记入 external_deps 并在 reason 中标注账号前提。
- [ok] 12fps 量化实现与描述一致性 — SKILL.md 的代码块 `const STEP = Math.round(fps / 12); const f = Math.floor(frame / STEP) * STEP;` 与文字「at 24fps, hold each graphic-layer value for 2 frames (update on even frames only)」一致;vector-maps 用同一写法并额外给出 `Math.max(1, …)` 的 30fps 保护;AE 侧给了 posterizeTime(12) 与 12fps 嵌套 precomp 两种等价做法。三处口径一致。
- [ok] 「共享坐标空间」主张的成立性 — 矢量路径中底图用 `toPath(feat)`、pin/route/label 用 `px([lng,lat])`(同 projection),相机是对同一 group 的 transform;AE 路径则用 track null + `toComp([0,0,0])` 表达式。两条路都确实把「元素锁定」交给共享坐标系,而非逐元素手调关键帧。
- [ok] 坐标序与投影边界的风险是否明示 — vector-maps 的 Gotchas 明示两点:GeoJSON 与 projection() 都是 [lng, lat] 而非 [lat, lng](写反会把每个 pin 送错位置);Mercator 在高纬/跨 ±180° 会截断或撕裂,建议世界视图改用 geoEqualEarth/geoNaturalEarth1 或旋转投影。均为操作级警告,非泛泛提醒。
- [discrepancy] 跨目录 / 跨 skill 引用可解析性 — 正文引用的 `scripts/contact-sheet.sh`、`scripts/probe-mp4.sh` 位于仓库根,单装本 skill 目录会悬空(需装整个 repo);另外 SKILL.md 把矢量路径定位为「Remotion 或 D3」,但 D3 网页变体只给要点(?t 冻结),完整网页交付契约与同 pack 其他 skill 相比更薄——属能力边界,非错误。
- [ok] 功能声明 vs 实际能力 — frontmatter 宣称覆盖 Earth Studio→AE 相机导入、GeoJSON/SVG 矢量地图动效、pin/route/highlight/label、12fps 顿帧与数据驱动 Remotion 渲染;正文两条路径与两份 reference 逐项兑现。未夸大——AE 侧的产出被明确定义为「AE 工程 + 渲染素材,由人工 scrubbing 验收」,而非声称 agent 能自动完成 AE 合成。
6结论
8f12ba8c5bbce5eb…