zimjs 19.1.1 → 19.1.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.
- package/package.json +1 -1
- package/src/zim.js +14 -6
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -85340,6 +85340,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
85340
85340
|
poolList = [];
|
|
85341
85341
|
};
|
|
85342
85342
|
|
|
85343
|
+
|
|
85343
85344
|
if (!that.startEmitterPaused) this.emitterPaused = false; // do not set to false - as it will be done below if needed
|
|
85344
85345
|
this.pauseEmitter = function(state, restart, freeze, immediate) {
|
|
85345
85346
|
|
|
@@ -85348,12 +85349,12 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
85348
85349
|
if (zot(restart)) restart = false;
|
|
85349
85350
|
if (zot(freeze)) freeze = false;
|
|
85350
85351
|
if (state) { // pausing
|
|
85351
|
-
|
|
85352
|
-
|
|
85353
|
-
|
|
85354
|
-
|
|
85355
|
-
|
|
85356
|
-
|
|
85352
|
+
if (that.emitterPaused) return that;
|
|
85353
|
+
if (freeze) {
|
|
85354
|
+
if (emitterTicker) zim.Ticker.remove(emitterTicker, mID, that);
|
|
85355
|
+
zim.loop(that.particles, function(particle) {
|
|
85356
|
+
particle.pauseAnimate();
|
|
85357
|
+
if (particle.trace) particle.getChildAt(0).pauseAnimate();
|
|
85357
85358
|
if (particle.timeOut) {
|
|
85358
85359
|
particle.timeOut.pause();
|
|
85359
85360
|
}
|
|
@@ -85384,6 +85385,8 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
85384
85385
|
that.emitterPaused = false;
|
|
85385
85386
|
if (cache) stage.snapToPixelEnabled = true;
|
|
85386
85387
|
}
|
|
85388
|
+
|
|
85389
|
+
that.zimInterval.pauseOnBlurPaused = state; // ZIM 019 Patch - in case being paused when tab not active
|
|
85387
85390
|
return that;
|
|
85388
85391
|
};
|
|
85389
85392
|
|
|
@@ -98006,6 +98009,7 @@ zim.setBlurDetect = function() {
|
|
|
98006
98009
|
obj = zim.pauseOnBlur[i];
|
|
98007
98010
|
obj.pauseOnBlurPaused = obj.paused;
|
|
98008
98011
|
obj.pause(true);
|
|
98012
|
+
zogr(obj.type, obj.special, obj.pauseOnBlurPaused)
|
|
98009
98013
|
}
|
|
98010
98014
|
}
|
|
98011
98015
|
if (zim.pauseAnimateOnBlur && zim.animatedObjects) {
|
|
@@ -100744,6 +100748,10 @@ NOTE if zns=true is used to force the namespace then various three.js controls w
|
|
|
100744
100748
|
import {OrbitControls} from "https://zimjs.org/cdn/019/zim_three";
|
|
100745
100749
|
Similarily for: FirstPersonControls, PointerLockControls, GLTFLoader, ObjectControls, VRButton
|
|
100746
100750
|
|
|
100751
|
+
NOTE if using a glb (the binary version of gltf) then set Blob = document.Blob
|
|
100752
|
+
so the ZIM Blob does not conflict with the JS Blob - then use zim.Blob() for the ZIM blob.
|
|
100753
|
+
Or see zimplify() for other alternatives.
|
|
100754
|
+
|
|
100747
100755
|
EXAMPLE
|
|
100748
100756
|
// up top after import zim from "https://zimjs.org/cdn/019/zim_three"; // or the latest
|
|
100749
100757
|
|