zimjs 15.0.11 → 15.0.12

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 +37 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zimjs",
3
- "version": "15.0.11",
3
+ "version": "15.0.12",
4
4
  "type": "module",
5
5
  "main": "./src/zim.js",
6
6
  "types": "./ts-src/typings/zim",
package/src/zim.js CHANGED
@@ -4738,7 +4738,7 @@ RETURNS an object
4738
4738
  str = str.trim();
4739
4739
  try {
4740
4740
  return (new Function("return " + str))();
4741
- } catch {
4741
+ } catch (err) {
4742
4742
  zogy("JSON did not parse");
4743
4743
  return null;
4744
4744
  }
@@ -4746,7 +4746,7 @@ RETURNS an object
4746
4746
  var jobj;
4747
4747
  try {
4748
4748
  jobj = JSON.parse(str);
4749
- } catch {
4749
+ } catch (err) {
4750
4750
  jobj = jst(str);
4751
4751
  }
4752
4752
  return jobj;
@@ -67914,7 +67914,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
67914
67914
  that.trailInterval.time = trailProportion.convert(tl.speed);
67915
67915
  try {
67916
67916
  if (localStorage) localStorage.zim_tl = JSON.stringify(tl);
67917
- } catch {}
67917
+ } catch (err) {}
67918
67918
  }
67919
67919
  function doLabels(checked) {
67920
67920
  slider.ticks.vis(checked);
@@ -67923,14 +67923,14 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
67923
67923
  tl.labels = checked;
67924
67924
  try {
67925
67925
  if (localStorage) localStorage.zim_tl = JSON.stringify(tl);
67926
- } catch {}
67926
+ } catch (err) {}
67927
67927
  }
67928
67928
  function doLoop(checked) {
67929
67929
  loop = checked;
67930
67930
  tl.looping = checked;
67931
67931
  try {
67932
67932
  if (localStorage) localStorage.zim_tl = JSON.stringify(tl);
67933
- } catch {}
67933
+ } catch (err) {}
67934
67934
  }
67935
67935
  function doTrails(checked) {
67936
67936
  trailsOff();
@@ -67943,7 +67943,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
67943
67943
  tl.trailing = checked;
67944
67944
  try {
67945
67945
  if (localStorage) localStorage.zim_tl = JSON.stringify(tl);
67946
- } catch {}
67946
+ } catch (err) {}
67947
67947
  }
67948
67948
  function doColor(color) {
67949
67949
  zim.loop([control,menu], function(b) {
@@ -67959,7 +67959,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
67959
67959
  tl.color = color;
67960
67960
  try {
67961
67961
  if (localStorage) localStorage.zim_tl = JSON.stringify(tl);
67962
- } catch {}
67962
+ } catch (err) {}
67963
67963
  return this;
67964
67964
  }
67965
67965
  this.setThemeColor = doColor;
@@ -68149,7 +68149,7 @@ zim.Timeline = function(objects, width, startPaused, barColor, buttonColor, them
68149
68149
  trailing.checkBox.checked = tl.trailing;
68150
68150
  that.trailInterval.time = trailProportion.convert(tl.speed);
68151
68151
  }
68152
- } catch {}
68152
+ } catch (err) {}
68153
68153
 
68154
68154
  this.pos(0,20,"center","bottom");
68155
68155
 
@@ -72580,6 +72580,8 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
72580
72580
  var val = zim.Pick.choose(options);
72581
72581
  if (property == "scale") {
72582
72582
  particle.sca(val);
72583
+ } else if (property == "frame" && particle.run) {
72584
+ particle.run({startFrame:val, endFrame:val});
72583
72585
  } else {
72584
72586
  if (property == "x") {
72585
72587
  particle.info.position.x = (that.horizontal || that.vertical)?val:val+width/2;
@@ -87515,34 +87517,34 @@ https://codepen.io/zimjs/pen/ZqNYxX
87515
87517
  } (zim || {});
87516
87518
 
87517
87519
  var globalFunctions = [
87518
- ["zog", zog],
87519
- ["zid", zid],
87520
- ["zss", zss],
87521
- ["zgo", zgo],
87522
- ["zum", zum],
87523
- ["zot", zot],
87524
- ["zop", zop],
87525
- ["zil", zil],
87526
- ["zet", zet],
87527
- ["zob", zob],
87528
- ["zik", zik],
87529
- ["zta", zta],
87530
- ["zor", zor],
87531
- ["zogg", zogg],
87532
- ["zogp", zogp],
87533
- ["zogb", zogb],
87534
- ["zogr", zogr],
87535
- ["zogy", zogy],
87536
- ["zogo", zogo],
87537
- ["zogl", zogl],
87538
- ["zogd", zogd],
87539
- ["zimplify", zimplify],
87540
- ["zimify", zimify]
87520
+ ["zog", zog],
87521
+ ["zid", zid],
87522
+ ["zss", zss],
87523
+ ["zgo", zgo],
87524
+ ["zum", zum],
87525
+ ["zot", zot],
87526
+ ["zop", zop],
87527
+ ["zil", zil],
87528
+ ["zet", zet],
87529
+ ["zob", zob],
87530
+ ["zik", zik],
87531
+ ["zta", zta],
87532
+ ["zor", zor],
87533
+ ["zogg", zogg],
87534
+ ["zogp", zogp],
87535
+ ["zogb", zogb],
87536
+ ["zogr", zogr],
87537
+ ["zogy", zogy],
87538
+ ["zogo", zogo],
87539
+ ["zogl", zogl],
87540
+ ["zogd", zogd],
87541
+ ["zimplify", zimplify],
87542
+ ["zimify", zimify]
87541
87543
  ];
87542
87544
 
87543
87545
  for (z_i = 0; z_i < globalFunctions.length; z_i++) {
87544
- var pair = globalFunctions[z_i];
87545
- WW[pair[0]] = zim[pair[0]] = pair[1];
87546
+ var pair = globalFunctions[z_i];
87547
+ WW[pair[0]] = zim[pair[0]] = pair[1];
87546
87548
  }
87547
87549
 
87548
87550
 
@@ -87589,9 +87591,9 @@ var globalsConstants = [
87589
87591
  ["TAU", zim.TAU],
87590
87592
  ["DEG", zim.DEG],
87591
87593
  ["RAD", zim.RAD],
87592
- ["PHI", zim.PHI],
87594
+ ["PHI", zim.PHI]
87593
87595
  ];
87594
-
87596
+
87595
87597
  for (z_i = 0; z_i < globalsConstants.length; z_i++) {
87596
87598
  var pair = globalsConstants[z_i];
87597
87599
  WW[pair[0]] = pair[1];