Skip to main content

CustomPropertyAnimation

ecs.CustomPropertyAnimation

Description

Animate a single number property on the attributes of a target object.

Functions

See component schema.

Schema

PropertyTypeDescription
attributestringSelected attribute to animate (e.g. position, scale, material)
propertystringIndividual property to animate (e.g. x, y, or z for a vector attribute)
target (optional)eidThe target object to animate. If not specified, the animation is run on the object that the component is attached to.
fromobjectThe starting state of the animation ({x, y, z})
toobjectThe ending state of the animation ({x, y, z})
autoFrombooleanIf enabled, ignore 'from' property and animate from the state of the object at the start of the animation.
durationnumberLength of time that the animation runs in milliseconds.
loopbooleanIf enabled, repeat the animation.
reversebooleanWhether to play in reverse, if loop set.
easeInbooleanIf enabled, easing function will be applied over time instead of straight interpolation (quadratic by default)
easeOutbooleanIf enabled, easing function will be applied over time instead of straight interpolation (quadratic by default)
easingFunctionstringChoose from Quadratic (default), Cubic, Quartic, Quintic, Sinusoidal, Exponential, Circular, Elastic, Back, and Bounce