Tween constructor

Tween(
  1. TweenObject tweenObject,
  2. num time, [
  3. TransitionFunction transition = Transition.linear
])

Creates a new Tween for the specified TweenObject with a duration of time seconds.

All display objects implements TweenObject2D and all 3D display additionally objects implements TweenObject3D. Therefore all display objects can be used with with tweens.

Implementation

Tween(TweenObject tweenObject, num time,
    [TransitionFunction transition = Transition.linear])
    : _tweenObject = tweenObject,
      _transition = transition {
  _totalTime = max(0.0001, time);
}