Skip to content

2. TweenProperties Explained

prime31 edited this page Apr 29, 2012 · 5 revisions

All Tweens would do nothing without some TweenProperties to animate. Basically, a Tween manages a list of TweenProperties. Each Tween operates on one target object and each of the TweenProperties that was added to the Tween is animated simultaneously.

TweenProperties are the part of GoKit that does the actual tweening. All TweenProperties are subclasses of AbstractTweenProperty. They each house an ease function (used to ease the motion based on the available EaseTypes), whether the tween should be relative (the property will move by the end value specified rather than to it) and the internal details of the tween (start and end values). There are a bunch of available TweenProperties that come packaged with GoKit that handle all the most common tweens. A full list is below and hopefully the names are clear enough as to what property they tween.

Available Specific TweenProperties

  • PositionTweenProperty
  • PositionPathTweenProperty
  • EulerAnglesTweenProperty
  • MaterialColorTweenProperty
  • RotationTweenProperty
  • ScaleTweenProperty
  • ScalePathTweenProperty
  • ShakeTweenProperty - note that the ShakeTweenProperty will run backwards by default. This allows it to start with the greatest magnitude and falloff back to the start values