-
Notifications
You must be signed in to change notification settings - Fork 90
Functions
Caleb Sacks edited this page Aug 7, 2020
·
5 revisions
A function is a type of Vidar property that is evaluated every frame.
// the layer's `x` property will always be one tenth of the time elapsed
options.x = (layer, reltime) => 0.1 * reltime;// the element's opacity will be randomized each animation frame
options.opacity = (layer, reltime) => Math.random();The value of this property is a function that is passed two arguments, element and reltime.
| Argument | Description |
|---|---|
element |
the movie or layer that to which the property belongs to |
reltime |
the time relative to that element as a DOMHighResTimeStamp
|