UNPKG

framer-motion

Version:

A simple and powerful JavaScript animation library

15 lines (12 loc) 551 B
import { spring } from 'motion-dom'; import { createAnimationsFromSequence } from '../sequence/create.mjs'; import { animateSubject } from './subject.mjs'; function animateSequence(sequence, options, scope) { const animations = []; const animationDefinitions = createAnimationsFromSequence(sequence, options, scope, { spring }); animationDefinitions.forEach(({ keyframes, transition }, subject) => { animations.push(...animateSubject(subject, keyframes, transition)); }); return animations; } export { animateSequence };