@galacean/effects-core 2.0.4 → 2.0.5
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 +20 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -23
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/playable-graph.d.ts +0 -1
- package/dist/plugins/cal/timeline-asset.d.ts +2 -5
- package/dist/plugins/particle/burst.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.0.
|
|
6
|
+
* Version: v2.0.5
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -13567,25 +13567,25 @@ function _assert_this_initialized(self) {
|
|
|
13567
13567
|
}
|
|
13568
13568
|
var _proto = PlayableGraph.prototype;
|
|
13569
13569
|
_proto.evaluate = function evaluate(dt) {
|
|
13570
|
-
// 初始化节点状态
|
|
13571
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(this.playables), _step; !(_step = _iterator()).done;){
|
|
13572
|
-
var playable = _step.value;
|
|
13573
|
-
this.updatePlayableTime(playable, dt);
|
|
13574
|
-
}
|
|
13575
13570
|
// 初始化输出节点状态
|
|
13576
|
-
for(var
|
|
13577
|
-
var playableOutput =
|
|
13571
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.playableOutputs), _step; !(_step = _iterator()).done;){
|
|
13572
|
+
var playableOutput = _step.value;
|
|
13578
13573
|
playableOutput.context.deltaTime = dt;
|
|
13579
13574
|
}
|
|
13580
13575
|
// 执行生命周期函数
|
|
13581
|
-
for(var
|
|
13582
|
-
var playableOutput1 =
|
|
13576
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.playableOutputs), _step1; !(_step1 = _iterator1()).done;){
|
|
13577
|
+
var playableOutput1 = _step1.value;
|
|
13583
13578
|
this.prepareFrameWithRoot(playableOutput1);
|
|
13584
13579
|
}
|
|
13585
|
-
for(var
|
|
13586
|
-
var playableOutput2 =
|
|
13580
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(this.playableOutputs), _step2; !(_step2 = _iterator2()).done;){
|
|
13581
|
+
var playableOutput2 = _step2.value;
|
|
13587
13582
|
this.processFrameWithRoot(playableOutput2);
|
|
13588
13583
|
}
|
|
13584
|
+
// 更新节点时间
|
|
13585
|
+
for(var _iterator3 = _create_for_of_iterator_helper_loose(this.playables), _step3; !(_step3 = _iterator3()).done;){
|
|
13586
|
+
var playable = _step3.value;
|
|
13587
|
+
this.updatePlayableTime(playable, dt);
|
|
13588
|
+
}
|
|
13589
13589
|
};
|
|
13590
13590
|
_proto.connect = function connect(source, sourceOutputPort, destination, destinationInputPort) {
|
|
13591
13591
|
destination.connectInput(destinationInputPort, source, sourceOutputPort);
|
|
@@ -13608,11 +13608,7 @@ function _assert_this_initialized(self) {
|
|
|
13608
13608
|
if (playable.getPlayState() !== 0) {
|
|
13609
13609
|
return;
|
|
13610
13610
|
}
|
|
13611
|
-
|
|
13612
|
-
playable.overrideTimeNextEvaluation = false;
|
|
13613
|
-
} else {
|
|
13614
|
-
playable.setTime(playable.getTime() + deltaTime);
|
|
13615
|
-
}
|
|
13611
|
+
playable.setTime(playable.getTime() + deltaTime);
|
|
13616
13612
|
};
|
|
13617
13613
|
return PlayableGraph;
|
|
13618
13614
|
}();
|
|
@@ -13624,7 +13620,6 @@ function _assert_this_initialized(self) {
|
|
|
13624
13620
|
if (inputCount === void 0) inputCount = 0;
|
|
13625
13621
|
this.onPlayablePlayFlag = true;
|
|
13626
13622
|
this.onPlayablePauseFlag = false;
|
|
13627
|
-
this.overrideTimeNextEvaluation = false;
|
|
13628
13623
|
this.destroyed = false;
|
|
13629
13624
|
this.inputs = [];
|
|
13630
13625
|
this.inputOuputPorts = [];
|
|
@@ -13710,7 +13705,6 @@ function _assert_this_initialized(self) {
|
|
|
13710
13705
|
};
|
|
13711
13706
|
_proto.setTime = function setTime(time) {
|
|
13712
13707
|
this.time = time;
|
|
13713
|
-
this.overrideTimeNextEvaluation = true;
|
|
13714
13708
|
};
|
|
13715
13709
|
_proto.getTime = function getTime() {
|
|
13716
13710
|
return this.time;
|
|
@@ -16821,7 +16815,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16821
16815
|
break;
|
|
16822
16816
|
}
|
|
16823
16817
|
var burst = bursts[j];
|
|
16824
|
-
var opts = burst.getGeneratorOptions(timePassed, lifetime);
|
|
16818
|
+
var opts = !burst.disabled && burst.getGeneratorOptions(timePassed, lifetime);
|
|
16825
16819
|
if (opts) {
|
|
16826
16820
|
var originVec = [
|
|
16827
16821
|
0,
|
|
@@ -16830,6 +16824,9 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16830
16824
|
];
|
|
16831
16825
|
var offsets = emission.burstOffsets[j];
|
|
16832
16826
|
var burstOffset = offsets && offsets[opts.cycleIndex] || originVec;
|
|
16827
|
+
if (burst.once) {
|
|
16828
|
+
this.removeBurst(j);
|
|
16829
|
+
}
|
|
16833
16830
|
for(var i1 = 0; i1 < opts.count && cursor < maxCount; i1++){
|
|
16834
16831
|
var _p_transform;
|
|
16835
16832
|
if (shouldSkipGenerate()) {
|
|
@@ -18923,7 +18920,7 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18923
18920
|
_proto.toLocalTime = function toLocalTime(time) {
|
|
18924
18921
|
var localTime = time - this.start;
|
|
18925
18922
|
var duration = this.duration;
|
|
18926
|
-
if (localTime - duration > 0
|
|
18923
|
+
if (localTime - duration > 0) {
|
|
18927
18924
|
if (this.endBehavior === EndBehavior.restart) {
|
|
18928
18925
|
localTime = localTime % duration;
|
|
18929
18926
|
} else if (this.endBehavior === EndBehavior.freeze) {
|
|
@@ -19052,7 +19049,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
19052
19049
|
var ended = false;
|
|
19053
19050
|
var started = false;
|
|
19054
19051
|
var boundObject = this.track.binding;
|
|
19055
|
-
if (localTime
|
|
19052
|
+
if (localTime >= clip.start + clip.duration && clip.endBehavior === EndBehavior.destroy) {
|
|
19056
19053
|
if (_instanceof1(boundObject, exports.VFXItem) && exports.VFXItem.isParticle(boundObject) && this.particleSystem && !this.particleSystem.destroyed) {
|
|
19057
19054
|
weight = 1.0;
|
|
19058
19055
|
} else {
|
|
@@ -27685,7 +27682,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
27685
27682
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
27686
27683
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
27687
27684
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
27688
|
-
var version = "2.0.
|
|
27685
|
+
var version = "2.0.5";
|
|
27689
27686
|
logger.info("Core version: " + version + ".");
|
|
27690
27687
|
|
|
27691
27688
|
exports.AbstractPlugin = AbstractPlugin;
|