set() V4

Instantly sets targets property values at a specific time of the timeline.

timeline.set(targets, parameters, position);

Parameters

Name Accepts
targets Targets
parameters Animatable properties
position (opt) Time position

Returns

The timeline itself

Can be chained with other timeline methods.

set() code example

import { createTimeline } from 'animejs';

const tl = createTimeline()
.set('.circle', { x: '15rem' })
.set('.triangle', { x: '15rem' }, 500)
.set('.square', { x: '15rem' }, 1000);
<div class="large row">
  <div class="medium pyramid">
    <div class="triangle"></div>
    <div class="square"></div>
    <div class="circle"></div>
  </div>
</div>