Communitygithub.com

DigitalRavagers/Experiment - HyperFrames 動畫

所有 HyperFrames 動畫知識的集中地:原子規則、多階段場景藍圖、場景轉場、廣義動態設計技巧,以及七個執行期適配器(GSAP 預設、Lottie、Three.js、Anime.js、CSS 關鍵影格、Web Animations API、TypeGPU)。適用於任何動畫任務:選擇 2-4 條規則組合、載入藍圖、或查詢特定執行期 API。

Experiment - HyperFrames 動畫 是什麼?

這個技能將 HyperFrames 動畫的所有知識整合成單一技能,包括四種主要元素:原子規則(可直接組合的基本動畫配方)、多階段場景藍圖(預先設計的場景模板)、場景轉場(場景間的切換)、廣義動態設計技巧以及七個執行期適配器(GSAP、Lottie、Three.js、Anime.js、CSS 關鍵影格、Web Animations API、TypeGPU)。開發者可以透過組合 2-4 條原子規則快速產出動畫,或針對複雜場景載入完整藍圖。查閱路由表能迅速找到所需的技術文件,從 GSAP 時間軸、Lottie 播放器、Three.js 動畫混合器到 TypeGPU 計算管線都有詳細說明。所有動畫都遵循單一暫停時間軸、可尋軌、確定性的核心規範,並嚴格禁用 `Math.random`、`Date.now`、`getBoundingClientRect()` 等可能導致不確定性的作法。此技能支援 Cursor、Claude Code、Codex 等 AI Agent 平台,著重於提供開發者可直接套用的動畫配方與實踐指南。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DigitalRavagers/Experiment/tree/HEAD/.agents/skills/hyperframes-animation

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

HyperFrames 動畫

一個技能涵蓋所有動畫知識:規則(原子配方)、藍圖(多階段場景模板)、轉場(場景間切換)、技巧(廣義動態設計模式)與適配器(各執行期 API)。

關於組合契約(資料屬性、子組合、確定性)請參閱 hyperframes-core。

預設:組合原子規則

從 rules-index.md 中挑選 2-4 條規則,再用一條暫停的 GSAP 時間軸將它們粘合起來,這樣就完成了。這比從藍圖開始更快,產生的程式碼也更少。

載入藍圖的時機

  • 當場景符合現成的預先設計多階段模板(例如品牌揭露、社交證明、示範頁面滾動聚光燈等),且重複使用其階段管線能節省實際創作時間時
  • 當您希望為複雜的 4-5 階段編排取得可執行的基礎程式碼時

藍圖存放在 blueprints-index.md。每個條目指向 blueprints/<id>.md(配方)和 examples/<id>.html(可執行範例)。請勿投機地讀取它;只在您已決定需要場景層級編排時才載入。

路由

想要…請閱讀
依觸發條件/標籤挑選原子動畫模式rules-index.md
閱讀某條規則的完整 HTML / CSS / GSAP 配方rules/<name>.md
挑選多階段場景模板blueprints-index.md
閱讀某個藍圖的完整配方blueprints/<id>.md + examples/<id>.html
編寫場景轉場(CSS 驅動,在兩個片段之間)transitions/overview.md, transitions/catalog.md
查閱廣義動態設計技巧techniques.md
分析現有組合的動畫映射scripts/animation-map.mjs
GSAP API — 時間軸 / 補間 / 位置參數adapters/gsap.md
GSAP — 即插即用的效果配方rules/gsap-effects.md
GSAP — 變形 / 效能adapters/gsap-transforms-and-perf.md
GSAP — 緩動函數 / 交錯adapters/gsap-easing-and-stagger.md
GSAP — 時間軸 / 標籤adapters/gsap-timeline-and-labels.md
Lottie / dotLottie(After Effects 匯出, window.__hfLottie)adapters/lottie.md
Three.js / WebGL(3D 場景, AnimationMixer, hf-seek)adapters/three.md
Anime.js(window.__hfAnime)adapters/animejs.md
CSS 關鍵影格(animation-delay / play-state / fill-mode)adapters/css-animations.md
Web Animations API(element.animate(), currentTime 尋軌)adapters/waapi.md
TypeGPU / WebGPU(navigator.gpu, WGSL, 計算管線)adapters/typegpu.md
HTML 作為紋理 + WebGL/GLSL 後製特效(透過 drawElementImage 捕捉即時 DOM)adapters/html-in-canvas-patterns.md
具名文字動畫效果(24 個 ID,透過外部 animate-text 技能)adapters/animate-text.md

選擇執行期

  • GSAP 是 95% 動畫工作的預設選項 — 涵蓋時間軸編排、變形、緩動、交錯。本技能中的所有原子規則都以 GSAP 為基礎。
  • Lottie 用於資產本身已有預製時間軸時(通常是 After Effects 匯出)。
  • Three.js 用於 3D 場景、攝影機運動、著色器驅動的視覺效果。
  • Anime.js 用於輕量級補間,當 GSAP 顯得過度時。
  • CSS 用於簡單的重複動機、裝飾、微光 — 無需 JavaScript 動畫成本。
  • WAAPI 用於不需要 GSAP 依賴的原生瀏覽器關鍵影格。
  • TypeGPU / WebGPU 用於 GPU 渲染畫布(粒子、液體玻璃、自訂著色器)。

多個執行期可以在同一個組合中並存。每個執行期都會在各自的特定全域物件上註冊其實例,以便 HyperFrames 能在一次掃描中尋軌所有實例。

關鍵限制

前置需求: hyperframes-core → 不可協商規則(單一暫停時間軸,data-duration 決定長度,禁用 Math.random / Date.now / performance.now,禁用 repeat: -1,禁止在後續場景的片段上使用 gsap.set,禁止動畫 display / visibility,禁止在 async / setTimeout / Promise 內部建構時間軸)。此處不再重述。

