Platinum sponsors

Default values

See and override the parameters your code leaves to their default value.

A parameter your code does not set uses a default value. The editor shows it in a dimmed row, with the value in use.

The Anime.js editor Parameters folder of Cards rise, with duration marked and the parameters the code does not set dimmed

Where the value comes from

A timer, an animation or a timeline takes each parameter it does not set from the global engine defaults, the engine.defaults object.

A timeline can also set defaults for its children. A child takes each parameter it does not set from these timeline defaults first, then from the engine defaults. Select the timeline to edit them in its Children default folder.

createTimeline({ id: 'Cards intro', defaults: { duration: 600 } })
.label('Cards in', 200)
.add('.card', {
  id: 'Cards rise',
  y: { from: 40, to: 0 },
  delay: stagger(60, { ease: 'inOut(3)' }),
}, 'Cards in+=100');

Cards rise sets no duration, so its duration row shows the 600 of the timeline defaults.

Override a default value

Click the Override the default value button of the row. The call gets the value in use as its own value, and you can edit it.

The duration row of Cards rise, dimmed at 600 with its pencil button
Default value
The duration row of Cards rise after the pencil button, set to 600 with an unsaved dot and its type menu
Value set on the call

The save writes the value into the call:

.add('.card', {
  id: 'Cards rise',
  y: { from: 40, to: 0 },
  duration: 600,
  delay: stagger(60, { ease: 'inOut(3)' }),
}, 'Cards in+=100');

Go back to the default value

Pick default in the type menu of the row. The save removes the parameter from the call.

Auto values

A property without a from or to value uses the current value of its target. The editor shows it as auto, with the value in use, and the pencil button overrides it like a default value.

The from row of the x property of Square slide, dimmed with its 0px value in use and its pencil button
Previous
Next