Communitygithub.com

shengdabai/Tony-Claude-Code-Skills

HyperFrames용 Anime.js 어댑터 패턴. HyperFrames 컴포지션 내에서 Anime.js 애니메이션이나 타임라인을 작성하거나, window.__hfAnime에 애니메이션을 등록하거나, Anime.js를 seek 기반으로 결정론적으로 만들거나, Anime.js 예제를 렌더링에 안전한 HyperFrames HTML로 변환할 때 사용합니다.

Tony-Claude-Code-Skills란 무엇인가요?

이 스킬은 HyperFrames 프레임워크 내에서 Anime.js 애니메이션 라이브러리를 안전하게 통합하고 실행하기 위한 규약과 패턴을 제공합니다. 핵심 아이디어는 HyperFrames가 시계(clock)를 소유하고, 애니메이션 인스턴스들은 'autoplay: false'로 설정되어 외부 시간 제어(seek)에 따라 움직이도록 하는 것입니다. 모든 생성된 애니메이션 또는 타임라인은 `window.__hfAnime` 배열에 명시적으로 등록되어야 하며, 어댑터는 이 배열을 읽어 각 인스턴스의 `seek(timeMs)` 메서드를 호출합니다. 이는 재생 시점을 완전히 결정론적으로 만들어 HyperFrames의 seek 기능과 완벽하게 호환되도록 합니다. 단순 SVG/돔 효과, 타임라인 기반 시퀀스, 모듈 번들 빌드 등 다양한 사용 사례를 지원하며, `anime.running` 자동 탐색이나 무한 루프, 비동기 콜백 내 애니메이션 생성 같은 패턴을 금지하여 예측 가능하고 안정적인 렌더링을 보장합니다. 복잡한 장면 시퀀싱이 필요하면 GSAP 사용이 권장됩니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/shengdabai/Tony-Claude-Code-Skills/tree/HEAD/skills/hyperframes-animejs

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Anime.js for HyperFrames

HyperFrames는 animejs 런타임 어댑터를 통해 Anime.js 인스턴스를 seek할 수 있습니다. 컴포지션이 애니메이션 객체를 소유하고, HyperFrames가 시계를 소유합니다.

규약

  • 컴포지션 초기화 중에 동기적으로 애니메이션이나 타임라인을 생성합니다.
  • Anime.js가 자체 시계로 진행되지 않도록 autoplay: false로 설정합니다.
  • 반환된 모든 애니메이션이나 타임라인을 window.__hfAnime에 등록합니다.
  • 유한한 지속 시간(duration)과 반복 횟수(loop)를 사용합니다.
  • 벽시계 시간, 네트워크 상태 또는 시드 되지 않은 난수에 기반하여 DOM을 변경하는 콜백을 피합니다.

어댑터는 등록된 모든 인스턴스에 대해 instance.seek(timeMs)를 호출하며, 여기서 timeMs는 HyperFrames 시간(밀리초)입니다.

기본 패턴

<script src="https://cdn.jsdelivr.net/npm/[email protected]/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 장식.
  • seek 기반으로 만들 수 있는 가져온 Anime.js 예제.
  • 동일한 레지스트리에 푸시되는 여러 개의 독립적인 마이크로 애니메이션.

사용자가 특별히 Anime.js를 요청하지 않는 한 복잡한 장면 시퀀싱에는 GSAP을 사용하세요. GSAP은 여전히 주요 HyperFrames 제작 경로입니다.

피해야 할 사항

  • autoplay를 Anime.js 기본값으로 남겨두는 것.
  • 명시적인 window.__hfAnime.push(...) 대신 anime.running 자동 탐색에 의존하는 것.
  • 무한 루프. 컴포지션 지속 시간에서 유한한 반복 횟수를 계산하세요.
  • 타이머, 프로미스, 이벤트 핸들러 또는 비동기 에셋 로드 후에 애니메이션을 생성하는 것.

검증

Anime.js를 사용하는 컴포지션을 편집한 후:

npx hyperframes lint
npx hyperframes validate

크레딧 및 참고 자료

Individual skills in this repo

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

shengdabai/Tony-Claude-Code-Skills

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

shengdabai/Tony-Claude-Code-Skills

接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。

shengdabai/Tony-Claude-Code-Skills

Read-only queue dashboard for workspace-aware ship. (gstack)

shengdabai/Tony-Claude-Code-Skills

Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

shengdabai/Tony-Claude-Code-Skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

shengdabai/Tony-Claude-Code-Skills

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

shengdabai/Tony-Claude-Code-Skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

shengdabai/Tony-Claude-Code-Skills

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

관련 스킬