animare
Version:
Advanced animation library for modern JavaScript.
22 lines • 1.09 kB
TypeScript
import type { AnimationGroupOptions, GroupOnUpdateCallback, GroupTimelineObject } from '../types.js';
/**
* Allows for a different input method where you can use an object with arrays of values for each property instead of an array of animation values.
*
* You can also use a single value as a default for all animations.
*
* ⚠️ **WARNING** ⚠️ All values must have the same length as the `to` value.
*
* 💁 Animation names become their index. For example, `myAnimation.updateValues([{ name: '0', duration: 5000 }])`.
*
* @param animation - An object containing the animation options.
* @param callback - A callback function that is called on each animation frame.
* @returns An object that contains a collection of useful methods and events.
*
* @example
* animare.group({ from: 50, to: [100, 200, 300], delay: [500, 600, 700] }, info => {
* console.log(info[0].value);
* });
*/
export default function group(animation: AnimationGroupOptions, callback: GroupOnUpdateCallback): GroupTimelineObject;
export type Group = typeof group;
//# sourceMappingURL=group.d.ts.map