@galacean/effects-threejs 2.0.4 → 2.0.6
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 +21 -24
- 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 +21 -24
- 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.
|
|
6
|
+
* Version: v2.0.6
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -13589,25 +13589,25 @@ function _assert_this_initialized(self) {
|
|
|
13589
13589
|
}
|
|
13590
13590
|
var _proto = PlayableGraph.prototype;
|
|
13591
13591
|
_proto.evaluate = function evaluate(dt) {
|
|
13592
|
-
// 初始化节点状态
|
|
13593
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(this.playables), _step; !(_step = _iterator()).done;){
|
|
13594
|
-
var playable = _step.value;
|
|
13595
|
-
this.updatePlayableTime(playable, dt);
|
|
13596
|
-
}
|
|
13597
13592
|
// 初始化输出节点状态
|
|
13598
|
-
for(var
|
|
13599
|
-
var playableOutput =
|
|
13593
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.playableOutputs), _step; !(_step = _iterator()).done;){
|
|
13594
|
+
var playableOutput = _step.value;
|
|
13600
13595
|
playableOutput.context.deltaTime = dt;
|
|
13601
13596
|
}
|
|
13602
13597
|
// 执行生命周期函数
|
|
13603
|
-
for(var
|
|
13604
|
-
var playableOutput1 =
|
|
13598
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.playableOutputs), _step1; !(_step1 = _iterator1()).done;){
|
|
13599
|
+
var playableOutput1 = _step1.value;
|
|
13605
13600
|
this.prepareFrameWithRoot(playableOutput1);
|
|
13606
13601
|
}
|
|
13607
|
-
for(var
|
|
13608
|
-
var playableOutput2 =
|
|
13602
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(this.playableOutputs), _step2; !(_step2 = _iterator2()).done;){
|
|
13603
|
+
var playableOutput2 = _step2.value;
|
|
13609
13604
|
this.processFrameWithRoot(playableOutput2);
|
|
13610
13605
|
}
|
|
13606
|
+
// 更新节点时间
|
|
13607
|
+
for(var _iterator3 = _create_for_of_iterator_helper_loose(this.playables), _step3; !(_step3 = _iterator3()).done;){
|
|
13608
|
+
var playable = _step3.value;
|
|
13609
|
+
this.updatePlayableTime(playable, dt);
|
|
13610
|
+
}
|
|
13611
13611
|
};
|
|
13612
13612
|
_proto.connect = function connect(source, sourceOutputPort, destination, destinationInputPort) {
|
|
13613
13613
|
destination.connectInput(destinationInputPort, source, sourceOutputPort);
|
|
@@ -13630,11 +13630,7 @@ function _assert_this_initialized(self) {
|
|
|
13630
13630
|
if (playable.getPlayState() !== 0) {
|
|
13631
13631
|
return;
|
|
13632
13632
|
}
|
|
13633
|
-
|
|
13634
|
-
playable.overrideTimeNextEvaluation = false;
|
|
13635
|
-
} else {
|
|
13636
|
-
playable.setTime(playable.getTime() + deltaTime);
|
|
13637
|
-
}
|
|
13633
|
+
playable.setTime(playable.getTime() + deltaTime);
|
|
13638
13634
|
};
|
|
13639
13635
|
return PlayableGraph;
|
|
13640
13636
|
}();
|
|
@@ -13646,7 +13642,6 @@ function _assert_this_initialized(self) {
|
|
|
13646
13642
|
if (inputCount === void 0) inputCount = 0;
|
|
13647
13643
|
this.onPlayablePlayFlag = true;
|
|
13648
13644
|
this.onPlayablePauseFlag = false;
|
|
13649
|
-
this.overrideTimeNextEvaluation = false;
|
|
13650
13645
|
this.destroyed = false;
|
|
13651
13646
|
this.inputs = [];
|
|
13652
13647
|
this.inputOuputPorts = [];
|
|
@@ -13732,7 +13727,6 @@ function _assert_this_initialized(self) {
|
|
|
13732
13727
|
};
|
|
13733
13728
|
_proto.setTime = function setTime(time) {
|
|
13734
13729
|
this.time = time;
|
|
13735
|
-
this.overrideTimeNextEvaluation = true;
|
|
13736
13730
|
};
|
|
13737
13731
|
_proto.getTime = function getTime() {
|
|
13738
13732
|
return this.time;
|
|
@@ -16843,7 +16837,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16843
16837
|
break;
|
|
16844
16838
|
}
|
|
16845
16839
|
var burst = bursts[j];
|
|
16846
|
-
var opts = burst.getGeneratorOptions(timePassed, lifetime);
|
|
16840
|
+
var opts = !burst.disabled && burst.getGeneratorOptions(timePassed, lifetime);
|
|
16847
16841
|
if (opts) {
|
|
16848
16842
|
var originVec = [
|
|
16849
16843
|
0,
|
|
@@ -16852,6 +16846,9 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16852
16846
|
];
|
|
16853
16847
|
var offsets = emission.burstOffsets[j];
|
|
16854
16848
|
var burstOffset = offsets && offsets[opts.cycleIndex] || originVec;
|
|
16849
|
+
if (burst.once) {
|
|
16850
|
+
this.removeBurst(j);
|
|
16851
|
+
}
|
|
16855
16852
|
for(var i1 = 0; i1 < opts.count && cursor < maxCount; i1++){
|
|
16856
16853
|
var _p_transform;
|
|
16857
16854
|
if (shouldSkipGenerate()) {
|
|
@@ -18945,7 +18942,7 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18945
18942
|
_proto.toLocalTime = function toLocalTime(time) {
|
|
18946
18943
|
var localTime = time - this.start;
|
|
18947
18944
|
var duration = this.duration;
|
|
18948
|
-
if (localTime - duration > 0
|
|
18945
|
+
if (localTime - duration > 0) {
|
|
18949
18946
|
if (this.endBehavior === EndBehavior.restart) {
|
|
18950
18947
|
localTime = localTime % duration;
|
|
18951
18948
|
} else if (this.endBehavior === EndBehavior.freeze) {
|
|
@@ -19074,7 +19071,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
19074
19071
|
var ended = false;
|
|
19075
19072
|
var started = false;
|
|
19076
19073
|
var boundObject = this.track.binding;
|
|
19077
|
-
if (localTime
|
|
19074
|
+
if (localTime >= clip.start + clip.duration && clip.endBehavior === EndBehavior.destroy) {
|
|
19078
19075
|
if (_instanceof1(boundObject, exports.VFXItem) && exports.VFXItem.isParticle(boundObject) && this.particleSystem && !this.particleSystem.destroyed) {
|
|
19079
19076
|
weight = 1.0;
|
|
19080
19077
|
} else {
|
|
@@ -27707,7 +27704,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
27707
27704
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
27708
27705
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
27709
27706
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
27710
|
-
var version$1 = "2.0.
|
|
27707
|
+
var version$1 = "2.0.6";
|
|
27711
27708
|
logger.info("Core version: " + version$1 + ".");
|
|
27712
27709
|
|
|
27713
27710
|
var _obj;
|
|
@@ -29388,7 +29385,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
29388
29385
|
*/ Mesh.create = function(engine, props) {
|
|
29389
29386
|
return new ThreeMesh(engine, props);
|
|
29390
29387
|
};
|
|
29391
|
-
var version = "2.0.
|
|
29388
|
+
var version = "2.0.6";
|
|
29392
29389
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
29393
29390
|
|
|
29394
29391
|
exports.AbstractPlugin = AbstractPlugin;
|