zimjs 18.1.6 → 18.1.7
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 -2
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -74618,7 +74618,10 @@ dispatches a "moving" event if target is moving and "startmoving" and "stopmovin
|
|
|
74618
74618
|
if (penDown) {
|
|
74619
74619
|
target.x+=2
|
|
74620
74620
|
target.write = false;
|
|
74621
|
-
timeout(0, function() {
|
|
74621
|
+
timeout(0, function() {
|
|
74622
|
+
target.write = true;
|
|
74623
|
+
if (target.stage) target.stage.update();
|
|
74624
|
+
});
|
|
74622
74625
|
}
|
|
74623
74626
|
}
|
|
74624
74627
|
});
|
|
@@ -80768,6 +80771,11 @@ If you have moved, scaled or rotated the Emitter or its container,
|
|
|
80768
80771
|
then you will want to use var point = myEmitter.localToGlobal(particle.x, particle.y)
|
|
80769
80772
|
and get point.x and point.y to find the location of the particle relative to the stage coordinates
|
|
80770
80773
|
|
|
80774
|
+
NOTE: the Emitter sets the stage snapToPixelEnabled to true if cache is true
|
|
80775
|
+
As of ZIM 018, when the emitter is done it sets it to false (default for ZIM Stage).
|
|
80776
|
+
We do not know when its value is set ss the property is a CreateJS property - unless we override
|
|
80777
|
+
but for now, if snapToPixelEnabled is desired to be true, set it to true after using the emitter.
|
|
80778
|
+
|
|
80771
80779
|
PARTICLES CONTAINER
|
|
80772
80780
|
By default, the Emitter will make a Container and place it beneath itself when added to the stage.
|
|
80773
80781
|
by separating the particles from the emitter, it allows the emitter to be moved without all the particles moving
|
|
@@ -81074,7 +81082,6 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81074
81082
|
var stage;
|
|
81075
81083
|
zim.added(that, addedToStage);
|
|
81076
81084
|
function addedToStage(s) {
|
|
81077
|
-
|
|
81078
81085
|
that.emitterPaused = null; // will set back using that.startEmitterPaused
|
|
81079
81086
|
|
|
81080
81087
|
that.on("added", function () {
|
|
@@ -81498,6 +81505,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81498
81505
|
if (p.trace?p.getChildAt(0).endSpurt:p.endSpurt) {
|
|
81499
81506
|
sendEvent("spurtfizzed", p);
|
|
81500
81507
|
that.spurting = false;
|
|
81508
|
+
if (cache) stage.snapToPixelEnabled = false;
|
|
81501
81509
|
}
|
|
81502
81510
|
if (that.pool) {
|
|
81503
81511
|
if (p.pooled == "end") {
|
|
@@ -81559,12 +81567,14 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81559
81567
|
// that.removeFrom();
|
|
81560
81568
|
if (that.parent) that.parent.removeChild(that);
|
|
81561
81569
|
that.particles.removeFrom();
|
|
81570
|
+
if (cache) stage.snapToPixelEnabled = false;
|
|
81562
81571
|
};
|
|
81563
81572
|
|
|
81564
81573
|
this.spurting = false;
|
|
81565
81574
|
this.spurt = function(num, time, restart) {
|
|
81566
81575
|
var sig = "num, time, restart";
|
|
81567
81576
|
var duo; if (duo = zob(that.spurt, arguments, sig)) return duo;
|
|
81577
|
+
if (cache) stage.snapToPixelEnabled = true;
|
|
81568
81578
|
if (!zot(time)) {
|
|
81569
81579
|
zim.timeout(zim.Pick.choose(time), function() {
|
|
81570
81580
|
lastSpurt(that.currentParticle);
|
|
@@ -81612,6 +81622,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81612
81622
|
}
|
|
81613
81623
|
that.zimInterval.pause();
|
|
81614
81624
|
that.emitterPaused = true;
|
|
81625
|
+
if (cache) stage.snapToPixelEnabled = false;
|
|
81615
81626
|
} else { // unpausing
|
|
81616
81627
|
if (!that.emitterPaused) return that;
|
|
81617
81628
|
if (restart) {
|
|
@@ -81632,6 +81643,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81632
81643
|
}
|
|
81633
81644
|
if (that.zimInterval) that.zimInterval.pause(false, immediate);
|
|
81634
81645
|
that.emitterPaused = false;
|
|
81646
|
+
if (cache) stage.snapToPixelEnabled = true;
|
|
81635
81647
|
}
|
|
81636
81648
|
return that;
|
|
81637
81649
|
};
|
|
@@ -81661,6 +81673,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
81661
81673
|
|
|
81662
81674
|
|
|
81663
81675
|
this.dispose = function() {
|
|
81676
|
+
if (cache) stage.snapToPixelEnabled = true;
|
|
81664
81677
|
if (that.zimInterval) that.zimInterval.clear();
|
|
81665
81678
|
if (emitterTicker) {
|
|
81666
81679
|
zim.Ticker.remove(emitterTicker);
|