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: 955

Created at: 5.12.2020

Uploaded: 3.3.2022
Small code refactors for better readbility (why did I think it was a good idea to use one or two letters to name my variables?)
Invalid parameters will be removed from the current tweening and no longer throw and error.
Invalid inputs to the tweeningmethods like a operator or anything non parameter will raise an Exception TargetIsNotParameter. Can be accessed via the Exceptions attribute,
Download