zimjs 16.0.1 → 16.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/zim.js +148 -89
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zimjs",
3
- "version": "16.0.1",
3
+ "version": "16.0.2",
4
4
  "type": "module",
5
5
  "main": "./src/zim.js",
6
6
  "types": "./ts-src/typings/zim",
package/src/zim.js CHANGED
@@ -7470,10 +7470,10 @@ const rotation = {min:10, max:20, integer:false, negative:true};
7470
7470
  // or this can be passed into an animation object
7471
7471
  // and then into zim.Emitter() for the animate parameter
7472
7472
 
7473
- const emitter = new zim.Emitter({
7473
+ const emitter = new Emitter({
7474
7474
  obj:new Rectangle(),
7475
7475
  random:{rotation:rotation} // the emitter will use Pick.choose() to pick a rotation for each particle
7476
- });
7476
+ }).center();
7477
7477
 
7478
7478
  function age() {
7479
7479
  // assuming user.age is some input value that exists
@@ -8725,7 +8725,27 @@ See the CreateJS documentation for x, y, alpha, rotation, on(), addChild(), etc.
8725
8725
 
8726
8726
  NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set to true before running zim)
8727
8727
 
8728
+ EXAMPLE
8729
+ const container = new Container().loc(100,100);
8730
+
8731
+ // demonstration of adding drag() to a Container
8732
+ const rect = new Rectangle(100, 100, blue)
8733
+ .addTo(container); // add rectangle to container
8734
+ const circle = new Circle(40, red)
8735
+ .center(container) // add the circle to the container and center
8736
+ container.drag(); // will drag either the rectangle or the circle
8737
+ container.drag({all:true}); // will drag both the rectangle and the circle
8738
+
8739
+ // below will reduce the alpha of the object in the container that was clicked (target)
8740
+ container.on("click", e => {e.target.alpha = .5; S.update();});
8741
+
8742
+ // below will reduce the alpha of all the objects in the container (currentTarget)
8743
+ container.on("click", e => {e.currentTarget.alpha = .5; S.update();});
8744
+ END EXAMPLE
8745
+
8728
8746
  EXAMPLE
8747
+ // Here we apply the normalize() method of the Container to a Tile (which is a Container)
8748
+ // and scale the children based on the resulting ratio
8729
8749
  const tile = new Tile(new Rectangle(70,70,white,black).reg(CENTER), 9, 1, 20)
8730
8750
  .normalize("x", CENTER)
8731
8751
  .center();
@@ -8753,6 +8773,7 @@ final.sortBy("ratio"); // make more central objects come to front
8753
8773
  END EXAMPLE
8754
8774
 
8755
8775
  EXAMPLE
8776
+ // In this case we animate the children based on the rate
8756
8777
  // animate() the rate and use sequence:0 to apply different speed to each item
8757
8778
  const tile = new Tile(new Rectangle(10, 10, series(green,blue,yellow)), 20, 20, 5, 5)
8758
8779
  .normalize("reg", CENTER)
@@ -23359,6 +23380,8 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
23359
23380
  color = zik(color);
23360
23381
  rollColor = zik(rollColor);
23361
23382
  downColor = zik(downColor);
23383
+
23384
+ var timeType = zot(WW.TIME) ? zot(zim.TIME) ? "seconds" : zim.TIME : WW.TIME;
23362
23385
 
23363
23386
  var originalBorderColor = borderColor;
23364
23387
  var originalBorderWidth = borderWidth;
@@ -23395,7 +23418,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
23395
23418
  if (zot(downToggleColor)) downToggleColor=DS.downToggleColor!=null?DS.downToggleColor:label.rollToggleColor;
23396
23419
 
23397
23420
  if (zot(wait)) wait=DS.wait!=null?DS.wait:null;
23398
- if (zot(waitTime)) waitTime=DS.waitTime!=null?DS.waitTime:TIME=="seconds"||TIME=="s"?5:5000;
23421
+ if (zot(waitTime)) waitTime=DS.waitTime!=null?DS.waitTime:timeType=="seconds"||timeType=="s"?5:5000;
23399
23422
  if (zot(waitBackgroundColor)) waitBackgroundColor=DS.waitBackgroundColor!=null?DS.waitBackgroundColor:backgroundColor;
