Transition interface

Warning: This API is now obsolete.

Use Component.setProperty() and Component.animateProperty() to apply transitions.

A description of the change in position, size, and rotation of an object over time.

Signature:

export interface Transition 

Remarks

Parameters are all relative to the original unmodified value of that parameter.

ie: changing the position.x by 10 and then changing it by 5 will result in the object being 5 pixels from it's default position, not 15.

Any parameter which isn't set will result in no changes in that aspect of the object.

Properties

PropertyModifiersTypeDescription
function?readonlyCubicBezier(Optional) The function which describes the progression of the transition overtime, use TransitionFunction for common values. If not specified, TransitionFunction.Linear is used.
position?readonlyVector2(Optional) The number of pixels to move the object in each dimension.
rotation?readonlynumber(Optional) The number of pixels to move the object in each dimension.
scale?readonlyVector2(Optional) Enlarge or reduce the object as a fraction of 1 in the given dimension, set both values the same to maintain the aspect ratio
time?readonlynumber(Optional) The number of seconds to spread the transition out over. If not set, the transition will be applied immediately.

Transition.function property

The function which describes the progression of the transition overtime, use TransitionFunction for common values. If not specified, TransitionFunction.Linear is used.

Signature:

readonly function?: CubicBezier;

Transition.position property

The number of pixels to move the object in each dimension.

Signature:

readonly position?: Vector2;

Transition.rotation property

The number of pixels to move the object in each dimension.

Signature:

readonly rotation?: number;

Transition.scale property

Enlarge or reduce the object as a fraction of 1 in the given dimension, set both values the same to maintain the aspect ratio

Signature:

readonly scale?: Vector2;

Transition.time property

The number of seconds to spread the transition out over. If not set, the transition will be applied immediately.

Signature:

readonly time?: number;