Options
All
  • Public
  • Public/Protected
  • All
Menu

Structure that describes a single tween. It is passed into the addTween functions on TweenService.

Hierarchy

  • TweenDesc

Index

Constructors

constructor

  • Parameters

    • Optional cid: ComponentTypeId
    • Optional offset: number
    • Optional duration: number
    • Optional func: TweenFunc
    • Optional loop: LoopMode
    • Optional destroyWhenDone: boolean
    • Optional t: number

    Returns TweenDesc

Properties

cid

Target: target component.

destroyWhenDone

destroyWhenDone: boolean

If true, destroys the tweening entity (not the target entity) when the tweening operation ends.

duration

duration: number

Duration of tween, in seconds.

func

func: TweenFunc

The tweening function to use, as defined in the TweenFunc enum.

loop

loop: LoopMode

The looping behavior to use.

offset

offset: number

Target: offset in the component. This is the field offset into the component memory, in bytes. This offset is set automatically when using JS or TS generic addTween functions. Internally, it is retrieved from the ComponentType.FieldName.$o prototype value. For example TransformLocalPosition.position.y.$o has an offset of 4: The second float value inside the TransformLocalPosition component.

t

t: number

Current time of tween, in seconds. Negative if the tween has not started. Setting a negative value delays the start of the tween. You can chain multiple tweens together by having them start at different offsets.

Static _size

_size: number

Methods

Static _fromPtr

  • Parameters

    Returns TweenDesc

Static _tempHeapPtr

  • Parameters

    Returns number

Static _toPtr

  • Parameters

    Returns void

Generated using TypeDoc