itch.io is community of indie game creators and players

Devlogs

TweenGMS v2.0 Beta 2

TweenGMS
A browser tool made in HTML5

A new beta for TweenGMS 2 is up!

=============================
 Changes Since Previous Beta
=============================

-Added duration continue swapping
TweenFire("-duration", [1,2], "~patrol", "x>", 10);

-Structs can now be used as valid tween targets
TweenFire(aStruct, EaseLinear, 0, true, 0, 1, "x>", 10);
** Make sure to delete any structs that need to be cleared right away.
** Tween callbacks could continue to be fired if struct not cleared from memory.
** Otherwise, manually destroy tween's as needed.

-Default TweenFire() calls can now use "ease" and "mode" strings
TweenFire(id, "ioSine", "patrol", true, 0, 1, "x>", 10);

-Default TweenFire() calls can now use advanced array parameters for MODE, DURATION, and DELAY
TweenFire(id, ["linear","oQuad"], ["patrol",2], true, [0,1,2], [1,2], "x>", 10);

-TweenAddCallback()/TweenAddCallbackUser() now support "event" strings
"finish", "@finish", etc...

-Default EASE functions are now internally converted to animation curves at startup for improved performance.
 However, to make use of them, you must either use "ease" strings or the new Curve* macros

TweenFire("$60", "~ioQuad", "x>", 10); // Optimised
TweenFire("$60", "~", CurveInOutQuad, "x>", 10); // Optimised
TweenFire("$60", "~", EaseInOutQuad, "x>", 10); // Not Optimised -- still calls ease function directly

-Added support for object property prefixes -- "obj_Player.x"
TweenFire("$60", "obj_Player.x", 0, 10);
guy = o_Guy;
TweenFire("$60", "guy.x", 0, 10);

-Fixed To/From support for structs when using TPTarget
TweenFire("$60", TPTarget(o_Player, "x>"), 10);
TweenFire("$60", TPTarget(aStruct, "y<"), 10);

-Change TGMS_PropertyMethod to TPFunc() and TPFuncX() -- Can also be directly used in a Tween function call
// Create 'myProp' property to be used in tween call
TPFunc("myProp", function(value,target){ target.myValue = value }, function(target){ return target.myValue });
TweenFire("$60", "myProp>", 10);

// Use TPFunc directly inside tween call
TweenFire("$60", TPFunc("abc", function(v,t){t.abc=v}), 0, 10);
// "abc" can still be resued in further calls
TweenFire(">>", "$60", "abc", 10, 100);

-Added ability to pass target id for inline tween callbacks by passing a struct as first array element with target value
TweenFire(..., "@finish", [{target:other}, Explode]);

-Added TWEEN_SELF so tweens can now reference themselves in functions/methods for event callbacks.
TweenFire("$60", "#patrol", "x>", 100, "@continue", function(){ TweenPause(TWEEN_SELF) });

-TweenMore() now works with 0,-1,-2,... indexing
TweenFire(...);
TweenMore(0, "ioSine", "patrol", true, 0, 1, "x>", 10);

-Animation curve channels can now be directly passed as an ease type without the need for EaseCurve()
TweenFire("$60", "~", aChannel", "x>", 20); 

-Added 'Tweens' selection target support
TweenPause({target: aStruct})

-EaseCurve() now takes an optional channel argument

-Added TGMS_ConvertEaseToCurve() for converting existing ease functions into animation curve channels

-Fixed issue where TweenEventClear() failed to actually clear the event... derp.

-TPStruct() has been merged into TPTarget()

-Fixed TweenIsPaused()


Files

  • TweenGMS v2.0 Beta 2 (Requires GMS 2.3.1) 77 kB
    Nov 26, 2020
Download TweenGMS
Read comments (3)