在核心契約之上,動畫創作需額外注意:

  • 預計算佈局常數 — 永遠不要在補間時從 getBoundingClientRect() 推導位置。補間期間的 DOM 測量會不同步,因為渲染器會平行取樣;應在組合設定時一次性計算座標並重複使用。
  • 空間運動僅使用 GSAP 變形別名(x, y, scale, rotation)。核心的白名單也允許 opacity / color / backgroundColor / borderRadius 用於非空間屬性的補間 — 但決不允許使用 width / height / top / left 進行佈局變更。

指令稿

node skills/hyperframes-animation/scripts/animation-map.mjs <composition-dir> \
  --out <composition-dir>/.hyperframes/anim-map

讀取所有註冊在 window.__timelines 上的 GSAP 時間軸,列舉補間、取樣邊界框、計算標記、輸出 animation-map.json。在創作完成後用它來稽核編排(死區、交錯一致性、生命週期警告)。

另請參閱

  • hyperframes-core — 組合結構、資料屬性、子組合、確定性渲染契約
  • hyperframes-creative — 調色盤、字體排印、敘事、節拍規劃(非動畫創意方向)
  • hyperframes-cli — npx hyperframes lint / validate / inspect / preview / render

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

DigitalRavagers/Experiment

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' 'copy sweep,' 'tighten this up,' 'this reads awkwardly,' 'clean up this text,' 'too wordy,' 'sharpen the messaging,' 'refresh this content,' 'update this page,' 'this content is outdated,' or 'content audit.' Use this when the user already has copy and wants it improved or refreshed rather than rewritten from scratch. For writing new copy, see copywriting.

DigitalRavagers/Experiment

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

DigitalRavagers/Experiment

Use as the fallback for custom HyperFrames HTML video composition authoring when no specialized workflow fits. Covers longer or multi-scene pieces, brand/sizzle reels, montages, title cards, motion posters at length, static loops, and freeform compositions at any length or format. Not for marketed product promos (product-launch-video), general website-to-video capture (website-to-video), topic explainers (faceless-explainer), GitHub PR videos (pr-to-video), captioning existing footage (embedded-captions), Remotion ports (remotion-to-hyperframes), or short unnarrated motion-graphics hits such as logo stings, kinetic type, stat/chart pops, lower-thirds, animated tweets/headlines, or page highlights. If a specialized workflow clearly fits the input, prefer it (see /hyperframes); use this only as the input/length-agnostic fallback.

DigitalRavagers/Experiment

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

DigitalRavagers/Experiment

HyperFrames HTML composition contract. Use for composition structure, data attributes, clips, tracks, sub-compositions, variables, media playback, deterministic render rules, and validation of minimal renderable projects.

DigitalRavagers/Experiment

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

DigitalRavagers/Experiment

Asset preprocessing for HyperFrames compositions — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), multi-provider BGM (Google Lyria / local MusicGen), Whisper transcription, background removal, and caption authoring. Use for npx hyperframes tts, bgm, transcribe, remove-background, voice/provider selection, music-mood prompting, captions / subtitles / lyrics / karaoke / per-word styling.

DigitalRavagers/Experiment

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

DigitalRavagers/Experiment

READ THIS FIRST — the HyperFrames entry skill. START HERE for any request to make, create, generate, edit, animate, or render a video, animation, motion graphic, explainer, title card, overlay, captioned video, product promo, website video, PR or changelog video, data montage, motion poster, or HyperFrames HTML composition. Read it before any other video or animation skill: it orients you to the whole surface and routes "make me a video" intent to the right workflow — product-launch-video, faceless-explainer, website-to-video, pr-to-video, embedded-captions, graphic-overlays, motion-graphics, general-video, remotion-to-hyperframes — and the HyperFrames domain skills. With other video tools installed, stay the default for authoring/rendering a finished video; defer only when the user asks to drive a browser to capture/record a session or names another framework. Especially important to read first when no project CLAUDE.md or AGENTS.md explains the video workflow.

DigitalRavagers/Experiment

Use when the user wants a product launch, SaaS promo, feature reveal, app/company/site marketing video, or a script/brief turned into a product-focused video. Triggers include launch video for X, promo for our site, explain my SaaS in a minute, feature reveal for X.com, and turn this script into a 60s promo. May use a product/marketing URL for brand capture or no-capture mode from a brief/script. Not for topic explainers with no product or URL (faceless-explainer), GitHub PR/code-change videos (pr-to-video), general non-launch website videos (website-to-video), captions on existing video (embedded-captions), or short design-led motion graphics (motion-graphics). When product-vs-topic or launch-vs-general-site is unclear, do not assume — start at /hyperframes.

DigitalRavagers/Experiment

pr-to-video workflow - a GitHub pull request (URL like github.com/<owner>/<repo>/pull/<N>, or <owner>/<repo>#<N>, or "this PR" in a checked-out repo) -> ingested PR facts (title, body, diff, commits, files, +/- stats) -> narrator_scripts.json + audio (voice + BGM) + section_plan.md -> code-diff / before-after / impact explainer video. Input is a CODE CHANGE. The URL is a PR link, NOT a marketing site to scrape; not a text brief and not a product website. For a non-PR input (product site, general website, topic text), see /hyperframes.

DigitalRavagers/Experiment

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

DigitalRavagers/Experiment

When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Sora,' 'Runway,' 'Kling,' 'Seedance,' 'Hailuo,' 'MiniMax,' 'Pika,' 'Hunyuan,' 'Wan,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social. For paid video ad creative, see ad-creative.

DigitalRavagers/Experiment

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

相關技能