zimjs 18.2.1 → 18.2.3
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 +15 -15
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -14784,9 +14784,7 @@ function makeShader(DS, width, height, fragment, uniforms, vertex, dynamic, preC
|
|
|
14784
14784
|
if (preCall && typeof preCall=="function") preCall(program, gl, canvas); // ZIM
|
|
14785
14785
|
gl.useProgram(program);
|
|
14786
14786
|
var vertexData = [];
|
|
14787
|
-
if (postCall && typeof postCall=="function")
|
|
14788
|
-
postCall(program, gl, canvas, vertexData);
|
|
14789
|
-
}
|
|
14787
|
+
if (postCall && typeof postCall=="function") postCall(program, gl, canvas, vertexData); // ZIM
|
|
14790
14788
|
|
|
14791
14789
|
if (strip) {
|
|
14792
14790
|
if (vertexData.length == 0) vertexData = [1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0]; // two triangles strips
|
|
@@ -14835,8 +14833,7 @@ function makeShader(DS, width, height, fragment, uniforms, vertex, dynamic, preC
|
|
|
14835
14833
|
var mou = tether.globalToLocal(tether.stage.frame.mouseX, tether.stage.frame.mouseY);
|
|
14836
14834
|
setUniform("4f", "iMouse", mou.x, height-mou.y, downCheck?1:0, clickCheck?1:0);
|
|
14837
14835
|
clickCheck = false;
|
|
14838
|
-
}
|
|
14839
|
-
|
|
14836
|
+
}
|
|
14840
14837
|
if (strip) gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
|
14841
14838
|
else gl.drawArrays(gl.TRIANGLES, 0, vertexData.length);
|
|
14842
14839
|
|
|
@@ -37024,7 +37021,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
37024
37021
|
selector.mouseEnabled = false;
|
|
37025
37022
|
});
|
|
37026
37023
|
this.selector = selector;
|
|
37027
|
-
} else {
|
|
37024
|
+
} else {
|
|
37028
37025
|
selector = this.selector = new zim.Rectangle(targetW, targetH, zim.faint, zim.faint, borderWidth, corner, dashed, {ignoreScale:!resizeScale})
|
|
37029
37026
|
.centerReg(that);
|
|
37030
37027
|
selector.loc(tile.width/2, target.y+paddingV, that, behind?0:1);
|
|
@@ -56990,7 +56987,6 @@ props - the object literal holding properties and values to animate
|
|
|
56990
56987
|
DOT PROPERTIES: you can animate properties on properties using quotes:
|
|
56991
56988
|
Here is animate used as a function to animate a threejs mesh
|
|
56992
56989
|
animate(mesh, {"rotation.y":360*RAD}, 5000);
|
|
56993
|
-
note that the from parameter is not currently supported with dot properties (difficult bug)
|
|
56994
56990
|
CSS PROPERTIES: animate can animate CSS properties
|
|
56995
56991
|
ZIM's CreateJS 1.3.2 has the CreateJS CSS Pluging installed
|
|
56996
56992
|
Set the css parameter to true and see the CSS parameter for more details
|
|
@@ -57253,10 +57249,11 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
57253
57249
|
if (target && (target.props || target.obj)) {
|
|
57254
57250
|
var duo; if (duo = zob(zim.animate, arguments, sig)) return duo;
|
|
57255
57251
|
}
|
|
57256
|
-
|
|
57252
|
+
|
|
57253
|
+
if (target && target.type && target.type=="AC" && WW.zdf) {WW.zdf.ac("animate", arguments); return target;}
|
|
57257
57254
|
if (!zim.animateCheck) {z_d("45"); zim.animateCheck=true;}
|
|
57258
57255
|
|
|
57259
|
-
if (!target)
|
|
57256
|
+
if (!target) target = {}; // ZIM 018 replacing: return; from 10.9.0
|
|
57260
57257
|
var AN = zim.ANIMATE;
|
|
57261
57258
|
if (WW.ANIMATE != null) AN = WW.ANIMATE;
|
|
57262
57259
|
if (!AN) {
|
|
@@ -58395,15 +58392,16 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58395
58392
|
if (set && !zot(set[i])) {
|
|
58396
58393
|
newObj[i] = set[i];
|
|
58397
58394
|
} else {
|
|
58398
|
-
if (i.match(/\./)) { // handle dot props like threejs - patched ZIM 018
|
|
58399
|
-
var bunch = i.split(/\./g);
|
|
58400
|
-
|
|
58395
|
+
if (i.match(/\./)) { // handle dot props like threejs - patched ZIM 018
|
|
58396
|
+
var bunch = i.split(/\./g);
|
|
58397
|
+
if (bunch[0]=="") bunch.shift(); // sometimes has dot on front and sometimes not
|
|
58398
|
+
newObj[i] = target[bunch[0]][bunch[1]];
|
|
58401
58399
|
} else {
|
|
58402
58400
|
newObj[i] = target[i];
|
|
58403
58401
|
}
|
|
58404
58402
|
}
|
|
58405
58403
|
if (update) {
|
|
58406
|
-
if (i.match(/\./)) target[bunch[
|
|
58404
|
+
if (i.match(/\./)) target[bunch[0]][bunch[1]] = obj[i];
|
|
58407
58405
|
else target[i] = obj[i];
|
|
58408
58406
|
}
|
|
58409
58407
|
}
|
|
@@ -66672,6 +66670,8 @@ note: the item is not the event object target - as that is the tile
|
|
|
66672
66670
|
|
|
66673
66671
|
that.spacingH = spacingHList[0];
|
|
66674
66672
|
that.spacingV = spacingVList[0];
|
|
66673
|
+
if (zot(that.spacingH)) that.spacingH = spacingH;
|
|
66674
|
+
if (zot(that.spacingV)) that.spacingV = spacingV;
|
|
66675
66675
|
|
|
66676
66676
|
// ~~~~~~~~~~~~~~~~~~~ GET ARRAY OF ITEMS ~~~~~~~~~~~~~~~
|
|
66677
66677
|
// this list could be edited later and passed back into remake()
|
|
@@ -98172,7 +98172,7 @@ for (z_i = 0; z_i < globalFunctions.length; z_i++) {
|
|
|
98172
98172
|
WW[pair[0]] = zim[pair[0]] = pair[1];
|
|
98173
98173
|
}
|
|
98174
98174
|
|
|
98175
|
-
|
|
98175
|
+
if (zns) {
|
|
98176
98176
|
// these are global regardless
|
|
98177
98177
|
var globalsConstants = [
|
|
98178
98178
|
["FIT", zim.FIT],
|
|
@@ -98229,7 +98229,7 @@ for (z_i = 0; z_i < globalFunctions.length; z_i++) {
|
|
|
98229
98229
|
for (z_i = 0; z_i < zim.colors.length; z_i++) {
|
|
98230
98230
|
WW[zim.colors[z_i]] = zim.colorsHex[z_i];
|
|
98231
98231
|
}
|
|
98232
|
-
|
|
98232
|
+
} else zimplify();
|
|
98233
98233
|
|
|
98234
98234
|
WW.zim = zim;
|
|
98235
98235
|
export default zim;
|