23400
23423
  if (zot(rollWaitBackgroundColor)) rollWaitBackgroundColor=DS.rollWaitBackgroundColor!=null?DS.rollWaitBackgroundColor:rollBackgroundColor;
23401
23424
  if (zot(downWaitBackgroundColor)) downWaitBackgroundColor=DS.downWaitBackgroundColor!=null?DS.downWaitBackgroundColor:rollBackgroundColor;
@@ -23409,7 +23432,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
23409
23432
  that.focus = false;
23410
23433
  that.rolled = false;
23411
23434
 
23412
- var timeType = getTIME(waitTime);
23435
+ timeType = getTIME(waitTime);
23413
23436
 
23414
23437
  //~~~~~~~~~~~~~ BACKINGS
23415
23438
  // also see manual setting of backings beneath getter setter methods
@@ -26665,6 +26688,7 @@ scrollBar - data object that holds the following properties (with defaults):
26665
26688
  scrollBar.corner = scrollBar.size / 2;
26666
26689
  scrollBar.showTime = .5; // s to fade in
26667
26690
  scrollBar.fadeTime = 3; // s to fade out
26691
+ scrollBar.speed = .5 // scrollwheel speed for x and y scrolling with mouse wheel
26668
26692
  scrollX - gets and sets the content x position in the window (this will be negative)
26669
26693
  scrollY - gets and sets the content y position in the window (this will be negative)
26670
26694
  scrollXMax - gets the max we can scroll in x based on content width - window width (plus padding and margin)
@@ -26865,6 +26889,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
26865
26889
  scrollBar.corner = scrollBar.size / 2;
26866
26890
  scrollBar.showTime = .5;
26867
26891
  scrollBar.fadeTime = 3;
26892
+ scrollBar.speed = .5;
26868
26893
 
26869
26894
  if (scrollBarActive) {
26870
26895
  var hscrollBar = scrollBar.horizontal = new zim.Shape({style:false});
@@ -27011,8 +27036,18 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
27011
27036
 
27012
27037
  clearTimeout(that.d2Timeout);
27013
27038
  that.d2Timeout = setTimeout(function(){
27014
- if (hscrollBar && hscrollBar.proportion) content.x = hscrollBar.proportion.convert(hscrollBar.x);
27015
- if (vscrollBar && vscrollBar.proportion) content.y = vscrollBar.proportion.convert(vscrollBar.y);
27039
+ try {
27040
+ if (content && hscrollBar && hscrollBar.proportion) content.x = hscrollBar.proportion.convert(hscrollBar.x);
27041
+ if (content && vscrollBar && vscrollBar.proportion) content.y = vscrollBar.proportion.convert(vscrollBar.y);
27042
+ } catch (err) {
27043
+ clearTimeout(that.d2Timeout);
27044
+ that.d2Timeout = setTimeout(function(){
27045
+ try {
27046
+ if (content && hscrollBar && hscrollBar.proportion) content.x = hscrollBar.proportion.convert(hscrollBar.x);
27047
+ if (content && vscrollBar && vscrollBar.proportion) content.y = vscrollBar.proportion.convert(vscrollBar.y);
27048
+ } catch (err) {}
27049
+ }, 50);
27050
+ }
27016
27051
  }, 50);
27017
27052
  clearTimeout(that.dTimeout);
27018
27053
  that.dTimeout = setTimeout(function(){setdragBoundary();}, 300);
@@ -27555,22 +27590,41 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
27555
27590
  }
27556
27591
 
27557
27592
  var desiredY = that.scrollY;
