zimjs 18.0.8 → 18.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/zim.js +145 -34
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -56591,7 +56591,7 @@ RETURNS an index Number (or undefined) | col | row | an Array of [index, col, ro
|
|
|
56591
56591
|
// SUBSECTION ANIMATE, WIGGLE, LOOP
|
|
56592
56592
|
|
|
56593
56593
|
/*--
|
|
56594
|
-
obj.animate = function(props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp)
|
|
56594
|
+
obj.animate = function(props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick)
|
|
56595
56595
|
|
|
56596
56596
|
animate
|
|
56597
56597
|
zim DisplayObject method
|
|
@@ -56807,6 +56807,18 @@ const line = new Squiggle().center();
|
|
|
56807
56807
|
new Circle(10, red).addTo().animate({path:line}, 1);
|
|
56808
56808
|
END EXAMPLE
|
|
56809
56809
|
|
|
56810
|
+
EXAMPLE
|
|
56811
|
+
// animate across colors
|
|
56812
|
+
const colors = series("#f0f","#0f0","#00f","#f00","#ff0").mix();
|
|
56813
|
+
new Rectangle(W,H,colors)
|
|
56814
|
+
.addTo()
|
|
56815
|
+
.animate({
|
|
56816
|
+
props:{color:colors},
|
|
56817
|
+
loopPick:true,
|
|
56818
|
+
rewindPick:true
|
|
56819
|
+
});
|
|
56820
|
+
END EXAMPLE
|
|
56821
|
+
|
|
56810
56822
|
PARAMETERS
|
|
56811
56823
|
** supports DUO - parameters or single object with properties below
|
|
56812
56824
|
** supports VEE - parameters marked with ZIM VEE mean a zim Pick() object or Pick Literal can be passed
|
|
@@ -56954,6 +56966,7 @@ call - (default null) the function to call when the animation is done
|
|
|
56954
56966
|
params - (default target) a single parameter for the call function (eg. use object literal or array)
|
|
56955
56967
|
wait - |ZIM VEE| (default 0) seconds to wait before doing animation
|
|
56956
56968
|
can be negative for series to start animation before previous animation ends
|
|
56969
|
+
also see the waiting property
|
|
56957
56970
|
waitedCall - (default null) calls function after wait is done if there is a wait
|
|
56958
56971
|
waitedParams - (default target) parameters to send waitedCall function
|
|
56959
56972
|
loop - (default false) set to true to loop animation
|
|
@@ -56976,7 +56989,6 @@ rewindEase - (default null) overwrite the ease for the rewind direction
|
|
|
56976
56989
|
so setting rewindEase:"bounceOut" will bounce back at the start of the animation
|
|
56977
56990
|
note - setting ease:"bounceOut" will bounce at the end of the animation
|
|
56978
56991
|
this allows for a normal start with a bounce and then a normal start at rewind and a bounce
|
|
56979
|
-
|
|
56980
56992
|
startCall - (default null) calls function at the start of actual animation and after any wait (and waitedCall)
|
|
56981
56993
|
this is basically the same as the waitedCall but will also be called at the start of animation when there is no waitedCall
|
|
56982
56994
|
startParams - (default target) parameters to send startCall function
|
|
@@ -57098,6 +57110,12 @@ timeUnit - (default TIME) override the TIME setting to "seconds" / "s" or "milli
|
|
|
57098
57110
|
timeCheck - (default true) set to false to not have animate() warn of potentially wrong time units - see also TIMECHECK
|
|
57099
57111
|
noAnimateCall - (default true) set to false to not call the callback function if ANIMATE is set to false
|
|
57100
57112
|
pathDamp - (default .15) damping for drag along path
|
|
57113
|
+
rewindPick - (default false) set to true to pick from props as it rewinds
|
|
57114
|
+
this will be moved to the other rewind parameters in ZIM 019
|
|
57115
|
+
also see loopPick - using both loopPick and rewindPick will act like a series
|
|
57116
|
+
where if the property has a series it will animate one after the other
|
|
57117
|
+
do not use if the property is just a regular value as it will appear to stop the animation.
|
|
57118
|
+
Can use a series, results of a function, min max or array for random picks
|
|
57101
57119
|
|
|
57102
57120
|
PROPERTIES - zim.animate() adds the following properties to any object it animates:
|
|
57103
57121
|
animating - read-only - true when animating (including when waiting)
|
|
@@ -57168,8 +57186,8 @@ EVENTS - zim animate() will add an "animation" event to the target IF the events
|
|
|
57168
57186
|
|
|
57169
57187
|
RETURNS the target for chaining (or null if no target is provided and run on zim with series)
|
|
57170
57188
|
--*///+45
|
|
57171
|
-
zim.animate = function(target, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp) {
|
|
57172
|
-
var sig = "target, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp";
|
|
57189
|
+
zim.animate = function(target, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick) {
|
|
57190
|
+
var sig = "target, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick";
|
|
57173
57191
|
|
|
57174
57192
|
if (target && (target.props || target.obj)) {
|
|
57175
57193
|
var duo; if (duo = zob(zim.animate, arguments, sig)) return duo;
|
|
@@ -57190,8 +57208,8 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57190
57208
|
// last param is noWarning - sent internal as false by wiggle for instance
|
|
57191
57209
|
var timeType = getTIME(null, timeUnit, null, null, zot(timeCheck)?false:!timeCheck);
|
|
57192
57210
|
|
|
57193
|
-
if (
|
|
57194
|
-
if (
|
|
57211
|
+
if (loopCall || loopWait || loopPick || loopCount) loop = true;
|
|
57212
|
+
if (rewindCall || rewindWait || rewindPick || rewindTime || rewindEase) rewind = true;
|
|
57195
57213
|
|
|
57196
57214
|
var i, prop, currentCount;
|
|
57197
57215
|
var startArguments = arguments;
|
|
@@ -57341,7 +57359,6 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57341
57359
|
sequenceTarget.animating = true;
|
|
57342
57360
|
}
|
|
57343
57361
|
function sequenceDone() {
|
|
57344
|
-
sequenceTarget.animating = false;
|
|
57345
57362
|
if (call) call(params||sequenceTarget);
|
|
57346
57363
|
}
|
|
57347
57364
|
|
|
@@ -57389,7 +57406,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57389
57406
|
if (i==0 && sequence!=0) seqTime = timeType=="s"?.02:20; // patched in 10.7.0 and 10.7.1
|
|
57390
57407
|
|
|
57391
57408
|
// zim.animate(tar, tar.zimObj, time, ease, (i==target.length-1?call:null), (i==target.length-1?params:null)
|
|
57392
|
-
zim.animate(tar, tar.zimObj, time, ease, (i==target.length-1?sequenceDone:null), null, wait, waitedCall, waitedParams, null, null, null, null, null, null, null, loopPick, null, null, null, null, null, null, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, null, sequenceCall, sequenceParams, null, null, ticker, zim.copy(cjsProps), css, protect, override, null, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, seqTime, rrr, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp); // do not send from!
|
|
57409
|
+
zim.animate(tar, tar.zimObj, time, ease, (i==target.length-1?sequenceDone:null), null, wait, waitedCall, waitedParams, null, null, null, null, null, null, null, loopPick, null, null, null, null, null, null, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, null, sequenceCall, sequenceParams, null, null, ticker, zim.copy(cjsProps), css, protect, override, null, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, seqTime, rrr, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick); // do not send from!
|
|
57393
57410
|
|
|
57394
57411
|
}
|
|
57395
57412
|
return sequenceTarget;
|
|
@@ -57737,7 +57754,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57737
57754
|
}
|
|
57738
57755
|
}
|
|
57739
57756
|
|
|
57740
|
-
props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp
|
|
57757
|
+
// props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick
|
|
57741
57758
|
|
|
57742
57759
|
|
|
57743
57760
|
// -----------------------------
|
|
@@ -57747,7 +57764,6 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57747
57764
|
if (!target.tweenStates) target.tweenStates = {all:true};
|
|
57748
57765
|
|
|
57749
57766
|
var fromCheck = false;
|
|
57750
|
-
|
|
57751
57767
|
|
|
57752
57768
|
// Handle notes
|
|
57753
57769
|
if (obj.note) {
|
|
@@ -58691,7 +58707,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58691
58707
|
sequenceWait:sequenceWait
|
|
58692
58708
|
}
|
|
58693
58709
|
|
|
58694
|
-
function doLoopCall() {
|
|
58710
|
+
function doLoopCall() {
|
|
58695
58711
|
if (wait3>0) target.waiting = false;
|
|
58696
58712
|
if (!cjsProps.loop) return; // added Cat 03 - was being called even if not looping
|
|
58697
58713
|
if (sequenceCall && typeof sequenceCall == 'function') {
|
|
@@ -58718,12 +58734,24 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58718
58734
|
adjustedScale = zim.Pick.choose(savedPicks.scale, null, target);
|
|
58719
58735
|
}
|
|
58720
58736
|
|
|
58737
|
+
|
|
58738
|
+
|
|
58721
58739
|
if (!from) {
|
|
58740
|
+
|
|
58722
58741
|
if (tween.step && tween.step.prev && tween.step.prev.props) {
|
|
58723
58742
|
for (var i in tween.step.prev.props) {
|
|
58724
58743
|
if (extraTypes.indexOf(i) >= 0) continue; // skip for extras
|
|
58725
58744
|
var p = zim.Pick.choose(savedPicks[i], null, target);
|
|
58726
58745
|
|
|
58746
|
+
// handle color at loop - ZIM 018
|
|
58747
|
+
if (i=="colorRange") i = "color"
|
|
58748
|
+
var p = zim.Pick.choose(savedPicks[i], null, target);
|
|
58749
|
+
if (i=="color") i = "colorRange";
|
|
58750
|
+
if (target.setColorRange && i=="colorRange") {
|
|
58751
|
+
target.setColorRange(target.color, p);
|
|
58752
|
+
continue;
|
|
58753
|
+
}
|
|
58754
|
+
|
|
58727
58755
|
// also handle relative
|
|
58728
58756
|
if (typeof p == "string" && i != "transform") {
|
|
58729
58757
|
if (p.substr(0,1) != "+" && p.substr(0,1) != "-") {
|
|
@@ -58738,7 +58766,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58738
58766
|
|
|
58739
58767
|
// ZIM ZIM 02 patch to make non-rewind work with loopPick
|
|
58740
58768
|
// the difference seems to be using tween.step.prev for rewind and tween.step for non-rewind
|
|
58741
|
-
// we had tween.step.prev for both since the
|
|
58769
|
+
// we had tween.step.prev for both since the begining - we must not have tested on a non-rewind
|
|
58742
58770
|
if (rewind) {
|
|
58743
58771
|
if (!zot(savedPicks[i])) tween.step.prev.props[i] = p;
|
|
58744
58772
|
if (i=="scaleX" && !zot(adjustedScale)) tween.step.prev.props.scaleX = adjustedScale;
|
|
@@ -58793,7 +58821,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58793
58821
|
params6 = cjsProps.startParams;
|
|
58794
58822
|
delete cjsProps.startParams;
|
|
58795
58823
|
}
|
|
58796
|
-
function doStartCall(tween) {
|
|
58824
|
+
function doStartCall(tween) {
|
|
58797
58825
|
if (tween.startCalled) return;
|
|
58798
58826
|
tween.startCalled = true;
|
|
58799
58827
|
if (call6 && typeof call6 == 'function') {(call6)(params6||target);}
|
|
@@ -58935,11 +58963,65 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58935
58963
|
|
|
58936
58964
|
// REWIND TWEENS
|
|
58937
58965
|
|
|
58938
|
-
function doRewindCall() {
|
|
58966
|
+
function doRewindCall() {
|
|
58967
|
+
// ADDED in ZIM 018
|
|
58968
|
+
|
|
58969
|
+
if (!from && rewindPick) {
|
|
58970
|
+
|
|
58971
|
+
var adjustedScale;
|
|
58972
|
+
if (!zot(savedPicks.scale)) {
|
|
58973
|
+
adjustedScale = zim.Pick.choose(savedPicks.scale, null, target);
|
|
58974
|
+
}
|
|
58975
|
+
|
|
58976
|
+
if (tween.step && tween.step.props) {
|
|
58977
|
+
for (var i in tween.step.props) {
|
|
58978
|
+
if (extraTypes.indexOf(i) >= 0) continue; // skip for extras
|
|
58979
|
+
|
|
58980
|
+
// handle color at rewind - ZIM 018
|
|
58981
|
+
if (i=="colorRange") i = "color"
|
|
58982
|
+
var p = zim.Pick.choose(savedPicks[i], null, target);
|
|
58983
|
+
if (i=="color") i = "colorRange";
|
|
58984
|
+
if (target.setColorRange && i=="colorRange") {
|
|
58985
|
+
target.setColorRange(p, target.color);
|
|
58986
|
+
continue;
|
|
58987
|
+
}
|
|
58988
|
+
|
|
58989
|
+
// also handle relative
|
|
58990
|
+
if (typeof p == "string" && i != "transform") {
|
|
58991
|
+
if (p.substr(0,1) != "+" && p.substr(0,1) != "-") {
|
|
58992
|
+
var newStart;
|
|
58993
|
+
if (target.zimLastObj && !zot(target.zimLastObj[i])) newStart = target.zimLastObj[i];
|
|
58994
|
+
else newStart = target[i];
|
|
58995
|
+
p = newStart + Number(p.replace(/\s/g,""));
|
|
58996
|
+
}
|
|
58997
|
+
}
|
|
58998
|
+
// end handle relative
|
|
58999
|
+
|
|
59000
|
+
// target.zimLastObj[i] = rewind?target.zimTweenOriginals[i]:p;
|
|
59001
|
+
target.zimLastObj[i] = p;
|
|
59002
|
+
|
|
59003
|
+
if (!zot(savedPicks[i])) {
|
|
59004
|
+
tween.step.props[i] = p; // sets the rewind property
|
|
59005
|
+
tween._stepHead.props[i] = p; // sets the start of a loop to end of rewind
|
|
59006
|
+
}
|
|
59007
|
+
if (i=="scaleX" && !zot(adjustedScale)) {
|
|
59008
|
+
tween.step.props.scaleX = adjustedScale;
|
|
59009
|
+
tween._stepHead.props.scaleX = adjustedScale;
|
|
59010
|
+
}
|
|
59011
|
+
if (i=="scaleY" && !zot(adjustedScale)) {
|
|
59012
|
+
tween.step.props.scaleY = adjustedScale;
|
|
59013
|
+
tween._stepHead.props.scaleY = adjustedScale;
|
|
59014
|
+
}
|
|
59015
|
+
|
|
59016
|
+
}
|
|
59017
|
+
}
|
|
59018
|
+
}
|
|
59019
|
+
// END ADDED in ZIM 018
|
|
59020
|
+
|
|
58939
59021
|
if (wait2>0) target.waiting = false;
|
|
58940
59022
|
if (call2 && typeof call2 == 'function') {(call2)(params2);}
|
|
58941
59023
|
}
|
|
58942
|
-
function doRewindWaitCall() {
|
|
59024
|
+
function doRewindWaitCall() {
|
|
58943
59025
|
if (wait2>0) target.waiting = true;
|
|
58944
59026
|
if (call5 && typeof call5 == 'function') {(call5)(params5);}
|
|
58945
59027
|
}
|
|
@@ -58963,23 +59045,28 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58963
59045
|
}
|
|
58964
59046
|
|
|
58965
59047
|
var startTest = false;
|
|
58966
|
-
var obj2;
|
|
59048
|
+
var obj2;
|
|
59049
|
+
|
|
58967
59050
|
function tween1(lastTween) {
|
|
58968
59051
|
if (!startTest) {
|
|
58969
|
-
obj2 = getStart();
|
|
58970
|
-
startTest = true;
|
|
58971
|
-
}
|
|
58972
|
-
|
|
59052
|
+
obj2 = getStart();
|
|
59053
|
+
startTest = true;
|
|
59054
|
+
}
|
|
59055
|
+
|
|
59056
|
+
if (target.set && !from) target.set(set);
|
|
58973
59057
|
tween = target.zimTweens[id] = target.zimTween = createjs.Tween.get(target, cjsProps)
|
|
58974
|
-
.call(doStartCall)
|
|
59058
|
+
.call(doStartCall)
|
|
58975
59059
|
.to(obj, t, finalEase)
|
|
58976
59060
|
.call(doRewindWaitCall)
|
|
58977
59061
|
.wait(wait2, true)
|
|
58978
59062
|
.call(doRewindCall)
|
|
58979
|
-
|
|
59063
|
+
// this is hard coded... need to inject a different obj2 into createjs tween
|
|
59064
|
+
// and activate the code in doStartCall that makes loop start at end of new rewind
|
|
59065
|
+
.to(obj2, t2, finalEase2)
|
|
58980
59066
|
.call(doneAnimating)
|
|
58981
59067
|
.wait(wait3, true)
|
|
58982
59068
|
.call(doLoopCall);
|
|
59069
|
+
|
|
58983
59070
|
tween.timeScale = target.futureRate;
|
|
58984
59071
|
if (lastTween) transferIds(lastTween, tween);
|
|
58985
59072
|
setZimTweenProps();
|
|
@@ -59416,20 +59503,20 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
59416
59503
|
return;
|
|
59417
59504
|
}
|
|
59418
59505
|
if (cjsProps.loop) {
|
|
59419
|
-
if (count > 0) {
|
|
59506
|
+
if (count > 0) {
|
|
59420
59507
|
if (currentCount < count) {
|
|
59421
59508
|
if (wait3>0) target.waiting = true;
|
|
59422
59509
|
doLoopWaitCall();
|
|
59423
59510
|
currentCount++;
|
|
59424
59511
|
return;
|
|
59425
59512
|
} else {
|
|
59426
|
-
if (rewind) {
|
|
59513
|
+
if (rewind) {
|
|
59427
59514
|
if (target.set) target.set(startObj);
|
|
59428
59515
|
} else {
|
|
59429
59516
|
if (target.set) target.set(obj);
|
|
59430
59517
|
}
|
|
59431
59518
|
}
|
|
59432
|
-
} else {
|
|
59519
|
+
} else {
|
|
59433
59520
|
if (wait3>0) target.waiting = true;
|
|
59434
59521
|
doLoopWaitCall();
|
|
59435
59522
|
return;
|
|
@@ -62390,7 +62477,7 @@ zim global variable
|
|
|
62390
62477
|
|
|
62391
62478
|
DESCRIPTION
|
|
62392
62479
|
|
|
62393
|
-
WARNING - currently, this does not work - see seedRandom() in CODE module.
|
|
62480
|
+
WARNING - currently, this does not work - instead, see seedRandom() in CODE module.
|
|
62394
62481
|
|
|
62395
62482
|
If set, the ZIM rand() function will be seeded with its value.
|
|
62396
62483
|
This means that rand() will repeat in order its random results.
|
|
@@ -62438,7 +62525,7 @@ zim global variable
|
|
|
62438
62525
|
|
|
62439
62526
|
DESCRIPTION
|
|
62440
62527
|
|
|
62441
|
-
WARNING - currently, this does not work - see seedRandom() in CODE module.
|
|
62528
|
+
WARNING - currently, this does not work - instead, see seedRandom() in CODE module.
|
|
62442
62529
|
but there is no equivilant to SEEDRANDOMCOUNT yet - we are working on it.
|
|
62443
62530
|
|
|
62444
62531
|
The current order number used for rand() if SEEDRAND is set or the rand() seedRand parameter is set
|
|
@@ -80746,7 +80833,7 @@ layers - (default TOP) where to place the current particle being emitted - value
|
|
|
80746
80833
|
animation - |ZIM VEE| (default null) a zim animate config object to apply to the particle
|
|
80747
80834
|
This is the whole zim DUO object to pass to animate - including a props parameter that holds the animation object
|
|
80748
80835
|
To pass in two or more animations on the same particle then use {noPick:[{animation1}, {animation2}, {etc.}]}
|
|
80749
|
-
random - (default null) an object holding properties to
|
|
80836
|
+
random - (default null) an object holding properties to set, each property holding a ZIM VEE Value object for Pick.choose() to pick from per particle
|
|
80750
80837
|
eg: {color:[red, white, green], scale:{min:1, max:2}} // scale is a convienence property for both scaleX and scaleY
|
|
80751
80838
|
horizontal - (default false) start the particles across the emitter's width at the top of the emitter (unless vertical is set to true)
|
|
80752
80839
|
vertical - (default false) start the particles across the emitter's height at the left of the emitter (unless horizontal is set to true)
|
|
@@ -92349,7 +92436,7 @@ function zimify(obj, a, b, c, d, list) {
|
|
|
92349
92436
|
hitTestGrid:function(width, height, cols, rows, x, y, offsetX, offsetY, spacingX, spacingY, local, type) {
|
|
92350
92437
|
return zim.hitTestGrid(this, width, height, cols, rows, x, y, offsetX, offsetY, spacingX, spacingY, local, type);
|
|
92351
92438
|
},
|
|
92352
|
-
animate:function(props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp) {
|
|
92439
|
+
animate:function(props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick) {
|
|
92353
92440
|
if (props && (props.props || props.obj) && isDUO(arguments)) {
|
|
92354
92441
|
// run this if duo but only if props object has a props or obj object
|
|
92355
92442
|
// can you believe that sentence makes sense
|
|
@@ -92358,7 +92445,7 @@ function zimify(obj, a, b, c, d, list) {
|
|
|
92358
92445
|
// it can only be a configuration object if there is a props or obj property
|
|
92359
92446
|
arguments[0].target = this; return zim.animate(arguments[0]);
|
|
92360
92447
|
}
|
|
92361
|
-
else {return zim.animate(this, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp);}
|
|
92448
|
+
else {return zim.animate(this, props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp, rewindPick);}
|
|
92362
92449
|
},
|
|
92363
92450
|
pauseAnimate:function(){return this;},
|
|
92364
92451
|
stopAnimate:function(){return this;},
|
|
@@ -92742,39 +92829,63 @@ EXAMPLE
|
|
|
92742
92829
|
const data = {size:10, season:"summer"};
|
|
92743
92830
|
// addWires returns the object data - which will now have the wired method
|
|
92744
92831
|
// now, when the slider or tabs change the data object will be updated
|
|
92745
|
-
// note: we want the slider to be set to the object's start value so set the setSource to
|
|
92832
|
+
// note: we want the slider to be set to the object's start value so set the setSource to true
|
|
92746
92833
|
// note: we want the text of the tabs not the default index so need to provide input property
|
|
92747
|
-
addWires(data).wired(slider, "size", null,
|
|
92834
|
+
addWires(data).wired(slider, "size", null, true).wired({source:tabs, prop:"season", input:"text"});
|
|
92835
|
+
S.on("stagemouseup", ()=>{zog(data);});
|
|
92748
92836
|
END EXAMPLE
|
|
92749
92837
|
|
|
92750
92838
|
PARAMETERS
|
|
92751
92839
|
obj - the object to receive the wire and wired methods
|
|
92752
92840
|
|
|
92753
|
-
RETURNS - obj for
|
|
92841
|
+
RETURNS - obj for chaining
|
|
92754
92842
|
--*///+83.365
|
|
92755
92843
|
zim.addWires = function(obj) {
|
|
92756
|
-
if (isDUO(arguments)) {arguments[0].obj = this; return zim.addWires(arguments[0]);}
|
|
92844
|
+
// if (isDUO(arguments)) {arguments[0].obj = this; return zim.addWires(arguments[0]);}
|
|
92757
92845
|
z_d("83.365");
|
|
92758
92846
|
obj.wire = function() {
|
|
92847
|
+
if (isDUO(arguments)) {arguments[0].obj = this; return zim.wire(arguments[0]);}
|
|
92759
92848
|
Array.prototype.unshift.call(arguments, obj);
|
|
92760
92849
|
zim.wire.apply(null, arguments);
|
|
92761
92850
|
return obj;
|
|
92762
92851
|
};
|
|
92763
92852
|
obj.noWire = function() {
|
|
92853
|
+
if (isDUO(arguments)) {arguments[0].obj = this; return zim.noWire(arguments[0]);}
|
|
92764
92854
|
Array.prototype.unshift.call(arguments, obj);
|
|
92765
92855
|
zim.noWire.apply(null, arguments);
|
|
92766
92856
|
return obj;
|
|
92767
92857
|
};
|
|
92768
92858
|
obj.wired = function() {
|
|
92859
|
+
if (isDUO(arguments)) {arguments[0].obj = this; return zim.wired(arguments[0]);}
|
|
92769
92860
|
Array.prototype.unshift.call(arguments, obj);
|
|
92770
92861
|
zim.wired.apply(null, arguments);
|
|
92771
92862
|
return obj;
|
|
92772
92863
|
};
|
|
92773
92864
|
obj.noWired = function() {
|
|
92865
|
+
if (isDUO(arguments)) {arguments[0].obj = this; return zim.noWired(arguments[0]);}
|
|
92774
92866
|
Array.prototype.unshift.call(arguments, obj);
|
|
92775
92867
|
zim.noWired.apply(null, arguments);
|
|
92776
92868
|
return obj;
|
|
92777
92869
|
};
|
|
92870
|
+
|
|
92871
|
+
|
|
92872
|
+
// wire:function(target, prop, twoWay, setSource, filter, call, input) {
|
|
92873
|
+
// if (isDUO(arguments)) {arguments[0].obj = this; return zim.wire(arguments[0]);}
|
|
92874
|
+
// else {return zim.wire(this, target, prop, twoWay, setSource, filter, call, input);}
|
|
92875
|
+
// },
|
|
92876
|
+
// noWire:function(target, prop, input) {
|
|
92877
|
+
// if (isDUO(arguments)) {arguments[0].obj = this; return zim.noWire(arguments[0]);}
|
|
92878
|
+
// else {return zim.noWire(this, target, prop, input);}
|
|
92879
|
+
// },
|
|
92880
|
+
// wired:function(source, prop, twoWay, setSource, filter, call, input) {
|
|
92881
|
+
// if (isDUO(arguments)) {arguments[0].obj = this; return zim.wired(arguments[0]);}
|
|
92882
|
+
// else {return zim.wired(this, source, prop, twoWay, setSource, filter, call, input);}
|
|
92883
|
+
// },
|
|
92884
|
+
// noWired:function(source, prop, input) {
|
|
92885
|
+
// if (isDUO(arguments)) {arguments[0].obj = this; return zim.noWired(arguments[0]);}
|
|
92886
|
+
// else {return zim.noWired(this, source, prop, input);}
|
|
92887
|
+
// },
|
|
92888
|
+
|
|
92778
92889
|
return obj;
|
|
92779
92890
|
};//-83.365
|
|
92780
92891
|
|