BintzGavin/helios / skills/examples/lottie
example-lottie
VerifiedLottie integration patterns for Helios. Use when rendering Lottie (Bodymovin) JSON animations synchronously with Helios.
Lottie + Helios
Integrate Lottie (lottie-web) with Helios by manually seeking the Lottie instance based on the Helios timeline.
Quick Start
import { Helios } from '@helios-project/core';
import lottie from 'lottie-web';
import animationData from './animation.json';
const helios = new Helios({ fps: 30, duration: 5 });
const container = document.getElementById('lottie-container');
// 1. Load Animation (Autoplay OFF)
const anim = lottie.loadAnimation({
container,
renderer: 'svg', // or 'canvas'
loop: false,
autoplay: false, // Critical
animationData
});
// 2. Drive with Helios
helios.subscribe(({ currentFrame, fps }) => {
// Convert to milliseconds
const timeMs = (currentFrame / fps) * 1000;
// Seek to exact time
// Second arg 'false' means "time based", not "frame based"
// (Lottie frames != Helios frames usually)
anim.goToAndStop(timeMs, false);
});
Key Patterns
Time-Based Seeking
Lottie animations have their own internal frame rate. It is usually safer and smoother to seek by time (milliseconds) rather than trying to map Helios frames to Lottie frames, unless you strictly control both.
anim.goToAndStop(timeMs, false);
Renderer Choice
svg: Good for crisp vectors in DOM mode.canvas: Better for performance in Canvas mode or complex scenes.
Source Files
- Example:
examples/lottie-animation/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |