Tweener

Programmaticly interpolate parameters.

The Tweener is a powerfull tool to interpolate between different states in parameters over time. 
This can be archived in an absolute way, defining a time in which the interpolation needs to be done
op('tweener').AbsoluteTween( target_parameter, target_value, time_in_seconds, curve:string = optional, delay:string = optional )
op('tweener').RelativeTween( target_parameter, target_value, difference_per_second, curve:string = optional, delay:string = optional )

Or call multiple tweens at once by using Tweens and passing a list of dictionaries with the important informations.
op("tweener").AbsoluteTweens( [ {"par" : target_parameter, "end": target_value, "time": optional, "curve" : optional, "delay" : optional} ]
                                , curve:string = optional
                                ,time:float = optional )

op("tweener").RelativeTweens( [ {"par" : target_parameter, "end": target_value, "time": optional, "curve" : optional, "delay" : optional} ]
                                , curve:string = optional
                                ,time:float = optional )
 
Use the curve-argument to tween using a specific easing-function: https://easings.net/

  • LinearInterpolation
  • QuadraticEaseIn
  • QuadraticEaseOut
  • QuadraticEaseInOut
  • CubicEaseIn
  • CubicEaseOut
  • CubicEaseInOut
  • QuarticEaseIn
  • QuarticEaseOut
  • QuarticEaseInOut
  • QuinticEaseIn
  • QuinticEaseOut
  • SineEaseIn
  • SineEaseOut
  • SineEaseInOut
  • CircularEaseIn
  • CircularEaseOut
  • CircularEaseInOut
  • ExponentialEaseIn
  • ExponentialEaseOut
  • ExponentialEaseInOut
  • ElasticEaseIn
  • ElasticEaseOut
  • ElasticEaseInOut
  • BackEaseIn
  • BackEaseOut
  • BackEaseInOut
  • BounceEaseIn
  • BounceEaseOut
  • BounceEaseInOut


To stop a specific tween, call the StopFade(target_parameter) or, top stop all tweens, the StopAllFades() method.

Downloads: 2478

Created at: 5.12.2020

Uploaded: 1.10.2023
Massive rework of internal structure. Sacrificing a little bit of performance for increased usability.
  • Real fading between Expressions with reevalution of both expresions and Blending! Sick!
  • TypeAnoations!
  • Rework of the callbackSystem. You now get passed a TweenObject containing the following members;
  •     parameter       :   Par
        time            :   float
        startValue      :   tween_value._tweenValue
        targetValue     :   tween_value._tweenValue
        interpolation   :   str             = "LinearInterpolation"
Download