Engine

Drives and synchronises all Animation, Timer, and Timeline instances.

import { engine } from 'animejs';

Execution order

Timers, animations, and timelines are executed in the order they are added to the engine. To control the execution order within the engine tick loop, use the priority parameter: instances with lower values are executed first.

animate(targets, { x: 100, priority: 0 }); // Runs first
animate(targets, { y: 100, priority: 2 }); // Runs last
animate(targets, { z: 100 });              // Default priority: 1