Communitygithub.com

vijayahnlu/reels

HyperFrames 的所有動畫知識 — 原子運動規則、多階段場景藍圖、場景轉場、更廣泛的動態設計技術,以及七個執行時期配接器(預設 GSAP,加上 Lottie、Three.js、Anime.js、CSS 關鍵影格、Web Animations API、TypeGPU)。適用於任何動作或動畫任務:選取 2-4 條規則組合,或載入藍圖,或查詢特定執行時期的 API(例如 GSAP 的 easing 或 Lottie 播放器或 Three.js 的 mixer)。也涵蓋審查現有構圖的編舞(動畫映射)和 24 種命名的文字動畫效果。HyperFrames 原生:單一暫停時間軸、可定位搜尋、確定性。

reels 是什麼?

此技能為 HyperFrames 生態系中所有與動畫相關知識的單一入口點,涵蓋原子運動規則、多階段場景藍圖、場景轉場技術、進階動態設計模式,以及七種執行時期配接器的具體 API 參考。其核心設計哲學是鼓勵開發者選取少量(2-4 條)原子規則並組合出一條暫停的 GSAP 時間軸來完成多數任務,這樣比從零開始撰寫藍圖更快、程式碼更少。然而,當場景符合預先設計的多階段模板時,載入藍圖可節省大量作者時間。 對於執行時期的選擇,GSAP 是預設且最常用的配接器,負責 95% 的動畫工作;Lottie 適用於有預設時間軸的素材(如 After Effects 匯出)或角色動畫;Three.js 處理 3D 場景與攝影機運動;Anime.js 用於輕量補間;CSS 關鍵影格用於簡單重複模式以提高效能;Web Animations API 提供瀏覽器原生關鍵影格;TypeGPU/WebGPU 則用於 GPU 加速的粒子或自訂著色器。同一構圖中可共存多種執行時期。 技能還提供多項腳本工具,例如 `animation-map.mjs` 能分析已建立的動畫編舞(列出時間軸、補間、邊界框與旗標,用於審查死區、時間軸一致性等)。其關鍵限制繼承 HyperFrames 核心的確定性規則:所有動畫必須基於單一暫停時間軸,由 `data-duration` 控制長度,禁止使用 `Math.random`、`Date.now` 或無限重複迴圈,且計算佈局常數必須在配置階段完成,不能在補間時間即時查詢 DOM。

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

在你喜歡的 AI 中提問

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

說明文件

外掛安裝: 在執行設定或更新命令之前,請先遵循外掛安裝規則(當此技能位於 HyperFrames 外掛內部時)。獨立安裝則保留下方更新說明。

HyperFrames 動畫

所有動畫知識整合於一個技能:規則(原子配方)、藍圖(多階段場景模板)、轉場(場景間)、技術(更廣泛的動態設計模式)與配接器(各執行時期 API)。

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

預設:組合原子規則

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

以下情況載入藍圖

  • 場景與現存的預先設計多階段模板(品牌揭示、社交證明等)相符,重複使用其階段流程可以節省實際創作時間
  • 您希望取得複雜 4-5 階段編舞的可執行基準程式碼

藍圖位於 blueprints-index.md。每個條目指向 blueprints/<id>.md(配方)。請勿投機性地讀取它;只在您已決定需要場景層級的編排時才載入。

路由

目標請閱讀
依觸發器或標籤選取原子運動模式rules-index.md
讀取某條規則的完整 HTML / CSS / GSAP 配方rules/<name>.md
選取多階段場景模板blueprints-index.md
讀取某個藍圖的完整配方blueprints/<id>.md
創作場景轉場(CSS 驅動,位於兩個片段之間)transitions/overview.md, transitions/catalog.md
查詢更廣泛的動態設計技術techniques.md
動態模糊 — 元素上的快門殘影,以及何時不該使用references/motion-blur.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
角色動畫(行走循環、吉祥物、關節木偶、手勢)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,禁止沒有有限根 data-duration 的 repeat: -1,禁止在後續場景片段上於頁面載入時執行 gsap.set,禁止 display 或原始 visibility 補間,並且僅在時間軸完全建立後才註冊它,包括當建立過程在非同步回呼(例如 document.fonts.ready)內執行時)。GSAP 的 autoAlpha 和在明確時間軸邊界上的零持續時間可見性設定仍被核心允許。僅將這些例外用於非片段元素或片段內的包裝器;框架擁有 .clip 的生命週期。請勿在此處重述完整合約。

在核心合約之上新增的動畫工藝規範:

  • 預先計算的佈局常數 — 切勿在補間時間從 getBoundingClientRect() 推導位置。補間時間的 DOM 測量會因為渲染器平行取樣而不同步;請在構圖配置時計算一次座標並重複使用。
  • 空間運動僅使用 GSAP 變換別名(x、y、scale、rotation)。核心的允許清單也允許將 opacity / color / backgroundColor / borderRadius 用於非空間屬性的補間 — 但絕對不能使用 width / height / top / left 進行佈局變更。

腳本

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

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

animation-map.mjs 會先從目前專案解析輔助套件,然後可以引導啟動捆綁的 HyperFrames 套件版本。只有在技能是在捆綁的 CLI/技能安裝之外執行,且您需要明確固定該引導啟動版本時,才設定 HYPERFRAMES_SKILL_PKG_VERSION=<version>。

參見

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

Individual skills in this repo

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

vijayahnlu/reels

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

vijayahnlu/reels

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

vijayahnlu/reels

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

vijayahnlu/reels

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`.

vijayahnlu/reels

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

vijayahnlu/reels

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

vijayahnlu/reels

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

vijayahnlu/reels

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

vijayahnlu/reels

Agent Media OS for a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal. When the host app provides its own music or sound-effect tools, use those for music and sound effects; `resolve --type bgm|sfx` needs the heygen CLI. When `HEYGEN_API_BASE` is set, HeyGen calls go through that host with no CLI sign-in.

相關技能