C

css-animations

by @heygen-comv
4.6(120)

HyperFrames 用の CSS アニメーションアダプターパターン。CSS キーフレーム、アニメーション遅延、フィルモードを決定論的にシークし、プレビューとレンダリングを可能にします。ループ、マスク、微妙なパララックスなどのシンプルで固定期間の装飾的な動きに最適です。

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

Before / After 効果比較

1
使用前

ビデオやアニメーションプロジェクトでCSSアニメーションを手動で統合および同期すると、再生の不整合やタイムラインの正確な制御が困難になることがよくあります。プレビューと最終レンダリング時にアニメーションの動作が非決定論的になる可能性があり、デバッグと調整に多大な時間を費やします。

使用後

HyperFrames CSSアダプターを使用すると、CSSアニメーションを決定論的にシークおよびレンダリングでき、プレビューと最終出力の間で完璧な一貫性を確保できます。これにより、デバッグ時間が大幅に短縮され、アニメーション制作の効率と信頼性が向上します。

SKILL.md

CSS Animations for HyperFrames

HyperFrames can seek CSS keyframe animations through its css runtime adapter. Use this for simple repeated motifs, background motion, shimmer, glow, masks, and non-sequenced decoration.

For scene choreography, GSAP is usually clearer. CSS animations work best when the motion belongs to one element and has a fixed duration.

Contract

  • Put the animated element in the DOM before runtime initialization finishes.
  • Give timed elements a data-start value so local animation time matches the clip.
  • Use finite animation-duration and animation-iteration-count because the negative-delay fallback cannot represent unbounded duration in environments without WAAPI-backed CSS animations.
  • Prefer animation-fill-mode: both so seeked states hold before and after active motion.
  • Avoid wall-clock JavaScript, hover-triggered state, and class toggles that depend on user events.

The adapter discovers elements with computed animation-name, seeks their browser Animation handles when available, and falls back to pausing with negative animation-delay.

Basic Pattern

<div
  id="pulse-ring"
  class="clip pulse-ring"
  data-start="0"
  data-duration="4"
  data-track-index="2"
></div>

<style>
  .pulse-ring {
    width: 280px;
    height: 280px;
    border: 4px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation-name: pulse-ring;
    animation-duration: 1200ms;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
    animation-iteration-count: 3;
    animation-fill-mode: both;
  }

  @keyframes pulse-ring {
    from {
      opacity: 0;
      transform: scale(0.82);
    }
    35% {
      opacity: 1;
    }
    to {
      opacity: 0;
      transform: scale(1.18);
    }
  }
</style>

Stagger Pattern

Use CSS custom properties to avoid duplicating keyframes:

<div class="clip dots" data-start="1" data-duration="3" data-track-index="3">
  <span style="--i: 0"></span>
  <span style="--i: 1"></span>
  <span style="--i: 2"></span>
</div>

<style>
  .dots span {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: dot-pop 900ms ease-out both;
    animation-delay: calc(var(--i) * 120ms);
  }

  @keyframes dot-pop {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.75);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
</style>

Good Uses

  • Decorative loops with a known repeat count.
  • Mask, glow, shimmer, grain, and subtle parallax layers.
  • Simple one-element entrances where a full JS timeline would be excessive.

Avoid

  • Infinite CSS animations unless you have verified the browser exposes seekable WAAPI-backed CSS animation handles. Prefer a finite iteration count covering the visible duration.
  • Animating layout properties like top, left, width, or height when transforms work.
  • Relying on hover, focus, scroll, or media queries to trigger render-critical motion.
  • Changing animation classes after startup unless another deterministic timeline controls that change.

Validation

After editing CSS animation compositions:

npx hyperframes lint
npx hyperframes validate

Credits And References

ユーザーレビュー (0)

レビューを書く

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

レビューなし

統計データ

インストール数38.2K
評価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日