27593
+ var desiredX = that.scrollX;
27558
27594
  that.scrollWindow = function scrollWindow(e) {
27559
- if (vCheck && that.stage && that.hitTestPoint(that.windowMouseX, that.windowMouseY) && that.contains(that.stage.getObjectUnderPoint(that.windowMouseX*zim.scaX, that.windowMouseY*zim.scaY))) {
27595
+ if (that.stage && that.hitTestPoint(that.windowMouseX, that.windowMouseY) && that.contains(that.stage.getObjectUnderPoint(that.windowMouseX*zim.scaX, that.windowMouseY*zim.scaY))) {
27596
+ var delta;
27597
+ var deltaY;
27598
+ var deltaX;
27560
27599
  if (zot(e)) e = event;
27561
- var delta = e.detail ? e.detail*(-19) : e.wheelDelta;
27562
- if (zot(delta)) delta = e.deltaY*(-19);
27563
- desiredY += delta;
27564
- desiredY = Math.max(-that.scrollYMax, Math.min(0, desiredY));
27565
- if (!damp) {
27566
- that.scrollY = desiredY;
27567
- content.stage.update();
27600
+
27601
+ deltaY = (that.stage && that.stage.frame.shiftKey) ? e.deltaX : e.deltaY;
27602
+ deltaX = (that.stage && that.stage.frame.shiftKey) ? e.deltaY : e.deltaX;
27603
+
27604
+ if (vCheck && deltaY != null) {
27605
+ // var delta = e.detail ? e.detail*(-19) : e.wheelDelta;
27606
+ delta = deltaY*(-that.scrollBar.speed);
27607
+ desiredY += delta;
27608
+ desiredY = Math.max(-that.scrollYMax, Math.min(0, desiredY));
27609
+ if (!damp) that.scrollY = desiredY;
27568
27610
  }
27569
- scrollBarDown = false;
27570
- }
27611
+ if (hCheck && deltaX != null) {
27612
+ // var delta = e.detail ? e.detail*(-19) : e.wheelDelta;
27613
+ delta = deltaX*(-that.scrollBar.speed);
27614
+ desiredX += delta;
27615
+ desiredX = Math.max(-that.scrollXMax, Math.min(0, desiredX));
27616
+ that.scrollX = desiredX;
27617
+ }
27618
+ if (hCheck || vCheck) {
27619
+ scrollBarDown = false;
27620
+ if (!damp) {
27621
+ content.stage.update();
27622
+ }
27623
+ }
27624
+ }
27571
27625
  if (optimize) {
27572
27626
  testContent();
27573
- }
27627
+ }
27574
27628
  }
27575
27629
  if (scrollWheel) {
27576
27630
  WW.addEventListener("mousewheel", that.scrollWindow);
@@ -30439,8 +30493,9 @@ list - (default Options 1-30) an array of strings, numbers or zim Label objects
30439
30493
  See: https://zimjs.com/ten/accordion.html
30440
30494
  note: the Accordion List is currently incompatible with the Organizer, addTo() and removeFrom()
30441
30495
  viewNum - (default 5) how many items to show in the width and height provided
30442
- adjusting this number will also change the overall scale of custom items
30443
- or see the noScale parameter to avoid scaling custom items
30496
+ adjusting this number will also change the overall scale of custom items for horizontal lists
30497
+ (this does not affect vertical lists due to the way vertical tabs are optimized)
30498
+ or see the noScale parameter to avoid scaling custom items in horizontal lists
30444
30499
  if no items are provided to start but rather added with addAt() then choose a viewNum that roughly matches how many items will fit in the view
30445
30500
  vertical - (default true) set to false to make a horizontal list
30446
30501
  currentSelected - (default false) set to true to show the current selection as highlighted
@@ -30787,7 +30842,6 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
30787
30842
  listW = list;
30788
30843
  }
30789
30844
 
30790
-
30791
30845
  // handle possible checkboxes
