Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

scenario-motion-loops

БесплатноЗапускает вложенные скриптыНе проверен

Use when someone wants seamless looping motion graphics for video in their own brand colors: animated backgrounds behind titles, filler for the dead seconds…

scenario-labsот scenario-labs★ 4 422 звезды на GitHub

Об этом скилле

Scenario Motion Loops

Overview

A loop is a pure function of time, drawn with Canvas 2D in one HTML file. Nothing is generated, so nothing warps or flickers, one color change rebrands it, and it renders at any size.

  • draw(ctx, w, h, t, P) paints the frame at t seconds. Every period divides the 12 s loop, so the frame at 12 s is the frame at 0 s.
  • scripts/loop-template.html holds the helpers (M.*), the palette (P) and tile(...) registration. Tiles from the Motion Loops exploration on scenario.com (80 loops, each with its code) run in it unchanged.
  • scripts/render-loop.mjs checks the page, renders stills or the MP4, and checks the encoded file.
  • Scenario makes only the subject: a mascot, product or character as a cut-out PNG with alpha. The page draws it on the loop's clock, so the composite keeps the motion blur and still loops. The loop itself costs nothing.

Needs Node 18 or newer, ffmpeg 5.1 or newer with ffprobe, and Playwright where the script runs (npm install playwright, then npx playwright install chromium, or --channel chrome with Google Chrome installed). Connection, model discovery, uploads and pricing: see the scenario skill. The cut-out: scenario-image-editing. The video shot: scenario-video, and its background removal: scenario-video-editing. If a sibling skill named here is missing from your available skills, load it with skill_get (Scenario MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install); unattended, proceed from tool schemas and flag the gap.

Quick reference

cp scripts/loop-template.html loop.html            # one loop per file: settings, draw(), overlay
# open loop.html in a browser to preview; ?t=3 freezes it, ?tone=accent or ?tone=light switches tone
node scripts/render-loop.mjs loop.html --check     # determinism and loop seam, no video
node scripts/render-loop.mjs loop.html --stills look --at 0,3,6,9               # stills to look at
node scripts/render-loop.mjs loop.html --out loop.mp4                            # 12 s, 1920x1080, 24 fps
node scripts/render-loop.mjs loop.html --params "overlay=subject.png" --out loop.mp4   # with a cut-out
node scripts/render-loop.mjs loop.html --width 1080 --height 1920 --out loop-9x16.mp4  # vertical
node scripts/render-loop.mjs --qa loop.mp4 composite.mp4   # seam and format check of any MP4
  • Run it from a folder where Playwright is installed. Existing files are never overwritten without --force.
  • The page check renders one moment twice (they must match) and compares the frame at exactly 12 s with the frame at 0 s. It also compares the step across the loop point with the motion around it and at every cycle boundary.
  • A render refuses to encode unless the check prints PASS. --ignore-seam is only for a cut designed to sit at the loop point; it waives the seam verdict of both checks.
  • Defaults, the settings the 80 loops shipped with: 24 fps, 8 motion-blur sub-frames over a 180 degree shutter, 2x supersampling, H.264 High, CRF 16, 4:2:0, BT.709 limited range, faststart.
  • A full 1080p render took about 6 minutes at authoring time (about 1.3 s per frame). Run it with a long timeout, or in the background.

Rules every tile follows:

  • Periods: every period divides 12 s (1, 1.5, 2, 3, 4, 6, 12). Use M.phase(t, period, offset).
  • Scrolls: move a whole number of pattern repeats per period; a fractional repeat jumps at the seam.
  • Randomness: only from M.rand(i, salt). Never Math.random, Date or state carried between frames: motion blur and the checks render frames out of order.
  • Units: sizes from u = h / 100, counts from w, so a loop holds at 16:9, 9:16, 1:1 and thumbnail size.
  • Colors: only from P (bg, fg, fg2, mid, accent, paper, ink). Rebrand by changing BRAND; fix contrast by changing tone (dark, accent, light), never by adding a color.
  • Multi-hue loops: a rainbow or hue sweep is the one exception. Compute hues as hsl(${360 * M.phase(t, 12)}, ...) with a period dividing 12, and keep its settings in BRAND so it still rebrands from one place.
  • Easing: from M.ease, with anticipation, overshoot and holds. Constant speed only for scrolls and streams.

Patterns that close the loop, depth without a 3D engine, and review habits: references/loop-craft.md. Read it before writing a new draw().

Worked example: a brand mascot floating over a coded loop

Goal: a 12 s seamless 1920x1080 loop in the brand's colors with the brand's mascot floating in it, and optionally a version where the mascot waves.

  1. Build the loop first (local, free). cp scripts/loop-template.html mascot-loop.html, set BRAND.accent to the brand color, and keep the example tile (Perspective Floor, a grid streaming toward the camera) or write your own draw(). Then:

    node scrip
    
Полный SKILL.md на GitHub

Установить scenario-motion-loops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdreferences/loop-craft.mdscripts/loop-template.htmlscripts/render-loop.mjs

FAQ

Что делает скилл scenario-motion-loops?

Use when someone wants seamless looping motion graphics for video in their own brand colors: animated backgrounds behind titles, filler for the dead seconds between AI shots, bumpers, transitions or shape animations, built as code and rendered to MP4, optionally with their mascot, product or character from Scenario composited over the loop. Keywords: seamless loop, motion background, canvas animation, motion graphics, loop seam, motion blur, H.264 export, alpha composite.

Как установить скилл scenario-motion-loops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл scenario-motion-loops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить scenario-motion-loops с