zimjs 15.0.12 → 15.0.13
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 +199 -108
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -9481,11 +9481,11 @@ END EXAMPLE
|
|
|
9481
9481
|
EXAMPLE
|
|
9482
9482
|
// turn a container of circles into a Bitmap
|
|
9483
9483
|
const circles = new Container(W, H).addTo();
|
|
9484
|
-
loop(
|
|
9485
|
-
new Circle(rand(200), [pink,green,blue,yellow,purple], dark).center(circles);
|
|
9484
|
+
loop(10, ()=>{
|
|
9485
|
+
new Circle(rand(200), [pink,green,blue,yellow,purple], dark).center(circles).ble();
|
|
9486
9486
|
});
|
|
9487
9487
|
const pic = new Bitmap(circles).center().drag();
|
|
9488
|
-
circles.
|
|
9488
|
+
circles.removeFrom();
|
|
9489
9489
|
|
|
9490
9490
|
// previous to ZIM 10.8.0 we needed to use the cacheCanvas:
|
|
9491
9491
|
var pic = new Bitmap(circles.cache().cacheCanvas).center().drag();
|
|
@@ -19239,8 +19239,8 @@ padding - (default 10 if backgroundColor set) places the border this amount from
|
|
|
19239
19239
|
padding parameters are ignored if there is no backgroundColor set (also ignored if a backing parameter is set)
|
|
19240
19240
|
paddingH - (default padding) places border out at top bottom
|
|
19241
19241
|
paddingV - (default padding) places border out at left and right
|
|
19242
|
-
shiftH - (default 0) move the label (CreateJS Text) inside the Label container horizontally
|
|
19243
|
-
shiftV - (default 0) move the label (CreateJS Text) inside the Label container vertically
|
|
19242
|
+
shiftH |ZIM VEE| - (default 0) move the label (CreateJS Text) inside the Label container horizontally
|
|
19243
|
+
shiftV |ZIM VEE| - (default 0) move the label (CreateJS Text) inside the Label container vertically
|
|
19244
19244
|
rollPersist - (default false) set to true to maintain rollover stage as long as mousedown or press is activated (used by Buttons)
|
|
19245
19245
|
labelWidth - (default null) the same as the lineWidth - the text will wrap at the labelWidth (added to match labelHeight)
|
|
19246
19246
|
labelHeight - (default null) the height of the text - setting this will probably alter the font size - so the size parameter is overwritten
|
|
@@ -19344,7 +19344,10 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
19344
19344
|
this.veeObj = {text:oa[0], size:oa[1], font:oa[2], color:oa[3], bold:oa[4], italic:oa[5]};
|
|
19345
19345
|
function remember() {return arguments;}
|
|
19346
19346
|
|
|
19347
|
-
text =
|
|
19347
|
+
text = zik(text);
|
|
19348
|
+
shiftH = zik(shiftH);
|
|
19349
|
+
shiftV = zik(shiftV);
|
|
19350
|
+
|
|
19348
19351
|
var emptyText = false;
|
|
19349
19352
|
if (text === "") {
|
|
19350
19353
|
text = " ";
|
|
@@ -19394,7 +19397,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
19394
19397
|
var that = this;
|
|
19395
19398
|
this.mouseChildren = false;
|
|
19396
19399
|
this.paddingV = paddingV;
|
|
19397
|
-
this.paddingH = paddingH;
|
|
19400
|
+
this.paddingH = paddingH;
|
|
19398
19401
|
|
|
19399
19402
|
// handle DIR effect
|
|
19400
19403
|
if ((WW.DIR && WW.DIR=="rtl") || (!WW.DIR && zim.DIR=="rtl")) {
|
|
@@ -21574,7 +21577,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
21574
21577
|
this.type = "Button";
|
|
21575
21578
|
|
|
21576
21579
|
if (zot(backgroundColor)) backgroundColor=DS.backgroundColor!=null?DS.backgroundColor:zim.purple;
|
|
21577
|
-
if (zot(rollBackgroundColor)) rollBackgroundColor=DS.rollBackgroundColor!=null?DS.rollBackgroundColor:backgroundColor.lighten(.2);
|
|
21580
|
+
if (zot(rollBackgroundColor)) rollBackgroundColor=DS.rollBackgroundColor!=null?DS.rollBackgroundColor:backgroundColor.lighten?backgroundColor.lighten(.2):backgroundColor;
|
|
21578
21581
|
if (zot(downBackgroundColor)) downBackgroundColor=DS.downBackgroundColor!=null?DS.downBackgroundColor:rollBackgroundColor;
|
|
21579
21582
|
|
|
21580
21583
|
var oa = remember(backgroundColor, rollBackgroundColor, downBackgroundColor, color, rollColor, downColor);
|
|
@@ -23100,7 +23103,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
23100
23103
|
if (zot(margin)) margin = DS.margin!=null?DS.margin:10; //20;
|
|
23101
23104
|
if (zot(indicatorType)) indicatorType=DS.indicatorType!=null?DS.indicatorType:"circle";
|
|
23102
23105
|
if (zot(indicatorColor)) indicatorColor=DS.indicatorColor!=null?DS.indicatorColor:zim.white;
|
|
23103
|
-
if (zot(toggleBackgroundColor)) toggleBackgroundColor=DS.toggleBackgroundColor!=null?DS.toggleBackgroundColor:backgroundColor.lighten(.3);
|
|
23106
|
+
if (zot(toggleBackgroundColor)) toggleBackgroundColor=DS.toggleBackgroundColor!=null?DS.toggleBackgroundColor:backgroundColor.lighten?backgroundColor.lighten(.3):backgroundColor;
|
|
23104
23107
|
if (zot(color)) color=DS.color!=null?DS.color:zim.darker;
|
|
23105
23108
|
if (zot(borderColor)) borderColor = DS.borderColor!=null?DS.borderColor:null;
|
|
23106
23109
|
if (zot(borderWidth)) borderWidth = DS.borderWidth!=null?DS.borderWidth:null;
|
|
@@ -24125,7 +24128,7 @@ const panel = new Panel({titleBar:series("TODAY", "TOMORROW")})
|
|
|
24125
24128
|
|
|
24126
24129
|
// content for panel 1
|
|
24127
24130
|
const today = new Circle(30, yellow);
|
|
24128
|
-
panel.add(today,true); // center on content
|
|
24131
|
+
panel.add(today, 0, true); // content, level, center on content
|
|
24129
24132
|
|
|
24130
24133
|
// content for panel 2
|
|
24131
24134
|
const tomorrow = new Label("-30");
|
|
@@ -24133,9 +24136,9 @@ const tomorrow = new Label("-30");
|
|
|
24133
24136
|
// event to change content as panels change
|
|
24134
24137
|
panel.on("change", ()=>{
|
|
24135
24138
|
if (today.parent) {
|
|
24136
|
-
panel.add(tomorrow, true, true); // center and replace
|
|
24139
|
+
panel.add(tomorrow, 0, true, true); // content, level, center and replace
|
|
24137
24140
|
} else {
|
|
24138
|
-
panel.add(today, true, true); // center and replace
|
|
24141
|
+
panel.add(today, 0, true, true); // content, level, center and replace
|
|
24139
24142
|
}
|
|
24140
24143
|
S.update();
|
|
24141
24144
|
});
|
|
@@ -30886,7 +30889,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
30886
30889
|
if (zot(keyArrowsV)) keyArrowsV = DS.keyArrowsV!=null?DS.keyArrowsV:true;
|
|
30887
30890
|
if (zot(keyArrowsStep)) keyArrowsStep = DS.keyArrowsStep!=null?DS.keyArrowsStep:(max-min)/100;
|
|
30888
30891
|
if (zot(damp)) damp = DS.damp!=null?DS.damp:false;
|
|
30889
|
-
if (zot(currentValue)) currentValue = DS.currentValue!=null?DS.currentValue:
|
|
30892
|
+
if (zot(currentValue)) currentValue = DS.currentValue!=null?DS.currentValue:null;
|
|
30890
30893
|
if (zot(expand)) expand = DS.expand!=null?DS.expand:zim.mobile()?10:null;
|
|
30891
30894
|
if (zot(expandVertical)) expandVertical = DS.expandVertical!=null?DS.expandVertical:expand;
|
|
30892
30895
|
if (zot(expandBar)) expandBar = DS.expandBar!=null?DS.expandBar:null;
|
|
@@ -31874,7 +31877,7 @@ NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set
|
|
|
31874
31877
|
EXAMPLE
|
|
31875
31878
|
var dial = new Dial({step:1, backgroundColor:"violet"})
|
|
31876
31879
|
.center()
|
|
31877
|
-
.change()
|
|
31880
|
+
.change(()=>{
|
|
31878
31881
|
zog(dial.currentValue); // 1-10 in steps of 1
|
|
31879
31882
|
});
|
|
31880
31883
|
S.update();
|
|
@@ -32043,7 +32046,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32043
32046
|
if (zot(continuous)) continuous = DS.continuous!=null?DS.continuous:false;
|
|
32044
32047
|
if (continuous) limit = DS.limit!=null?DS.limit:false; // continuous sets the limit to false
|
|
32045
32048
|
if (zot(damp)) damp = DS.damp!=null?DS.damp:false;
|
|
32046
|
-
if (zot(currentValue)) currentValue = DS.currentValue!=null?DS.currentValue:
|
|
32049
|
+
if (zot(currentValue)) currentValue = DS.currentValue!=null?DS.currentValue:null;
|
|
32047
32050
|
if (zot(useLabels)) useLabels = DS.useLabels!=null?DS.useLabels:false;
|
|
32048
32051
|
if (zot(labelMargin)) labelMargin = DS.labelMargin!=null?DS.labelMargin:10;
|
|
32049
32052
|
if (limit == false) damp = null;
|
|
@@ -44667,10 +44670,15 @@ RETURNS obj for chaining
|
|
|
44667
44670
|
if (obj.excludeTap) return;
|
|
44668
44671
|
clearTimeout(obj.zimDoubleTimeout);
|
|
44669
44672
|
call(e);
|
|
44673
|
+
if (once) {
|
|
44674
|
+
obj.off("mousedown", obj.zimDblClickDownEvent);
|
|
44675
|
+
obj.zimDblClickDownEvent = null;
|
|
44676
|
+
if (obj.cursor) obj.cur("default");
|
|
44677
|
+
}
|
|
44670
44678
|
} else if (call2) call2(e);
|
|
44671
44679
|
e.remove();
|
|
44672
44680
|
});
|
|
44673
|
-
}
|
|
44681
|
+
});
|
|
44674
44682
|
} else {
|
|
44675
44683
|
obj.zimClickDownEvent = obj.on("mousedown", function (e) {
|
|
44676
44684
|
if (e.currentTarget.type == "List") {
|
|
@@ -44685,10 +44693,15 @@ RETURNS obj for chaining
|
|
|
44685
44693
|
if (Math.abs(lastX + lastY - e.stageX / zim.scaX - e.stageY / zim.scaY) < distance && Date.now() - startTime < (timeType=="s"?time*1000:time)) {
|
|
44686
44694
|
if (obj.excludeTap) return;
|
|
44687
44695
|
call(e);
|
|
44696
|
+
if (once) {
|
|
44697
|
+
obj.off("mousedown", obj.zimClickDownEvent);
|
|
44698
|
+
obj.zimClickDownEvent = null;
|
|
44699
|
+
if (obj.cursor) obj.cur("default");
|
|
44700
|
+
}
|
|
44688
44701
|
} else if (call2) call2(e);
|
|
44689
|
-
e.remove();
|
|
44690
|
-
});
|
|
44691
|
-
}
|
|
44702
|
+
e.remove();
|
|
44703
|
+
});
|
|
44704
|
+
});
|
|
44692
44705
|
}
|
|
44693
44706
|
|
|
44694
44707
|
return obj;
|
|
@@ -48105,6 +48118,8 @@ ZIM has wrapped the CreateJS filters, filter property, caching and cacheUpdate s
|
|
|
48105
48118
|
to make accessing filters easy - but apps will slow down if they are over-used.
|
|
48106
48119
|
Keep the quality at 1 for animating filters at a decent framerate.
|
|
48107
48120
|
Consider pre-processing images if effects do not have to be dynamic.
|
|
48121
|
+
|
|
48122
|
+
NOTE: when applying effects to rtl fonts make sure the DIR = "rtl" is set.
|
|
48108
48123
|
|
|
48109
48124
|
EXAMPLE
|
|
48110
48125
|
// create a Label with a GlowEffect that shows through to the image below
|
|
@@ -48115,7 +48130,7 @@ new Label("WOW", 200, "impact")
|
|
|
48115
48130
|
color:red,
|
|
48116
48131
|
blurX:50,
|
|
48117
48132
|
blurY:50,
|
|
48118
|
-
|
|
48133
|
+
strength:2,
|
|
48119
48134
|
quality:2,
|
|
48120
48135
|
knockout:true
|
|
48121
48136
|
}));
|
|
@@ -48201,7 +48216,7 @@ RETURNS obj for chaining
|
|
|
48201
48216
|
for (var i in obj.effects) {
|
|
48202
48217
|
obj.filters.push(obj.effects[i]);
|
|
48203
48218
|
}
|
|
48204
|
-
obj.cache(x,y,width,height);
|
|
48219
|
+
obj.cache(x,y,width,height,null,null,null,(WW.DIR && WW.DIR=="rtl"));
|
|
48205
48220
|
return obj;
|
|
48206
48221
|
};//-33.16
|
|
48207
48222
|
|
|
@@ -49397,7 +49412,7 @@ props - the object literal holding properties and values to animate
|
|
|
49397
49412
|
time - |ZIM VEE| (default 1) the time for the tween in seconds (also see ZIM TIME constant)
|
|
49398
49413
|
see also the rate parameter and property to dynamically change the time the animation takes (its speed)
|
|
49399
49414
|
ease - |ZIM VEE| (default "quadInOut") the equation type for easing ("bounceOut", "elasticIn", "backInOut", "linear", etc)
|
|
49400
|
-
also ZIM preset eases: "snapIn", "snapOut", "snapInOut", "
|
|
49415
|
+
also ZIM preset eases: "snapIn", "snapOut", "snapInOut", "ballisticIn", "ballisticOut", "ballisticInOut", "slowmoIn", "slowmoOut", "slowmoInOut"
|
|
49401
49416
|
** CUSTOM EASE: see https://zimjs.com/ease for custom ease which can be passed in here as a value like so:
|
|
49402
49417
|
ease:zimEase([.2,.4,.6,.8]) // would be linear
|
|
49403
49418
|
ease:zimEase([[1.45,-0.57,0.67,0.55], [0.34,0.44,1.43,-0.31]]) // is the same as "snapInOut"
|
|
@@ -49703,6 +49718,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
49703
49718
|
if (!zot(props)) newProps = zim.merge(newProps, cjsProps); // cjsProps to overwrite
|
|
49704
49719
|
cjsProps = newProps;
|
|
49705
49720
|
|
|
49721
|
+
|
|
49706
49722
|
// convert dot property format
|
|
49707
49723
|
zim.loop(obj, function (o, v) {
|
|
49708
49724
|
if (typeof o == "string") {
|
|
@@ -50146,7 +50162,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
50146
50162
|
|
|
50147
50163
|
var fromCheck = false;
|
|
50148
50164
|
|
|
50149
|
-
|
|
50165
|
+
|
|
50150
50166
|
// Handle notes
|
|
50151
50167
|
if (obj.note) {
|
|
50152
50168
|
if (Array.isArray(obj.note)) { // random
|
|
@@ -50599,12 +50615,33 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
50599
50615
|
configurable: true // not sure why we need to?
|
|
50600
50616
|
});
|
|
50601
50617
|
|
|
50618
|
+
|
|
50619
|
+
// if (target.paused) return target._percentComplete;
|
|
50620
|
+
// if (target.tweenStartTime && target.tweenEndTime) {
|
|
50621
|
+
// // return if paused and however long is paused gets added to target.tweenStartTime and target.tweenEndTime
|
|
50622
|
+
// // but then how does this affect the timeline?
|
|
50623
|
+
// // maybe target.percentComplete is always based on time and it ignores pause
|
|
50624
|
+
// // whereas tween.percentComplete is based on the animation
|
|
50625
|
+
// // maybe target.percentComplete should be percentTime
|
|
50626
|
+
// var dn = Date.now();
|
|
50627
|
+
// var nt;
|
|
50628
|
+
// // loop is based on latest tween set
|
|
50629
|
+
// if (cjsProps.loop && dn > target.tweenEndTime) {
|
|
50630
|
+
// nt = (dn - target.tweenStartTime) % (target.tweenEndTime - target.tweenStartTime);
|
|
50631
|
+
// } else {
|
|
50632
|
+
// nt = dn - target.tweenStartTime;
|
|
50633
|
+
// }
|
|
50634
|
+
// var v = Math.max(0, Math.min(100, nt / (target.tweenEndTime - target.tweenStartTime) * 100));
|
|
50635
|
+
// target._percentComplete = v;
|
|
50636
|
+
// return v;
|
|
50637
|
+
|
|
50638
|
+
|
|
50602
50639
|
function setPercent(value, setAngle) {
|
|
50603
50640
|
target.zimTween.startPaused = false;
|
|
50604
50641
|
// if (!this.paused) this.pauseAnimate(true, id);
|
|
50605
50642
|
if (!dynamic) {
|
|
50606
|
-
if (target.zimTweens) {
|
|
50607
|
-
zim.loop(target.zimTweens, function(id,tw,i) {
|
|
50643
|
+
if (target.zimTweens) {
|
|
50644
|
+
zim.loop(target.zimTweens, function(id,tw,i) {
|
|
50608
50645
|
var tim = target.tweenStartTime + (target.tweenEndTime - target.tweenStartTime) * value / 100;
|
|
50609
50646
|
var nt;
|
|
50610
50647
|
if (tw.zimLoop && tim <= tw.startTime) {
|
|
@@ -50616,7 +50653,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
50616
50653
|
}
|
|
50617
50654
|
tw.percentComplete = Math.max(0, Math.min(100, nt/tw.duration * 100));
|
|
50618
50655
|
});
|
|
50619
|
-
} else {
|
|
50656
|
+
} else {
|
|
50620
50657
|
target.zimTween.setPosition(Math.round(value*target.zimTween.duration/100));
|
|
50621
50658
|
}
|
|
50622
50659
|
} else {
|
|
@@ -51302,7 +51339,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
51302
51339
|
if (call5 && typeof call5 == 'function') {(call5)(params5);}
|
|
51303
51340
|
}
|
|
51304
51341
|
|
|
51305
|
-
function preTween1(lastTween) {
|
|
51342
|
+
function preTween1(lastTween) {
|
|
51306
51343
|
prepareRelative2();
|
|
51307
51344
|
if (wait>0) {
|
|
51308
51345
|
target.waiting = true;
|
|
@@ -51319,8 +51356,9 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
51319
51356
|
tween1(lastTween);
|
|
51320
51357
|
}
|
|
51321
51358
|
}
|
|
51359
|
+
|
|
51322
51360
|
function tween1(lastTween) {
|
|
51323
|
-
var obj2 = getStart();
|
|
51361
|
+
var obj2 = getStart();
|
|
51324
51362
|
if (target.set && !from) target.set(set);
|
|
51325
51363
|
tween = target.zimTweens[id] = target.zimTween = createjs.Tween.get(target, cjsProps)
|
|
51326
51364
|
.call(doStartCall)
|
|
@@ -51441,7 +51479,8 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
51441
51479
|
}
|
|
51442
51480
|
|
|
51443
51481
|
} else { // NOT REWIND TWEENS
|
|
51444
|
-
|
|
51482
|
+
|
|
51483
|
+
|
|
51445
51484
|
if (seriesWait > 0 || sequenceWait > 0 || wait > 0) { // do not want wait as part of future loops (use loopWait)
|
|
51446
51485
|
|
|
51447
51486
|
if (seriesWait > 0 || sequenceWait > 0) {
|
|
@@ -51944,16 +51983,21 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
51944
51983
|
target.zimPauseTime=Date.now();
|
|
51945
51984
|
if (tween.zimTicker) tween.zimAnimateTimeout = setTimeout(function(){zim.Ticker.remove(tween.zimTicker);},200);
|
|
51946
51985
|
// if (target.zimZoomTicker) zim.Ticker.remove(target.zimZoomTicker);
|
|
51947
|
-
} else {
|
|
51986
|
+
} else {
|
|
51948
51987
|
tween.startPaused = false;
|
|
51949
51988
|
clearTimeout(tween.zimAnimateTimeout);
|
|
51950
51989
|
if (target.zimPauseTime) {
|
|
51951
51990
|
var nt = Date.now();
|
|
51952
51991
|
target.tweenStartTime+=(nt-target.zimPauseTime);
|
|
51953
51992
|
target.tweenEndTime+=(nt-target.zimPauseTime);
|
|
51993
|
+
if (target.zimTweens) {
|
|
51994
|
+
zim.loop(target.zimTweens, function(id,tw,i) {
|
|
51995
|
+
tw.startTime+=(nt-target.zimPauseTime);
|
|
51996
|
+
});
|
|
51997
|
+
}
|
|
51954
51998
|
}
|
|
51955
51999
|
if (tween.zimTicker) tween.zimTicker = zim.Ticker.add(tween.zimTicker, stage);
|
|
51956
|
-
|
|
52000
|
+
if (target.zimZoomTicker) target.zimZoomTicker = zim.Ticker.add(target.zimZoomTicker, stage);
|
|
51957
52001
|
}
|
|
51958
52002
|
}
|
|
51959
52003
|
function expandIds(ids) {
|
|
@@ -54052,6 +54096,9 @@ add:true - has been provided to add to the stage (use addTo for other containers
|
|
|
54052
54096
|
move:{x:value, y:value} or move:x - mirrors the mov Function style (just adding the e)
|
|
54053
54097
|
pos: has corner convenience values: "left", "right", "top", "bottom", "rightbottom" or "bottomright", "center" and "centerReg"
|
|
54054
54098
|
blendMode:"difference", etc. see ble()
|
|
54099
|
+
cursor:true for pointer or use any CSS cursor type. Gets passed into cur() for the object
|
|
54100
|
+
shadow:{color:value, offsetX:value, offsetY:value, blur:value} to apply a shadow
|
|
54101
|
+
uppercase:true - to set text to uppercase if object has a label or a text property
|
|
54055
54102
|
mouse:false - set the object to noMouse() - no point in ever setting this to true as true is the default
|
|
54056
54103
|
visible:false - visible false
|
|
54057
54104
|
style:false - will turn off all styles for the selector
|
|
@@ -54136,7 +54183,7 @@ Style.removeGroup(groupName) - removes a group as a string
|
|
|
54136
54183
|
zim.getStyle = function(type, group, inherit, groupOnly) {
|
|
54137
54184
|
if (!zim.STYLECHECK) {z_d("50.34"); zim.STYLECHECK=true;}
|
|
54138
54185
|
|
|
54139
|
-
var functionList = ["tap", "change", "hold", "noTap", "noChange", "noHold", "pos","addTo","center","centerReg","reg","mov","move","drag","transform","gesture","mouse","expand","outline","bounds","animate","wiggle","cache"];
|
|
54186
|
+
var functionList = ["tap", "change", "hold", "noTap", "noChange", "noHold", "pos", "addTo", "center", "centerReg", "reg", "mov", "move", "drag", "transform", "gesture", "mouse", "expand", "outline", "bounds", "animate", "wiggle", "cache", "cursor","uppercase", "shadow"];
|
|
54140
54187
|
|
|
54141
54188
|
// called by DisplayObjects
|
|
54142
54189
|
// ZIM NFT MODULE ADJUST
|
|
@@ -54249,6 +54296,12 @@ zim.styleTransforms = function(obj, styles) {
|
|
|
54249
54296
|
if (styles.add) {
|
|
54250
54297
|
obj.addTo();
|
|
54251
54298
|
}
|
|
54299
|
+
if (styles.cursor) {
|
|
54300
|
+
if (obj.cur) obj.cur(styles.cursor===true?"pointer":styles.cursor);
|
|
54301
|
+
}
|
|
54302
|
+
if (styles.shadow) {
|
|
54303
|
+
if (obj.sha) obj.sha(styles.shadow.color, styles.shadow.offsetX, styles.shadow.offsetY, styles.shadow.blur);
|
|
54304
|
+
}
|
|
54252
54305
|
if (styles.addTo) {
|
|
54253
54306
|
obj.addTo(styles.addTo===true?null:styles.addTo);
|
|
54254
54307
|
// not sure what these were doing below but replaced them with above... ZIM 9.5.0
|
|
@@ -54368,6 +54421,10 @@ zim.styleTransforms = function(obj, styles) {
|
|
|
54368
54421
|
obj.cache();
|
|
54369
54422
|
}
|
|
54370
54423
|
}
|
|
54424
|
+
if (styles.uppercase && (obj.text || obj.label)) {
|
|
54425
|
+
if (obj.text) obj.text = obj.text.toUpperCase();
|
|
54426
|
+
else obj.label.text = obj.label.text.toUpperCase();
|
|
54427
|
+
}
|
|
54371
54428
|
|
|
54372
54429
|
if (styles.tap && obj.tap) obj.tap(styles.tap);
|
|
54373
54430
|
if (styles.change && obj.change) obj.change(styles.change);
|
|
@@ -56284,7 +56341,7 @@ Additional "mousedown", "click" or other button events can be added if desired
|
|
|
56284
56341
|
|
|
56285
56342
|
this.group = group;
|
|
56286
56343
|
var DS = style===false?{}:zim.getStyle("Arrow", this.group, inherit);
|
|
56287
|
-
|
|
56344
|
+
|
|
56288
56345
|
if (zot(direction)) direction = DS.direction!=null?DS.direction:"right";
|
|
56289
56346
|
if (zot(backgroundColor)) backgroundColor = DS.backgroundColor!=null?DS.backgroundColor:zim.blue;
|
|
56290
56347
|
this.arrowBackgroundColor = backgroundColor;
|
|
@@ -56359,40 +56416,41 @@ Additional "mousedown", "click" or other button events can be added if desired
|
|
|
56359
56416
|
return that;
|
|
56360
56417
|
}
|
|
56361
56418
|
|
|
56362
|
-
if (zot(pages)
|
|
56363
|
-
|
|
56364
|
-
var eventType = (!zns?WW.ACTIONEVENT=="mousedown":zim.ACTIONEVENT=="mousedown")?"mousedown":"click";
|
|
56419
|
+
if (!zot(pages) && pages.type=="Pages") {
|
|
56365
56420
|
|
|
56366
|
-
|
|
56367
|
-
|
|
56368
|
-
|
|
56369
|
-
|
|
56370
|
-
|
|
56421
|
+
var eventType = (!zns?WW.ACTIONEVENT=="mousedown":zim.ACTIONEVENT=="mousedown")?"mousedown":"click";
|
|
56422
|
+
|
|
56423
|
+
// register button with Pages
|
|
56424
|
+
// could be multiple buttons in same direction (if buttons on multiple pages)
|
|
56425
|
+
if (zot(pages.arrows)) pages.arrows = {};
|
|
56426
|
+
if (zot(pages.arrows[direction])) pages.arrows[direction] = [];
|
|
56427
|
+
pages.arrows[direction].push(this);
|
|
56371
56428
|
|
|
56372
|
-
|
|
56373
|
-
|
|
56374
|
-
|
|
56375
|
-
|
|
56376
|
-
|
|
56377
|
-
|
|
56429
|
+
|
|
56430
|
+
var next = getNext();
|
|
56431
|
+
if (!next) {
|
|
56432
|
+
this.activate(false, pages.arrowDisableColor);
|
|
56433
|
+
}
|
|
56378
56434
|
|
|
56379
|
-
|
|
56380
|
-
|
|
56381
|
-
|
|
56382
|
-
|
|
56383
|
-
|
|
56384
|
-
|
|
56385
|
-
|
|
56386
|
-
|
|
56387
|
-
|
|
56435
|
+
function getNext() {
|
|
56436
|
+
var current = pages.pages[pages.index];
|
|
56437
|
+
if (!current || !current.page || !current.page.zimSwipeArray) return;
|
|
56438
|
+
var swipe = current.page.zimSwipeArray;
|
|
56439
|
+
if (direction == "left") return swipe[0];
|
|
56440
|
+
else if (direction == "right") return swipe[1];
|
|
56441
|
+
else if (direction == "up") return swipe[2];
|
|
56442
|
+
else if (direction == "down") return swipe[3];
|
|
56443
|
+
}
|
|
56444
|
+
|
|
56445
|
+
this.expand();
|
|
56446
|
+
this.on(eventType, function () {
|
|
56447
|
+
if (pages.transitioning) return;
|
|
56448
|
+
var next = getNext();
|
|
56449
|
+
if (!next) return;
|
|
56450
|
+
pages.go(next, direction, trans, speed);
|
|
56451
|
+
});
|
|
56388
56452
|
|
|
56389
|
-
|
|
56390
|
-
this.on(eventType, function () {
|
|
56391
|
-
if (pages.transitioning) return;
|
|
56392
|
-
var next = getNext();
|
|
56393
|
-
if (!next) return;
|
|
56394
|
-
pages.go(next, direction, trans, speed);
|
|
56395
|
-
});
|
|
56453
|
+
}
|
|
56396
56454
|
|
|
56397
56455
|
if (style!==false) zim.styleTransforms(this, DS);
|
|
56398
56456
|
this.clone = function() {
|
|
@@ -65724,6 +65782,8 @@ target - get or set the target for the property that you are changing
|
|
|
65724
65782
|
property - get or set the String property name that is being damped
|
|
65725
65783
|
desiredValue - the current value that the swiper is damping towards
|
|
65726
65784
|
sensitivity - get or set the sensitivity - see sensitivity parameter
|
|
65785
|
+
min - read only get the min
|
|
65786
|
+
max - read only get the max
|
|
65727
65787
|
damp - get or set the damp of the Swiper
|
|
65728
65788
|
enabled (default true) - set to false to disable the Swiper and visa versa
|
|
65729
65789
|
|
|
@@ -65764,6 +65824,9 @@ dispatches a "swipestop" event when swipeup has happened and value has stopped c
|
|
|
65764
65824
|
this.property = property;
|
|
65765
65825
|
this.sensitivity = sensitivity;
|
|
65766
65826
|
var downCheck = false;
|
|
65827
|
+
|
|
65828
|
+
that.min = min;
|
|
65829
|
+
that.max = max;
|
|
65767
65830
|
|
|
65768
65831
|
var frame = WW.zdf || swipeOn.stage?swipeOn.stage.frame:{};
|
|
65769
65832
|
|
|
@@ -67844,7 +67907,6 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
|
|
|
67844
67907
|
if (zot(width)) width=DS.width!=null?DS.width:W*.5;
|
|
67845
67908
|
if (zot(ticks)) ticks=DS.ticks!=null?DS.ticks:true;
|
|
67846
67909
|
if (zot(damp)) damp=DS.damp!=null?DS.damp:false;
|
|
67847
|
-
if (zot(labels)) labels=DS.labels!=null?DS.labels:true;
|
|
67848
67910
|
if (zot(corner)) corner=DS.corner!=null?DS.corner:5;
|
|
67849
67911
|
var height = 50;
|
|
67850
67912
|
|
|
@@ -68033,6 +68095,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
|
|
|
68033
68095
|
slider.currentValue = 0;
|
|
68034
68096
|
slider.ticks.mov(0,-20);
|
|
68035
68097
|
slider.bar.widthOnly = slider.bar.width+14
|
|
68098
|
+
|
|
68036
68099
|
new zim.Triangle({color:zim.dark}).alp(.3).scaleTo(slider.button, 70, 90, "full").center(slider.button);
|
|
68037
68100
|
|
|
68038
68101
|
slider.animate({
|
|
@@ -68059,7 +68122,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
|
|
|
68059
68122
|
});
|
|
68060
68123
|
|
|
68061
68124
|
slider.bar.on("mousedown", function() {
|
|
68062
|
-
slider.percentComplete = slider.currentValue/slider.max*100;
|
|
68125
|
+
slider.latestTween.percentComplete = slider.currentValue/slider.max*100;
|
|
68063
68126
|
});
|
|
68064
68127
|
var lastPlay = true;
|
|
68065
68128
|
slider.button.on("mousedown", function(){
|
|
@@ -68068,7 +68131,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
|
|
|
68068
68131
|
});
|
|
68069
68132
|
slider.button.on("pressup", function() {
|
|
68070
68133
|
if (lastPlay) slider.pauseAnimate(false);
|
|
68071
|
-
slider.percentComplete = slider.currentValue/slider.max*100;
|
|
68134
|
+
slider.latestTween.percentComplete = slider.currentValue/slider.max*100;
|
|
68072
68135
|
});
|
|
68073
68136
|
|
|
68074
68137
|
that.keyEvent = F.on("keydown", function(e) {
|
|
@@ -68130,7 +68193,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
|
|
|
68130
68193
|
try {
|
|
68131
68194
|
if (localStorage) {
|
|
68132
68195
|
var tl = localStorage.zim_tl;
|
|
68133
|
-
if (!tl) tl = JSON.stringify({speed:1, labels:
|
|
68196
|
+
if (!tl) tl = JSON.stringify({speed:1, labels:ticks, looping:false, trailing:false, color:purple});
|
|
68134
68197
|
tl = JSON.parse(tl);
|
|
68135
68198
|
doSpeed(tl.speed);
|
|
68136
68199
|
speed.slider.currentValue = tl.speed;
|
|
@@ -70234,6 +70297,9 @@ lastPage - get the index number of the page that was just animated (available in
|
|
|
70234
70297
|
note: pages may skip by 2
|
|
70235
70298
|
pages - read only array of pages - this are the original pages array passed in
|
|
70236
70299
|
note: at this time, the Book must be remade to add or remove pages
|
|
70300
|
+
peel - the peel ZIM Shape
|
|
70301
|
+
backPrev - read only page behind the right side peel roll corner
|
|
70302
|
+
backNext - read only page behind the left side peel roll corner
|
|
70237
70303
|
moving - get whether the page is being animated
|
|
70238
70304
|
handleHTML - get or set whether to automatically handle HTML overlays for Loader, TextArea or Tag objects
|
|
70239
70305
|
|
|
@@ -70296,7 +70362,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
70296
70362
|
function init(s) {
|
|
70297
70363
|
stage = s;
|
|
70298
70364
|
frame = stage.frame;
|
|
70299
|
-
var peel = new zim.Shape();
|
|
70365
|
+
var peel = that.peel = new zim.Shape();
|
|
70300
70366
|
|
|
70301
70367
|
var leftPage;
|
|
70302
70368
|
var pageFore;
|
|
@@ -70344,16 +70410,16 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
70344
70410
|
return;
|
|
70345
70411
|
}
|
|
70346
70412
|
if (pages[num+1]) {
|
|
70347
|
-
pageBack = pages[num+1].reg(0,height).loc(width,height,that).rot(90);
|
|
70413
|
+
pageBack = that.backNext = pages[num+1].reg(0,height).loc(width,height,that).rot(90);
|
|
70348
70414
|
} else {
|
|
70349
|
-
pageBack = new zim.Rectangle(width/2,height,backgroundColor).reg(0,height).loc(width,height,that).rot(90);
|
|
70415
|
+
pageBack = that.backNext = new zim.Rectangle(width/2,height,backgroundColor).reg(0,height).loc(width,height,that).rot(90);
|
|
70350
70416
|
lastPage = pageBack;
|
|
70351
70417
|
}
|
|
70352
70418
|
if (pages[num+2]) {
|
|
70353
|
-
pageNext = pages[num+2].rot(0).pos(0,0,zim.RIGHT,zim.TOP,that).setMask(peel);
|
|
70419
|
+
pageNext = that.backPrev = pages[num+2].rot(0).pos(0,0,zim.RIGHT,zim.TOP,that).setMask(peel);
|
|
70354
70420
|
} else {
|
|
70355
|
-
pageNext = new zim.Rectangle(width/2,height,backgroundColor).pos(0,0,zim.RIGHT,zim.TOP,that).setMask(peel);
|
|
70356
|
-
}
|
|
70421
|
+
pageNext = that.backPrev = new zim.Rectangle(width/2,height,backgroundColor).pos(0,0,zim.RIGHT,zim.TOP,that).setMask(peel);
|
|
70422
|
+
}
|
|
70357
70423
|
stage.update();
|
|
70358
70424
|
}
|
|
70359
70425
|
toPage(startPage);
|
|
@@ -72943,7 +73009,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
72943
73009
|
objClone = that.obj;
|
|
72944
73010
|
}
|
|
72945
73011
|
// note that all will clone the current property except for startEmitterPaused which clones the initial parameter value
|
|
72946
|
-
return that.cloneProps(new zim.Emitter(objClone, width, height, that.interval, that.num, that.life, that.fade, that.shrink, that.decayTime, that.decayStart, that.trace, that.traceFadeTime, that.traceShiftX, that.traceShiftY, that.angle, that.emitterForce, that.gravity, that.wind, that.layers, that.animation, zim.copy(that.random), that.horizontal, that.vertical, that.sink, that.sinkForce, cache, that.events, startPaused, that.pool, that.poolMin, style, that.group, inherit));
|
|
73012
|
+
return that.cloneProps(new zim.Emitter(objClone, width, height, that.interval, that.num, that.life, that.fade, that.shrink, warm, that.decayTime, that.decayStart, that.trace, that.traceFadeTime, that.traceShiftX, that.traceShiftY, that.angle, that.emitterForce, that.gravity, that.wind, that.layers, that.animation, zim.copy(that.random), that.horizontal, that.vertical, that.sink, that.sinkForce, cache, that.events, startPaused, that.pool, that.poolMin, particles, focusWarm, style, that.group, inherit));
|
|
72947
73013
|
};
|
|
72948
73014
|
|
|
72949
73015
|
this.dispose = function() {
|
|
@@ -75423,11 +75489,11 @@ operation - (default function below) a function that is applied to each result i
|
|
|
75423
75489
|
the function receives the original amplitude and index as parameters
|
|
75424
75490
|
you can use SoundWave.bufferLength to get the total number of values in the original data (1024)
|
|
75425
75491
|
Note: the data returned by the calculate() method will be only the included range - eg. .117 of the total original values (starting at low frequency)
|
|
75426
|
-
baseline - (default
|
|
75427
|
-
magnify - (default
|
|
75492
|
+
baseline - (default 30) removes this amount of amplitude from each data point (after operation is applied)
|
|
75493
|
+
magnify - (default 5) multiplies the data point by this much (after the baseline is removed)
|
|
75428
75494
|
by removing the baseline amount and multiplying what's left the difference in wave data is increased
|
|
75429
75495
|
reduce - (default 0) subtracts this amount from each data point (after magnified)
|
|
75430
|
-
adjust - (default
|
|
75496
|
+
adjust - (default 5) seconds to adjusts the max value used for calculate(normalized)
|
|
75431
75497
|
a maximum is found over this amount of time and used to normalize the rest of the frequencies
|
|
75432
75498
|
setting this to 1 second would basically keep maximum output - but loses drop offs in sound
|
|
75433
75499
|
channel - (default null) null will be both channels - set to 0 for left or 1 for right
|
|
@@ -75478,9 +75544,17 @@ dispatches a "ready" event when the sound source is connected and the calculate(
|
|
|
75478
75544
|
return amplitude * (.5+i*1/Math.pow(zim.SoundWave.bufferLength, .95));
|
|
75479
75545
|
};
|
|
75480
75546
|
if (zot(baseline)) baseline = (input=="mic"?0:input.oscillator?30:30); // subtracts this much from value
|
|
75481
|
-
if (zot(magnify)) magnify = (input=="mic"?1:input.oscillator?5:
|
|
75547
|
+
if (zot(magnify)) magnify = (input=="mic"?1:input.oscillator?5:5); // multiplies amount by this much
|
|
75482
75548
|
if (zot(reduce)) reduce = 0; // after calculating, subtract this much
|
|
75483
|
-
if (zot(adjust)) adjust = 5;
|
|
75549
|
+
if (zot(adjust)) adjust = 5;
|
|
75550
|
+
|
|
75551
|
+
var desiredAdjust = adjust;
|
|
75552
|
+
adjust = .5;
|
|
75553
|
+
var diff = (desiredAdjust - adjust) / 10
|
|
75554
|
+
zim.interval(.2, function(){
|
|
75555
|
+
adjust += diff;
|
|
75556
|
+
}, 10);
|
|
75557
|
+
|
|
75484
75558
|
|
|
75485
75559
|
zim.SoundWave.bufferLength = 1024;
|
|
75486
75560
|
var _num = num;
|
|
@@ -75657,6 +75731,7 @@ dispatches a "ready" event when the sound source is connected and the calculate(
|
|
|
75657
75731
|
setTimeout(function(){that.dispatchEvent("ready");}, 50);
|
|
75658
75732
|
}
|
|
75659
75733
|
this.dispose = function(context) {
|
|
75734
|
+
if (lastSource && analyser) lastSource.disconnect(analyser);
|
|
75660
75735
|
if (context && audioContext) audioContext.close();
|
|
75661
75736
|
if (analyser) analyser.disconnect();
|
|
75662
75737
|
return true;
|
|
@@ -78156,9 +78231,11 @@ keyboardMessage(color, backgroundColor, message, response, percent) |ZIM DUO| -
|
|
|
78156
78231
|
works with iFrames as well to avoid having to press outside the canvas on the iframe
|
|
78157
78232
|
it does this by turning off the canvas pointer events until the iframe is pressed
|
|
78158
78233
|
color defaults to yellow, backgroundColor to black
|
|
78159
|
-
|
|
78234
|
+
response is the message given when the stage or iframe has been pressed to activate the keyboard
|
|
78235
|
+
pass in "" for no message and response - to use a custom Pane() for example.
|
|
78160
78236
|
percent defaults to 80% the stage width
|
|
78161
78237
|
returns the label if repositioning is desired
|
|
78238
|
+
Dispatches a "keyboardactive" event when pressed to activate keyboard
|
|
78162
78239
|
fullscreen(mode) - set Frame to HTML fullscreen - mode defaults to true - set to false to come out of fullscreen
|
|
78163
78240
|
also see isFullscreen property and two fullscreen events
|
|
78164
78241
|
note: this is nothing to do with "full" scaling mode but rather the Browser window F11 fullscreen
|
|
@@ -78314,6 +78391,7 @@ EVENTS
|
|
|
78314
78391
|
"tabfocus" - dispatched when tab gains focus - only dispatched by the zdf (ZIM Default Frame)
|
|
78315
78392
|
ZIM setBlurDetect() is now activated by Frame and used by ZIM in animate(), timeout(), interval(), wiggle()
|
|
78316
78393
|
"tabblur" - dispatched when tab loses focus - only dispatched by the zdf (ZIM Default Frame)
|
|
78394
|
+
"keyboardactive" - dispatched if keyboardMessage() is called and keyboard is active
|
|
78317
78395
|
|
|
78318
78396
|
ASSET EVENTS
|
|
78319
78397
|
loadAssets() will trigger these events on the Frame object and on the specific queue (eg. var queue = F.loadAssets();)
|
|
@@ -79845,6 +79923,9 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
79845
79923
|
// handle touchscreen not getting mouseover - sigh
|
|
79846
79924
|
var oldCursor = that.cursorObj;
|
|
79847
79925
|
var co = that.stage.getObjectUnderPoint(that.mouseX, that.mouseY, 1);
|
|
79926
|
+
while (co && !(co._cursor || co.cursor)) {
|
|
79927
|
+
co = co.parent;
|
|
79928
|
+
}
|
|
79848
79929
|
if (co && (co._cursor || co.cursor)) {
|
|
79849
79930
|
setCustom(co);
|
|
79850
79931
|
} else if (obj.default) {
|
|
@@ -79901,6 +79982,9 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
79901
79982
|
setTimeout(function() {
|
|
79902
79983
|
// may be starting on an object with a cursor
|
|
79903
79984
|
var co = that.stage.getObjectUnderPoint(that.mouseX, that.mouseY, 1);
|
|
79985
|
+
while (co && !(co._cursor || co.cursor)) {
|
|
79986
|
+
co = co.parent;
|
|
79987
|
+
}
|
|
79904
79988
|
if (co && (co._cursor || co.cursor)) return;
|
|
79905
79989
|
if (obj.default) {
|
|
79906
79990
|
doCursor(obj.default);
|
|
@@ -80196,27 +80280,30 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
80196
80280
|
}
|
|
80197
80281
|
var inFrame = inIframe();
|
|
80198
80282
|
if (inFrame) that.canvas.style.pointerEvents = "none";
|
|
80199
|
-
|
|
80200
|
-
|
|
80201
|
-
|
|
80202
|
-
|
|
80203
|
-
|
|
80204
|
-
|
|
80205
|
-
|
|
80206
|
-
|
|
80207
|
-
|
|
80208
|
-
|
|
80209
|
-
|
|
80210
|
-
|
|
80211
|
-
|
|
80212
|
-
|
|
80283
|
+
|
|
80284
|
+
if (message != "") {
|
|
80285
|
+
var message = new zim.Label({
|
|
80286
|
+
text:message,
|
|
80287
|
+
size:40,
|
|
80288
|
+
color:color,
|
|
80289
|
+
backgroundColor:backgroundColor,
|
|
80290
|
+
paddingV:15,
|
|
80291
|
+
paddingH:30,
|
|
80292
|
+
shiftV:1,
|
|
80293
|
+
align:CENTER
|
|
80294
|
+
})
|
|
80295
|
+
.scaleTo(that.stage,percent)
|
|
80296
|
+
.ske(10)
|
|
80297
|
+
.reg(CENTER)
|
|
80298
|
+
.pos(0,50,CENTER,BOTTOM)
|
|
80299
|
+
}
|
|
80213
80300
|
document.addEventListener("mousedown", kmd);
|
|
80214
80301
|
document.addEventListener("pointerdown", kmd);
|
|
80215
80302
|
function kmd () {
|
|
80216
80303
|
if (inFrame) that.canvas.style.pointerEvents = "auto";
|
|
80217
80304
|
document.removeEventListener("mousedown", kmd);
|
|
80218
|
-
document.removeEventListener("pointerdown", kmd);
|
|
80219
|
-
if (message) {
|
|
80305
|
+
document.removeEventListener("pointerdown", kmd);
|
|
80306
|
+
if (message != "") {
|
|
80220
80307
|
message.text = response;
|
|
80221
80308
|
message.animate({
|
|
80222
80309
|
props:{alpha:0},
|
|
@@ -80225,12 +80312,13 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
80225
80312
|
});
|
|
80226
80313
|
that.stage.update();
|
|
80227
80314
|
}
|
|
80315
|
+
that.dispatchEvent("keyboardactive");
|
|
80228
80316
|
}
|
|
80229
|
-
return message;
|
|
80317
|
+
return message==""?null:message;
|
|
80230
80318
|
}
|
|
80231
80319
|
|
|
80232
80320
|
this.dispose = function() {
|
|
80233
|
-
|
|
80321
|
+
|
|
80234
80322
|
// remove zil events
|
|
80235
80323
|
if (that.zil && that.zil.length) {
|
|
80236
80324
|
WW.removeEventListener("keydown", that.zil[0]);
|
|
@@ -80238,6 +80326,7 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
80238
80326
|
WW.removeEventListener("DOMMouseScroll", that.zil[2]);
|
|
80239
80327
|
}
|
|
80240
80328
|
if (canvas) canvas.removeAllEventListeners();
|
|
80329
|
+
if (that.frameTime) clearInterval(that.frameTime);
|
|
80241
80330
|
|
|
80242
80331
|
// remove frame events
|
|
80243
80332
|
// var realWindow = window.parent || window;
|
|
@@ -80270,6 +80359,7 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
80270
80359
|
obj = null;
|
|
80271
80360
|
}
|
|
80272
80361
|
if (zid(canvasID)) zid(canvasID).parentNode.removeChild(zid(canvasID));
|
|
80362
|
+
zim.Ticker.dispose(stage);
|
|
80273
80363
|
if (that == zim.tickerFrame) zim.tickerFrame = null;
|
|
80274
80364
|
if (that === WW.zdf) WW.zdf = WW.S = WW.W = WW.H = null;
|
|
80275
80365
|
|
|
@@ -80831,7 +80921,8 @@ interrupt (default "none") - how to interrupt a sound if a sound with the same s
|
|
|
80831
80921
|
"early" - interrupt only the previously playing sound that has progressed the least
|
|
80832
80922
|
"late" - interrupt only the previously playing sound that has progressed the most
|
|
80833
80923
|
** thank you CreateJS and SoundJS for providing these options
|
|
80834
|
-
maxNum (default null)
|
|
80924
|
+
maxNum (default null) ONLY FOR LAZY LOAD - otherwise use maxNum in Frame() or F.loadAssets()
|
|
80925
|
+
set to a number of instances that a sound can play.
|
|
80835
80926
|
The default is as many as the browser can handle (hundreds).
|
|
80836
80927
|
maxNum can also be set as Frame(), loadAssets() and asset() parameters.
|
|
80837
80928
|
Setting this to 1 will only play one instance of the sound at a time.
|
|
@@ -87311,7 +87402,7 @@ https://zimjs.com/bits/view/icons.html
|
|
|
87311
87402
|
EXAMPLE
|
|
87312
87403
|
// import zim_pizzazz up top rather than just zim
|
|
87313
87404
|
|
|
87314
|
-
const icon = makeIcon("home", white,
|
|
87405
|
+
const icon = makeIcon("home", white, 2).pos(40,40,RIGHT);
|
|
87315
87406
|
|
|
87316
87407
|
// Or pass the icon into the Button class as the icon parameter
|
|
87317
87408
|
// Optionally provide a second shape for the rollIcon, etc. of the Button
|
|
@@ -87591,17 +87682,17 @@ var globalsConstants = [
|
|
|
87591
87682
|
["TAU", zim.TAU],
|
|
87592
87683
|
["DEG", zim.DEG],
|
|
87593
87684
|
["RAD", zim.RAD],
|
|
87594
|
-
["PHI", zim.PHI]
|
|
87595
|
-
];
|
|
87685
|
+
["PHI", zim.PHI],
|
|
87686
|
+
];
|
|
87596
87687
|
|
|
87597
|
-
for (z_i = 0; z_i < globalsConstants.length; z_i++) {
|
|
87688
|
+
for (z_i = 0; z_i < globalsConstants.length; z_i++) {
|
|
87598
87689
|
var pair = globalsConstants[z_i];
|
|
87599
87690
|
WW[pair[0]] = pair[1];
|
|
87600
|
-
}
|
|
87601
|
-
|
|
87602
|
-
for (z_i = 0; z_i < zim.colors.length; z_i++) {
|
|
87691
|
+
}
|
|
87692
|
+
|
|
87693
|
+
for (z_i = 0; z_i < zim.colors.length; z_i++) {
|
|
87603
87694
|
WW[zim.colors[z_i]] = zim.colorsHex[z_i];
|
|
87604
|
-
}
|
|
87695
|
+
}
|
|
87605
87696
|
|
|
87606
87697
|
|
|
87607
87698
|
WW.zim = zim;
|
|
@@ -87909,4 +88000,4 @@ export let getLatestVersions = zim.getLatestVersions;
|
|
|
87909
88000
|
export let PWA = zim.PWA;
|
|
87910
88001
|
export let QR = zim.QR;
|
|
87911
88002
|
export let GIF = zim.GIF;
|
|
87912
|
-
export let THEME = zim.THEME;
|
|
88003
|
+
export let THEME = zim.THEME;
|