Platinum sponsors

Timeline children

Edit and delete the animations, sets, timers, labels, calls and syncs of a timeline.

Each child of a timeline that has an id gets its own row under the timeline. A label uses its name as its id. See What you can edit for how to name each kind.

Child Editable
add(targets, params) Every parameter, its properties and its time position
set(targets, params) Its property values and its time position
add({ id, duration }) Its playback settings and its time position
label(name) Its name and its time position
call({ id, callback }) muted and its time position. The callback stays in your code
sync({ id, target }) muted and its time position

Select a child to show its parameters in the editor window. Drag it to change its time position.

Delete a child

Select the child and press Backspace, or right-click its segment and pick the delete entry, such as Delete animation.

The Anime.js editor right-click menu of a timeline child, with Delete animation at the bottom

The save removes its call from your code:

// Before
intro
  .add('.title', { id: 'Title reveal', opacity: [0, 1] })
  .add('.card', { id: 'Cards rise', y: [40, 0] })
  .label('Ready');

// After deleting 'Cards rise' and saving
intro
  .add('.title', { id: 'Title reveal', opacity: [0, 1] })
  .label('Ready');

The editor cannot create a timeline child. Add the call in your code with an id, and the editor shows it after the next reload.

Previous
Next