30792
30846
  if (checkBox) {
30793
30847
  zim.loop(listW, function (item, i) {
@@ -30879,18 +30933,20 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
30879
30933
  organizer.addTo(that).loc(0,-organizer.height);
30880
30934
  }
30881
30935
 
30936
+
30882
30937
  if (customWidth && noScale) {
30883
- // that.itemWidth = vertical?(width-paddingH*2-(scrollBarActive?(scrollBarOverlay?0:6):0)):customWidth/list.length;
30884
- // that.itemHeight = vertical?customHeight/list.length:(height-paddingV*2-(scrollBarActive?(scrollBarOverlay?0:6):0));
30885
- that.itemWidth = vertical?(width-(scrollBarActive?(scrollBarOverlay?0:6):0)):customWidth/listW.length;
30886
- that.itemHeight = vertical?customHeight/listW.length:(height-(scrollBarActive?(scrollBarOverlay?0:6):0));
30938
+ that.itemWidth = vertical?(width-paddingH*2-(scrollBarActive?(scrollBarOverlay?0:6):0)):customWidth/listW.length;
30939
+ that.itemHeight = vertical?customHeight/listW.length:(height-paddingV*2-(scrollBarActive?(scrollBarOverlay?0:6):0));
30940
+ // that.itemWidth = vertical?(width-(scrollBarActive?(scrollBarOverlay?0:6):0)):customWidth/listW.length;
30941
+ // that.itemHeight = vertical?customHeight/listW.length:(height-(scrollBarActive?(scrollBarOverlay?0:6):0));
30887
30942
 
30888
30943
  } else {
30889
- // that.itemWidth = vertical?(width-paddingH*2-(scrollBarActive?(scrollBarOverlay?0:6):0)):(width-paddingH*2)/viewNum;
30890
- // that.itemHeight = vertical?(height-paddingV*2)/viewNum:(height-paddingV*2-(scrollBarActive?(scrollBarOverlay?0:6):0));
30891
- that.itemWidth = vertical?(width-(scrollBarActive?(scrollBarOverlay?0:6):0)):(width)/viewNum;
30892
- that.itemHeight = vertical?(height)/viewNum:(height-(scrollBarActive?(scrollBarOverlay?0:6):0));
30944
+ that.itemWidth = vertical?(width-paddingH*2-(scrollBarActive?(scrollBarOverlay?0:6):0)):(width-paddingH*2)/viewNum;
30945
+ that.itemHeight = vertical?(height-paddingV*2)/viewNum:(height-paddingV*2-(scrollBarActive?(scrollBarOverlay?0:6):0));
30946
+ // that.itemWidth = vertical?(width-(scrollBarActive?(scrollBarOverlay?0:6):0)):(width)/viewNum;
30947
+ // that.itemHeight = vertical?(height)/viewNum:(height-(scrollBarActive?(scrollBarOverlay?0:6):0));
30893
30948
  }
30949
+
30894
30950
  var tabs;
30895
30951
  var inheritedStyles = zim.copy(DS);
30896
30952
  delete inheritedStyles.borderWidth;
@@ -30936,11 +30992,11 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
30936
30992
  .mov(vertical?0:paddingH,vertical?paddingV:0);
30937
30993
  // var b = tabs.getBounds();
30938
30994
  // tabs.setBounds(0,0,vertical?b.width:(b.width+spacing*2+4),vertical?(b.height+spacing*2+4):b.height);
30939
- that.add(tabs);
30995
+ that.add(tabs);
30940
30996
  // tabs.loc(paddingH, paddingV)
30941
30997
  zim.loop(tabs.labels, function (label) {
30942
30998
  if (label) label.backgroundColor = zim.clear;
30943
- })
30999
+ });
30944
31000
  }
30945
31001
  makeTabs(zim.copy(listW, clone));
30946
31002
 
@@ -30952,7 +31008,8 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
30952
31008
  if (point.y - that.tabs.buttons[that.tabs.buttons.length-1].height <= height - that.tabs.height) {that.tabs.y += that.tabs.height/2 + spacing/2}
30953
31009
 
30954
31010
  } else {
30955
-
31011
+ if (point.x >= -that.tabs.buttons[0].width) {that.tabs.x -= that.tabs.width/2 + spacing/2}
31012
+ if (point.x - that.tabs.buttons[that.tabs.buttons.length-1].width <= width - that.tabs.width) {that.tabs.x += that.tabs.width/2 + spacing/2}
30956
31013
  }
30957
31014
  // zog(point.y)
30958
31015
  // zogy(that.tabs.buttons[0].height, that.tabs.buttons[that.tabs.buttons.length-1].height)
@@ -34891,7 +34948,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
34891
34948
  var num = tabs.length;
34892
34949
  var tabW = (width - spacing*(num-1))/num;
34893
34950
  var tabH = (height - spacing*(num-1)-2)/num;
