zimjs 16.3.2 → 16.3.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 +34 -17
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -28244,7 +28244,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
28244
28244
|
this.clone = function(recursive) {
|
|
28245
28245
|
if (zot(recursive)) recursive = false;
|
|
28246
28246
|
if (color.type) color2 = null;
|
|
28247
|
-
var w = that.cloneProps(new zim.Page(width, height, color, color2,
|
|
28247
|
+
var w = that.cloneProps(new zim.Page(width, height, color, color2, angle, pattern, scalePattern, cache, style, group, inherit));
|
|
28248
28248
|
if (recursive) {
|
|
28249
28249
|
that.cloneChildren(w);
|
|
28250
28250
|
}
|
|
@@ -30803,7 +30803,7 @@ scrollBarAlpha - (default .3) the transparency of the scrollBar
|
|
|
30803
30803
|
scrollBarFade - (default true) fades scrollBar unless being used
|
|
30804
30804
|
scrollBarH - (default true) if scrolling in horizontal is needed then show scrollBar
|
|
30805
30805
|
scrollBarV - (default true) if scrolling in vertical is needed then show scrollBar
|
|
30806
|
-
scrollBarOverlay - (default true) set to false to not overlay the scrollBar on the
|
|
30806
|
+
scrollBarOverlay - (default true) set to false to not overlay the scrollBar on the content
|
|
30807
30807
|
overlaying could hide content - but without overlay, content less than window size will show gap when no scrollBar
|
|
30808
30808
|
slide - (default true) Boolean to throw the content when drag/swipe released
|
|
30809
30809
|
slideFactor - (default .95) is the factor multiplied by dragging velocity (1 no slowing, .7 fast slowing)
|
|
@@ -31441,6 +31441,10 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
31441
31441
|
}
|
|
31442
31442
|
}
|
|
31443
31443
|
} // end tapList
|
|
31444
|
+
|
|
31445
|
+
that.updateTree = function() {
|
|
31446
|
+
tapList();
|
|
31447
|
+
}
|
|
31444
31448
|
|
|
31445
31449
|
that.expandList = function(num) {
|
|
31446
31450
|
that.selectedIndex = num;
|
|
@@ -34542,7 +34546,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
34542
34546
|
if (useLabels && ((semiTicks && tickLarge) || !semiTicks)) {
|
|
34543
34547
|
var dd = Math.max(zim.countDecimals(step0), zim.countDecimals(min), zim.countDecimals(max));
|
|
34544
34548
|
new zim.Label({
|
|
34545
|
-
text:zim.decimals(min+(max-min)/Math.abs(stepsTotal)*i,dd+1),
|
|
34549
|
+
text:zim.decimals(min+(max-min)/Math.abs(stepsTotal||ticksTotal)*i,dd+1,true),
|
|
34546
34550
|
size:DS.size?DS.size:10,
|
|
34547
34551
|
align:"center",
|
|
34548
34552
|
valign:"center"
|
|
@@ -47666,6 +47670,8 @@ RETURNS obj for chaining
|
|
|
47666
47670
|
if (obj.cur) obj.cur(zot(overCursor)?"pointer":overCursor);
|
|
47667
47671
|
else obj.cursor = zot(overCursor)?"pointer":overCursor;
|
|
47668
47672
|
|
|
47673
|
+
if (e.stageX == null) return; // added for TextureActive drag in 2D view
|
|
47674
|
+
|
|
47669
47675
|
if (slide) {
|
|
47670
47676
|
dragObject.dispatchEvent("slidestart");
|
|
47671
47677
|
|
|
@@ -64937,6 +64943,9 @@ XR
|
|
|
64937
64943
|
TextureActive will detect if XR (AR/VR) is being used and will use the suitable Raycaster
|
|
64938
64944
|
Additional classes are provided with the ZIM Three helper library for controllers, movement and teleport
|
|
64939
64945
|
|
|
64946
|
+
NOTE: for XR, a layer must be set so the controllers do not get in the way of interactivity
|
|
64947
|
+
so in the TextureActives() set layer:1 and when adding meshes use addMesh(mesh, 1)
|
|
64948
|
+
|
|
64940
64949
|
SEE:
|
|
64941
64950
|
https://zimjs.com/015/vr.html - for example with Three and controllers (trigger), movement (sticks and squeeze) and teleport (B and Y buttons)
|
|
64942
64951
|
|
|
@@ -65038,6 +65047,7 @@ layers - (default 0) a layer number from 0 to 31 or an array of layers
|
|
|
65038
65047
|
it is a good idea to specify 1 for instance and add TexureActive meshes to layer 1
|
|
65039
65048
|
the addMesh() method has a layer parameter that should match the layer number used here
|
|
65040
65049
|
the Three makePanel() method will automatically add the panel mesh to the layer specified for the TextureActives object
|
|
65050
|
+
NOTE: for XR, layers must be set so the controls do not get in the way of interactivity
|
|
65041
65051
|
near - (default undefined) - the start of the distance-from-camera range for the object to be interactive
|
|
65042
65052
|
far - (default undefined) - the end of the distance-from-camera range for the object to be interactive
|
|
65043
65053
|
ignoreList - (default null) - a mesh or array of meshes to ignore if between the camera and the TextureActive mesh
|
|
@@ -65250,16 +65260,6 @@ function apply () {
|
|
|
65250
65260
|
that.XR = WW.XR = false;
|
|
65251
65261
|
var tempMatrix = new threejs.Matrix4();
|
|
65252
65262
|
|
|
65253
|
-
var controller1 = that.controllerLeft = renderer.xr.getController(0);
|
|
65254
|
-
controller1.addEventListener('selectstart', that.doLcDown); // ignoring select
|
|
65255
|
-
controller1.addEventListener('selectend', that.doLcUp);
|
|
65256
|
-
controller1.addEventListener('move', that.doLcMove);
|
|
65257
|
-
|
|
65258
|
-
var controller2 = that.controllerRight = renderer.xr.getController(1);
|
|
65259
|
-
controller2.addEventListener('selectstart', that.doRcDown); // ignoring select
|
|
65260
|
-
controller2.addEventListener('selectend', that.doRcUp);
|
|
65261
|
-
controller2.addEventListener('move', that.doRcMove);
|
|
65262
|
-
|
|
65263
65263
|
that.doLcDown = function (e) {
|
|
65264
65264
|
// possibly need to set pointerID
|
|
65265
65265
|
XR = true;
|
|
@@ -65286,6 +65286,16 @@ function apply () {
|
|
|
65286
65286
|
doMove(e, "right");
|
|
65287
65287
|
}
|
|
65288
65288
|
|
|
65289
|
+
var controller1 = that.controllerLeft = renderer.xr.getController(0);
|
|
65290
|
+
controller1.addEventListener('selectstart', that.doLcDown); // ignoring select
|
|
65291
|
+
controller1.addEventListener('selectend', that.doLcUp);
|
|
65292
|
+
controller1.addEventListener('move', that.doLcMove);
|
|
65293
|
+
|
|
65294
|
+
var controller2 = that.controllerRight = renderer.xr.getController(1);
|
|
65295
|
+
controller2.addEventListener('selectstart', that.doRcDown); // ignoring select
|
|
65296
|
+
controller2.addEventListener('selectend', that.doRcUp);
|
|
65297
|
+
controller2.addEventListener('move', that.doRcMove);
|
|
65298
|
+
|
|
65289
65299
|
|
|
65290
65300
|
that.doPointerDown = function(e) {
|
|
65291
65301
|
XR = false;
|
|
@@ -75001,7 +75011,8 @@ horizontal - (default false) start the particles across the emitter's width at t
|
|
|
75001
75011
|
vertical - (default false) start the particles across the emitter's height at the left of the emitter (unless horizontal is set to true)
|
|
75002
75012
|
sink - (default null) an object with x and y properties (can be a display object) that the particles will be pulled to (or pushed if sinkForce is negative)
|
|
75003
75013
|
sinkForce - |ZIM VEE| (default 10 if sink) the force particles are moved towards the sink location
|
|
75004
|
-
cache - (default mobile() or false if gpu) Boolean to cache each particle - helpful if complex shape or text
|
|
75014
|
+
cache - (default mobile() or false if gpu) Boolean to cache each particle - helpful if complex shape or text
|
|
75015
|
+
Bitmap, Pic, Sprite will not be cached.
|
|
75005
75016
|
events - (default false) Boolean - set to true to receive events from Emitter
|
|
75006
75017
|
startPaused - (default false) Boolean - set to true to start the Emitter in the paused state
|
|
75007
75018
|
pool - (default true) Boolean if true, makes as many particles as it needs before recycling particles
|
|
@@ -75403,7 +75414,13 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
75403
75414
|
});
|
|
75404
75415
|
}
|
|
75405
75416
|
|
|
75406
|
-
if (
|
|
75417
|
+
if (
|
|
75418
|
+
cache &&
|
|
75419
|
+
!particle.emitShape &&
|
|
75420
|
+
particle.type!="Pic" &&
|
|
75421
|
+
particle.type!="Bitmap" &&
|
|
75422
|
+
particle.type!="Sprite"
|
|
75423
|
+
) particle.cache(particle.getBounds().x-10,particle.getBounds().y-10,particle.getBounds().width+20,particle.getBounds().height+20);
|
|
75407
75424
|
|
|
75408
75425
|
//------------- DECAY, FADE, SHRINK, FIZZ
|
|
75409
75426
|
|
|
@@ -90796,7 +90813,7 @@ for (z_i = 0; z_i < globalFunctions.length; z_i++) {
|
|
|
90796
90813
|
WW[pair[0]] = zim[pair[0]] = pair[1];
|
|
90797
90814
|
}
|
|
90798
90815
|
|
|
90799
|
-
|
|
90816
|
+
// if (zns) {
|
|
90800
90817
|
// these are global regardless
|
|
90801
90818
|
var globalsConstants = [
|
|
90802
90819
|
["FIT", zim.FIT],
|
|
@@ -90851,7 +90868,7 @@ for (z_i = 0; z_i < globalFunctions.length; z_i++) {
|
|
|
90851
90868
|
for (z_i = 0; z_i < zim.colors.length; z_i++) {
|
|
90852
90869
|
WW[zim.colors[z_i]] = zim.colorsHex[z_i];
|
|
90853
90870
|
}
|
|
90854
|
-
|
|
90871
|
+
// } else zimplify();
|
|
90855
90872
|
|
|
90856
90873
|
WW.zim = zim;
|
|
90857
90874
|
export default zim;
|