Class TweenOptions<Value, Obj>

Tween takes the following options:

Obj

  • an actual object, a function that returns an object, or null (in which case the value is internal only)

Obj

is set

From

  • defaults to current value

To

  • required

Duration

  • Time in ms. Defaults to 1000

Easing

  • Function of t in [0, 1]. Defaults to easing.linear

Interpolate

  • Function to use for setting a new value. Depends on data type, such as color, vector, angle, ...

Type Parameters

  • Value

  • Obj extends object = undefined

Constructors

Properties

duration: number = 1000
easing: "linear" | EasingFunction | "easeInSine" | "easeOutSine" | "easeInOutSine" | "easeInQuad" | "easeOutQuad" | "easeInOutQuad" | "easeInCubic" | "easeOutCubic" | "easeInOutCubic" | "easeInQuart" | "easeOutQuart" | "easeInOutQuart" | "easeInQuint" | "easeOutQuint" | "easeInOutQuint" | "easeInExpo" | "easeOutExpo" | "easeInOutExpo" | "easeInCirc" | "easeOutCirc" | "easeInOutCirc" | "easeInBack" | "easeOutBack" | "easeInOutBack" | "easeInElastic" | "easeOutElastic" | "easeInOutElastic" | "easeOutBounce" | "easeInBounce" | "easeInOutBounce" = "linear"
from?: Value
interpolate: ((from, to, easeProgress) => Value)

Type declaration

obj?: Obj
onSetup?: (() => unknown)

Type declaration

    • (): unknown
    • Returns unknown

onTeardown?: (() => unknown)

Type declaration

    • (): unknown
    • Returns unknown

onUpdate?: ((value) => unknown)

Type declaration

    • (value): unknown
    • Parameters

      Returns unknown

property?: keyof Obj
to: Value

Generated using TypeDoc