Summary

Methods

reset()shared
Rewinds the tween to the beginning and restores the initial values of the subject.
Moves the tween to a point in time and updates the fields of the subject to match.
Advances the tween by a time delta and updates the fields of the subject to match.

Methods

Tween:reset()

shared packages/tween/lib/tween.lua:347

Rewinds the tween to the beginning and restores the initial values of the subject.

Returns

  • Boolean true if the tween has reached its end, which is never the case after a reset

Tween:set(clock)

shared packages/tween/lib/tween.lua:319

Moves the tween to a point in time and updates the fields of the subject to match.

Parameters

  • clock Number elapsed time, clamped to the range from 0 to the duration

Returns

  • Boolean true if the tween has reached its end

Tween:update(dt)

shared packages/tween/lib/tween.lua:354

Advances the tween by a time delta and updates the fields of the subject to match.

Parameters

  • dt Number time passed since the last update, in the unit of the duration

Returns

  • Boolean true if the tween has reached its end

Defined in