Passer au contenu principal

CustomVec3Animation

ecs.CustomVec3Animation

Description

Animate the named 3D vector attribute on a target object.

Functions

See component schema.

Schema

PropertyTypeDescription
attributestringSelected attribute to animate (e.g. position, scale, material)
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