A

animejs

by @heygen-comv
4.6(120)

HyperFrames向け(むけ)Anime.jsアダプターパターン。HyperFramesコンポジション内(ない)でAnime.jsアニメーションやタイムラインを作成(さくせい)し、`window.__hfAnime`に登録(とうろく)することで、アニメーションをシーク駆動(くどう)で決定論的(けっていろんてき)に制御(せいぎょ)します。Anime.jsの例(れい)をレンダリングセーフなHyperFrames HTMLに変換(へんかん)する際(さい)にも使用(しよう)できます。

animationfrontendanimejshyperframesweb-devGitHub
インストール方法
git clone https://github.com/heygen-com/hyperframes.git
compare_arrows

Before / After 効果比較

1
使用前

HyperFramesにAnime.jsアニメーションを統合(とうごう)する際(さい)、アニメーションが独立(どくりつ)して実行(じっこう)され、メインタイムラインとの同期(どうき)が困難(こんなん)になり、予測不能(よそくふのう)な再生(さいせい)やデバッグの課題(かだい)が生(しょう)じます。

使用後

Anime.jsアダプターを使用(しよう)すると、アニメーションはHyperFramesによって正確(せいかく)に制御(せいぎょ)され、シーク駆動(くどう)で決定論的(けっていろんてき)な再生(さいせい)が可能(かのう)になります。これにより、メインタイムラインとの完璧(かんぺき)な同期(どうき)が保証(ほしょう)され、統合(とうごう)効率(こうりつ)とデバッグが大幅(おおはば)に向上(こうじょう)します。

SKILL.md

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: false so 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 autoplay at the Anime.js default.
  • Depending on anime.running auto-discovery instead of explicit window.__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

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数37.4K
評価4.6 / 5.0
バージョン
更新日2026年5月23日
比較事例1 件

ユーザー評価

4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%

この Skill を評価

0.0

対応プラットフォーム

🤖claude-code

タイムライン

作成2026年5月8日
最終更新2026年5月23日