CustomPropertyAnimation
ecs.CustomPropertyAnimation
Description
Animate a single number property on the attributes of a target object.
Functions
See component schema.
Schema
Property | Type | Description |
---|---|---|
attribute | string | Selected attribute to animate (e.g. position, scale, material) |
property | string | Individual property to animate (e.g. x, y, or z for a vector attribute) |
target (optional) | eid | The target object to animate. If not specified, the animation is run on the object that the component is attached to. |
from | object | The starting state of the animation ({x, y, z} ) |
to | object | The ending state of the animation ({x, y, z} ) |
autoFrom | boolean | If enabled, ignore 'from' property and animate from the state of the object at the start of the animation. |
duration | number | Length of time that the animation runs in milliseconds. |
loop | boolean | If enabled, repeat the animation. |
reverse | boolean | Whether to play in reverse, if loop set. |
easeIn | boolean | If enabled, easing function will be applied over time instead of straight interpolation (quadratic by default) |
easeOut | boolean | If enabled, easing function will be applied over time instead of straight interpolation (quadratic by default) |
easingFunction | string | Choose from Quadratic (default), Cubic , Quartic , Quintic , Sinusoidal , Exponential , Circular , Elastic , Back , and Bounce |