animejs
Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o animejs.zip https://jpskill.com/download/19198.zip && unzip -o animejs.zip && rm animejs.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19198.zip -OutFile "$d\animejs.zip"; Expand-Archive "$d\animejs.zip" -DestinationPath $d -Force; ri "$d\animejs.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
animejs.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
animejsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
HyperFrames 用 Anime.js
HyperFrames は、animejs ランタイムアダプターを介して Anime.js インスタンスをシークできます。コンポジションがアニメーションオブジェクトを所有し、HyperFrames がクロックを所有します。
契約
- コンポジションの初期化中に、アニメーションまたはタイムラインを同期的に作成してください。
autoplay: falseを設定し、Anime.js が独自のクロックで進行しないようにしてください。- 返されたすべてのアニメーションまたはタイムラインを
window.__hfAnimeに登録してください。 - 有限の期間とループ回数を使用してください。
- ウォールクロック時間、ネットワーク状態、またはシードされていない乱数に基づいて DOM を変更するコールバックは避けてください。
アダプターは、登録されたすべてのインスタンスを instance.seek(timeMs) でシークします。ここで timeMs はミリ秒単位の HyperFrames 時間です。
基本パターン
<script src="https://cdn.jsdelivr.net/npm/animejs@4.0.2/lib/anime.iife.min.js"></script>
<script>
const anim = anime({
targets: ".mark",
translateX: 280,
rotate: "1turn",
opacity: [0, 1],
duration: 1200,
easing: "easeOutExpo",
autoplay: false,
});
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(anim);
</script>
タイムラインパターン
<script>
const tl = anime.timeline({
autoplay: false,
easing: "easeOutCubic",
});
tl.add({
targets: ".title",
translateY: [40, 0],
opacity: [0, 1],
duration: 650,
}).add(
{
targets: ".accent",
scaleX: [0, 1],
duration: 450,
},
250,
);
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(tl);
</script>
モジュールビルド
ES モジュールビルドを使用する場合、アダプターはインスタンスがどのように作成されたかを気にしません。返されたオブジェクトが seek()、pause()、そしてできれば play() を公開していることだけが必要です。
<script type="module">
import { animate } from "https://cdn.jsdelivr.net/npm/animejs/+esm";
const anim = animate(".chip", {
x: "18rem",
duration: 900,
autoplay: false,
});
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(anim);
</script>
良い使用例
- Anime.js の構文が簡潔な、小さな SVG や DOM の装飾。
- シーク駆動にできる、インポートされた Anime.js の例。
- 同じレジストリにプッシュされた、複数の独立したミクロアニメーション。
ユーザーが特に Anime.js を要求しない限り、複雑なシーンシーケンスには GSAP を使用してください。GSAP は依然として HyperFrames の主要なオーサリングパスです。
避けるべきこと
autoplayを Anime.js のデフォルトのままにすること。- 明示的な
window.__hfAnime.push(...)の代わりに、anime.runningの自動検出に依存すること。 - 無限ループ。コンポジションの期間から有限の繰り返し回数を計算してください。
- タイマー、プロミス、イベントハンドラー、または非同期アセットロード後にアニメーションを構築すること。
検証
Anime.js を使用するコンポジションを編集した後:
npx hyperframes lint
npx hyperframes validate
クレジットと参考文献
- HyperFrames アダプターのソース:
packages/core/src/runtime/adapters/animejs.ts。 autoplay、pause()、seek()に関する Anime.js のドキュメント: https://animejs.com/documentation/
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Anime.js for HyperFrames
HyperFrames can seek Anime.js instances through its animejs runtime adapter. The composition owns the animation objects; HyperFrames owns the clock.
Contract
- Create animations or timelines synchronously during composition initialization.
- Set
autoplay: falseso Anime.js does not advance on its own clock. - Register every returned animation or timeline on
window.__hfAnime. - Use finite durations and loop counts.
- Avoid callbacks that mutate DOM based on wall-clock time, network state, or unseeded randomness.
The adapter seeks every registered instance with instance.seek(timeMs), where timeMs is HyperFrames time in milliseconds.
Basic Pattern
<script src="https://cdn.jsdelivr.net/npm/animejs@4.0.2/lib/anime.iife.min.js"></script>
<script>
const anim = anime({
targets: ".mark",
translateX: 280,
rotate: "1turn",
opacity: [0, 1],
duration: 1200,
easing: "easeOutExpo",
autoplay: false,
});
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(anim);
</script>
Timeline Pattern
<script>
const tl = anime.timeline({
autoplay: false,
easing: "easeOutCubic",
});
tl.add({
targets: ".title",
translateY: [40, 0],
opacity: [0, 1],
duration: 650,
}).add(
{
targets: ".accent",
scaleX: [0, 1],
duration: 450,
},
250,
);
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(tl);
</script>
Module Builds
If you use an ES module build, the adapter does not care how the instance was created. It only needs the returned object to expose seek(), pause(), and preferably play():
<script type="module">
import { animate } from "https://cdn.jsdelivr.net/npm/animejs/+esm";
const anim = animate(".chip", {
x: "18rem",
duration: 900,
autoplay: false,
});
window.__hfAnime = window.__hfAnime || [];
window.__hfAnime.push(anim);
</script>
Good Uses
- Small SVG and DOM flourishes where Anime.js syntax is compact.
- Imported Anime.js examples that can be made seek-driven.
- Multiple independent micro-animations pushed into the same registry.
Use GSAP for complex scene sequencing unless the user specifically asks for Anime.js. GSAP is still the primary HyperFrames authoring path.
Avoid
- Leaving
autoplayat the Anime.js default. - Depending on
anime.runningauto-discovery instead of explicitwindow.__hfAnime.push(...). - Infinite loops. Compute a finite repeat count from the composition duration.
- Building animations in timers, promises, event handlers, or after async asset loads.
Validation
After editing a composition that uses Anime.js:
npx hyperframes lint
npx hyperframes validate
Credits And References
- HyperFrames adapter source:
packages/core/src/runtime/adapters/animejs.ts. - Anime.js documentation for
autoplay,pause(), andseek(): https://animejs.com/documentation/