@galacean/effects-threejs 2.0.0-alpha.23 → 2.0.0-alpha.24
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/dist/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +10 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.0.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.24
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -16413,6 +16413,9 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16413
16413
|
return _this;
|
|
16414
16414
|
}
|
|
16415
16415
|
var _proto = ParticleSystem.prototype;
|
|
16416
|
+
_proto.isFrozen = function isFrozen() {
|
|
16417
|
+
return this.frozen;
|
|
16418
|
+
};
|
|
16416
16419
|
_proto.initEmitterTransform = function initEmitterTransform() {
|
|
16417
16420
|
var position = this.item.transform.position.clone();
|
|
16418
16421
|
var rotation = this.item.transform.rotation.clone();
|
|
@@ -16546,6 +16549,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16546
16549
|
return b.reset();
|
|
16547
16550
|
});
|
|
16548
16551
|
this.frozen = false;
|
|
16552
|
+
this.ended = false;
|
|
16549
16553
|
};
|
|
16550
16554
|
_proto.onUpdate = function onUpdate(delta) {
|
|
16551
16555
|
var _this = this;
|
|
@@ -17329,10 +17333,7 @@ function randomArrItem(arr, keepArr) {
|
|
|
17329
17333
|
*/ var ParticleBehaviourPlayable = /*#__PURE__*/ function(Playable) {
|
|
17330
17334
|
_inherits(ParticleBehaviourPlayable, Playable);
|
|
17331
17335
|
function ParticleBehaviourPlayable() {
|
|
17332
|
-
|
|
17333
|
-
_this = Playable.apply(this, arguments) || this;
|
|
17334
|
-
_this.lastTime = 0;
|
|
17335
|
-
return _this;
|
|
17336
|
+
return Playable.apply(this, arguments);
|
|
17336
17337
|
}
|
|
17337
17338
|
var _proto = ParticleBehaviourPlayable.prototype;
|
|
17338
17339
|
_proto.start = function start(context) {
|
|
@@ -17357,13 +17358,11 @@ function randomArrItem(arr, keepArr) {
|
|
|
17357
17358
|
// particleSystem.setParentTransform(parentItem.transform);
|
|
17358
17359
|
particleSystem.setVisible(true);
|
|
17359
17360
|
var deltaTime = context.deltaTime;
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
deltaTime = 0;
|
|
17361
|
+
if (this.time < particleSystem.item.duration && particleSystem.isFrozen()) {
|
|
17362
|
+
particleSystem.reset();
|
|
17363
17363
|
}
|
|
17364
17364
|
particleSystem.onUpdate(deltaTime);
|
|
17365
17365
|
}
|
|
17366
|
-
this.lastTime = this.time;
|
|
17367
17366
|
};
|
|
17368
17367
|
return ParticleBehaviourPlayable;
|
|
17369
17368
|
}(Playable);
|
|
@@ -25739,7 +25738,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
25739
25738
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
25740
25739
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
25741
25740
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
25742
|
-
var version$1 = "2.0.0-alpha.
|
|
25741
|
+
var version$1 = "2.0.0-alpha.24";
|
|
25743
25742
|
logger.info("Core version: " + version$1 + ".");
|
|
25744
25743
|
|
|
25745
25744
|
var _obj;
|
|
@@ -27372,7 +27371,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
27372
27371
|
*/ Mesh.create = function(engine, props) {
|
|
27373
27372
|
return new ThreeMesh(engine, props);
|
|
27374
27373
|
};
|
|
27375
|
-
var version = "2.0.0-alpha.
|
|
27374
|
+
var version = "2.0.0-alpha.24";
|
|
27376
27375
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
27377
27376
|
|
|
27378
27377
|
exports.AbstractPlugin = AbstractPlugin;
|