Loading...
Loading...
Use when implementing Disney's 12 animation principles with Lottie animations exported from After Effects
npx skill4agent add dylantarre/animation-principles lottie-bodymovins = transform.scale[1]; [100 + (100-s), s]// Control at runtime
lottie.setSpeed(1.5); // affect squash timing// Play anticipation segment
anim.playSegments([0, 10], true);
setTimeout(() => anim.playSegments([10, 50], true), 200);// Layer multiple Lotties
<div className="scene">
<Lottie animationData={background} style={{ opacity: 0.6 }} />
<Lottie animationData={hero} style={{ zIndex: 10 }} />
</div>// Jump to specific poses
anim.goToAndStop(25, true); // frame 25thisComp.layer("Parent").transform.position.valueAtTime(time - 0.05)// Adjust playback speed dynamically
anim.setSpeed(0.5); // slower
anim.setSpeed(2); // faster// Trigger secondary animation
mainAnim.addEventListener('complete', () => {
secondaryAnim.play();
});
// Or sync with frame
mainAnim.addEventListener('enterFrame', (e) => {
if (e.currentTime > 15) particleAnim.play();
});anim.setSpeed(0.5); // half speed - dramatic
anim.setSpeed(1); // normal
anim.setSpeed(2); // double speed - snappy
// Or control frame rate in AE export
// 24fps = cinematic, 30fps = smooth, 60fps = fluidamp = 15; freq = 3; decay = 5; n = 0; time_start = key(1).time; if (time > time_start) { n = (time - time_start) / thisComp.frameDuration; amp * Math.sin(freq*n) / Math.exp(decay*n/100); } else { 0; }// React Lottie with hover
<Lottie
animationData={data}
onMouseEnter={() => anim.setDirection(1)}
onMouseLeave={() => anim.setDirection(-1)}
/>import Lottie from 'lottie-react';
import animationData from './animation.json';
<Lottie
animationData={animationData}
loop={true}
autoplay={true}
style={{ width: 200, height: 200 }}
/>playSegments([start, end])setSpeed(n)setDirection(1/-1)goToAndStop(frame)addEventListenerlottie-interactivity