GTweener is an experimental class that provides a static interface and basic override management for GTween. It adds about 1kb to GTween. With GTweener, if you tween a value that is already being tweened, the new tween will override the old tween for only that value. The old tween will continue tweening other values uninterrupted.

GTweener also serves as an interesting example for utilizing GTween's "~~" plugin registration feature, where a plugin can be registered to run for every tween.

GTweener introduces a small amount overhead to GTween, which may have a limited impact on performance critical scenarios with large numbers (thousands) of tweens.

Static methods

staticadd(tween:GTween):Void

Adds a tween to be managed by GTweener.

@:value({ pluginData : null, props : null, values : null, duration : 1, target : null })staticfrom(?target:Any, duration:Float = 1, ?values:Any, ?props:Any, ?pluginData:Any):GTween

Tweens the target from the specified values to its current values.

staticgetTween(target:Any, name:String):GTween

Gets the tween that is actively tweening the specified property of the target, or null if none.

staticgetTweens(target:Any):Array<GTween>

Returns an array of all tweens that GTweener is managing for the specified target.

@:value({ paused : true })staticpauseTweens(target:Any, paused:Bool = true):Void

Pauses all tweens that GTweener is managing for the specified target.

staticremove(tween:GTween):Void

Removes a tween from being managed by GTweener.

staticremoveTweens(target:Any):Void

Removes all tweens that GTweener is managing for the specified target.

staticresumeTweens(target:Any):Void

Resumes all tweens that GTweener is managing for the specified target.

@:value({ pluginData : null, props : null, values : null, duration : 1, target : null })staticto(?target:Any, duration:Float = 1, ?values:Any, ?props:Any, ?pluginData:Any):GTween

Tweens the target to the specified values.

Methods

init(tween:GTween, name:String, value:Float):Float

tween(tween:GTween, name:String, value:Float, initValue:Float, rangeValue:Float, ratio:Float, end:Bool):Float