34894
-
34951
+
34895
34952
  if (!zot(backdropColor)) {
34896
34953
  // may be resized later
34897
34954
  var backdrop = this.backdrop = new zim.Rectangle(width,height,backdropColor, null, null, null, null, null, null, false);
@@ -46650,7 +46707,6 @@ RETURNS obj for chaining
46650
46707
  obj.cur("pointer");
46651
46708
  var stage;
46652
46709
  obj.zimClickHoldDownEvent = obj.on("mousedown", function (e) {
46653
- zog("here")
46654
46710
  if (!stage) stage = e.target.stage;
46655
46711
  if (!stage) return;
46656
46712
  if (zot(stage.frame)) stage.frame = WW.zdf;
@@ -52494,7 +52550,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
52494
52550
  target.percentCompleteCheck = true;
52495
52551
  target._percentComplete = 0;
52496
52552
  Object.defineProperty(target, 'percentComplete', {
52497
- get: function() {
52553
+ get: function() {
52498
52554
  if (target.paused) return target._percentComplete;
52499
52555
  if (target.tweenStartTime && target.tweenEndTime) {
52500
52556
  // return if paused and however long is paused gets added to target.tweenStartTime and target.tweenEndTime
@@ -52726,6 +52782,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
52726
52782
  pathPercent/=2;
52727
52783
  if (tween.position > tween.duration/2) pathPercent = 100-pathPercent;
52728
52784
  }
52785
+ target._percentComplete = pathPercent
52729
52786
  }
52730
52787
 
52731
52788
  if (pathObject) {
@@ -70663,7 +70720,7 @@ new Pic("image.png") // preloaded asset
70663
70720
  .center()
70664
70721
  .effect(new ShadowEffect())
70665
70722
  .animate({
70666
- props:{"effects.blur.angle":90},
70723
+ props:{"effects.shadow.angle":90},
70667
70724
  time:.7,
70668
70725
  rewind:true,
70669
70726
  rewindWait:.5,
@@ -88417,8 +88474,10 @@ flipMaterial(materialType, params) - flip about the y access a material
88417
88474
  Note a second texture must be made and passed to flipMaterial in the params as the map
88418
88475
  curvePlane(geometry, z) - curves a THREE.PlaneGeometry but a z value (positive or negative)
88419
88476
  adjusts the Geometry in place - used internally by makePanel
88420
- dispose() - stops the renderer - you need to removeChild(threeObj.DOMElement) and threeObj.canvas.style.display = "none"
88421
-
88477
+ dispose() - clears geometries, materials, stops the renderer, removes scene and sets internal variables to null
88478
+ make sure the three reference is set to null:
88479
+ myThree.dispose();
88480
+ mythree = null; // same for any dispose - ZIM cannot set your variables to null
88422
88481
  METHODS ON MESH
88423
88482
  ** If makePanel() is used on the ortho scene (ortho parameter true and makeMesh added to three.sceneOrtho)
88424
88483
  ** then the mesh is given a pos() method:
@@ -90229,58 +90288,58 @@ for (z_i = 0; z_i < globalFunctions.length; z_i++) {
90229
90288
 
90230
90289
  // these are global regardless
90231
90290
  var globalsConstants = [
90232
- ["FIT", zim.FIT],
90233
- ["FILL", zim.FILL],
90234
- ["FULL", zim.FULL],
90235
- ["LEFT", zim.LEFT],
90236
- ["RIGHT", zim.RIGHT],
90237
- ["CENTER", zim.CENTER],
90238
- ["MIDDLE", zim.MIDDLE],
90239
- ["START", zim.START],
90240
- ["END", zim.END],
90241
- ["TOP", zim.TOP],
90242
- ["BOTTOM", zim.BOTTOM],
90243
- ["OVER", zim.OVER],
90244
- ["UNDER", zim.UNDER],
90245
- ["HORIZONTAL", zim.HORIZONTAL],
90246
- ["VERTICAL", zim.VERTICAL],
90247
- ["BOTH", zim.BOTH],
90248
- ["RADIAL", zim.RADIAL],
90249
- ["UP", zim.UP],
90250
- ["DOWN", zim.DOWN],
90251
- ["NEXT", zim.NEXT],
90252
- ["PREV", zim.PREV],
90253
- ["AUTO", zim.AUTO],
90254
- ["AVE", zim.AVE],
90255
- ["DEFAULT", zim.DEFAULT],
90256
- ["ALL", zim.ALL],
90257
- ["NONE", zim.NONE],
90258
- ["GET", zim.GET],
90259
- ["POST", zim.POST],
90260
- ["LOCALSTORAGE", zim.LOCALSTORAGE],
90261
- ["SOCKET", zim.SOCKET],
90262
- ["TO", zim.TO],
90263
- ["FROM", zim.FROM],
90264
- ["SINE", zim.SINE],
90265
- ["SQUARE", zim.SQUARE],
90266
- ["TRIANGLE", zim.TRIANGLE],
90267
- ["SAW", zim.SAW],
90268
- ["SAWTOOTH", zim.SAWTOOTH],
90269
- ["ZAP", zim.ZAP],
90270
- ["TAU", zim.TAU],
90271
- ["DEG", zim.DEG],
90272
- ["RAD", zim.RAD],
90273
- ["PHI", zim.PHI],
90274
- ];
90275
-
90276
- for (z_i = 0; z_i < globalsConstants.length; z_i++) {
90277
- var pair = globalsConstants[z_i];
90278
- WW[pair[0]] = pair[1];
90279
- }
90280
-
90281
- for (z_i = 0; z_i < zim.colors.length; z_i++) {
90282
- WW[zim.colors[z_i]] = zim.colorsHex[z_i];
90283
- }
90291
+ ["FIT", zim.FIT],
90292
+ ["FILL", zim.FILL],
90293
+ ["FULL", zim.FULL],
90294
+ ["LEFT", zim.LEFT],
90295
+ ["RIGHT", zim.RIGHT],
90296
+ ["CENTER", zim.CENTER],
90297
+ ["MIDDLE", zim.MIDDLE],
90298
+ ["START", zim.START],
90299
+ ["END", zim.END],
90300
+ ["TOP", zim.TOP],
90301
+ ["BOTTOM", zim.BOTTOM],
90302
+ ["OVER", zim.OVER],
90303
+ ["UNDER", zim.UNDER],
90304
+ ["HORIZONTAL", zim.HORIZONTAL],
90305
+ ["VERTICAL", zim.VERTICAL],
90306
+ ["BOTH", zim.BOTH],
90307
+ ["RADIAL", zim.RADIAL],
90308
+ ["UP", zim.UP],
90309
+ ["DOWN", zim.DOWN],
90310
+ ["NEXT", zim.NEXT],
90311
+ ["PREV", zim.PREV],
90312
+ ["AUTO", zim.AUTO],
90313
+ ["AVE", zim.AVE],
90314
+ ["DEFAULT", zim.DEFAULT],
90315
+ ["ALL", zim.ALL],
90316
+ ["NONE", zim.NONE],
90317
+ ["GET", zim.GET],
90318
+ ["POST", zim.POST],
90319
+ ["LOCALSTORAGE", zim.LOCALSTORAGE],
90320
+ ["SOCKET", zim.SOCKET],
90321
+ ["TO", zim.TO],
90322
+ ["FROM", zim.FROM],
90323
+ ["SINE", zim.SINE],
90324
+ ["SQUARE", zim.SQUARE],
90325
+ ["TRIANGLE", zim.TRIANGLE],
90326
+ ["SAW", zim.SAW],
90327
+ ["SAWTOOTH", zim.SAWTOOTH],
90328
+ ["ZAP", zim.ZAP],
90329
+ ["TAU", zim.TAU],
90330
+ ["DEG", zim.DEG],
90331
+ ["RAD", zim.RAD],
90332
+ ["PHI", zim.PHI],
90333
+ ];
90334
+
90335
+ for (z_i = 0; z_i < globalsConstants.length; z_i++) {
90336
+ var pair = globalsConstants[z_i];
90337
+ WW[pair[0]] = pair[1];
90338
+ }
90339
+
90340
+ for (z_i = 0; z_i < zim.colors.length; z_i++) {
90341
+ WW[zim.colors[z_i]] = zim.colorsHex[z_i];
90342
+ }
90284
90343
 
90285
90344
 
90286
90345
  WW.zim = zim;