@galacean/effects-core 2.1.5 → 2.2.0

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.
Files changed (32) hide show
  1. package/dist/index.js +457 -505
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +457 -506
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/math/value-getters/value-getter.d.ts +4 -0
  6. package/dist/plugins/cal/animation-stream.d.ts +1 -2
  7. package/dist/plugins/cal/playable-graph.d.ts +1 -30
  8. package/dist/plugins/text/text-layout.d.ts +1 -1
  9. package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +3 -3
  10. package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +3 -3
  11. package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +3 -3
  12. package/dist/plugins/timeline/playables/index.d.ts +6 -2
  13. package/dist/plugins/timeline/playables/particle-mixer-playable.d.ts +5 -0
  14. package/dist/plugins/timeline/playables/sprite-color-mixer-playable.d.ts +5 -0
  15. package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +3 -3
  16. package/dist/plugins/timeline/playables/track-mixer-playable.d.ts +12 -0
  17. package/dist/plugins/timeline/playables/transform-mixer-playable.d.ts +5 -0
  18. package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +3 -3
  19. package/dist/plugins/timeline/track.d.ts +7 -6
  20. package/dist/plugins/timeline/tracks/activation-track.d.ts +3 -2
  21. package/dist/plugins/timeline/tracks/color-property-track.d.ts +3 -2
  22. package/dist/plugins/timeline/tracks/float-property-track.d.ts +3 -2
  23. package/dist/plugins/timeline/tracks/index.d.ts +1 -0
  24. package/dist/plugins/timeline/tracks/particle-track.d.ts +6 -0
  25. package/dist/plugins/timeline/tracks/property-track.d.ts +1 -1
  26. package/dist/plugins/timeline/tracks/sprite-color-track.d.ts +3 -0
  27. package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +3 -2
  28. package/dist/plugins/timeline/tracks/transform-track.d.ts +3 -0
  29. package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +3 -2
  30. package/dist/scene.d.ts +12 -0
  31. package/dist/vfx-item.d.ts +1 -2
  32. 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.1.5
6
+ * Version: v2.2.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -63,12 +63,8 @@ function __generator(thisArg, body) {
63
63
  },
64
64
  trys: [],
65
65
  ops: []
66
- }, f, y, t, g;
67
- return g = {
68
- next: verb(0),
69
- "throw": verb(1),
70
- "return": verb(2)
71
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
66
+ }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
67
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
72
68
  return this;
73
69
  }), g;
74
70
  function verb(n) {
@@ -12756,8 +12752,8 @@ var BezierCurve = /*#__PURE__*/ function(ValueGetter) {
12756
12752
  return data;
12757
12753
  };
12758
12754
  _proto.getMaxTime = function getMaxTime() {
12759
- var keyTimeData = Object.keys(this.curveMap);
12760
- return Number(keyTimeData[keyTimeData.length - 1].split("&")[1]);
12755
+ var keyTimeData = this.keyTimeData;
12756
+ return this.curveMap[keyTimeData[keyTimeData.length - 1]].timeEnd;
12761
12757
  };
12762
12758
  return BezierCurve;
12763
12759
  }(ValueGetter);
@@ -12835,19 +12831,22 @@ var BezierCurvePath = /*#__PURE__*/ function(ValueGetter) {
12835
12831
  timeInterval: timeInterval,
12836
12832
  valueInterval: valueInterval,
12837
12833
  easingCurve: easingCurve,
12838
- pathCurve: pathCurve
12834
+ pathCurve: pathCurve,
12835
+ timeStart: Number(s.x),
12836
+ timeEnd: Number(e.x)
12839
12837
  };
12840
12838
  }
12839
+ this.keyTimeData = Object.keys(this.curveSegments);
12841
12840
  };
12842
12841
  _proto.getValue = function getValue(time) {
12843
12842
  var t = numberToFix(time, 5);
12844
12843
  var perc = 0, point = new Vector3();
12845
- var keyTimeData = Object.keys(this.curveSegments);
12844
+ var keyTimeData = this.keyTimeData;
12846
12845
  if (!keyTimeData.length) {
12847
12846
  return point;
12848
12847
  }
12849
- var keyTimeStart = Number(keyTimeData[0].split("&")[0]);
12850
- var keyTimeEnd = Number(keyTimeData[keyTimeData.length - 1].split("&")[1]);
12848
+ var keyTimeStart = this.curveSegments[keyTimeData[0]].timeStart;
12849
+ var keyTimeEnd = this.curveSegments[keyTimeData[keyTimeData.length - 1]].timeEnd;
12851
12850
  if (t <= keyTimeStart) {
12852
12851
  var pathCurve = this.curveSegments[keyTimeData[0]].pathCurve;
12853
12852
  point = pathCurve.getPointInPercent(0);
@@ -12859,7 +12858,8 @@ var BezierCurvePath = /*#__PURE__*/ function(ValueGetter) {
12859
12858
  return point;
12860
12859
  }
12861
12860
  for(var i = 0; i < keyTimeData.length; i++){
12862
- var _keyTimeData_i_split = keyTimeData[i].split("&"), xMin = _keyTimeData_i_split[0], xMax = _keyTimeData_i_split[1];
12861
+ var xMin = this.curveSegments[keyTimeData[i]].timeStart;
12862
+ var xMax = this.curveSegments[keyTimeData[i]].timeEnd;
12863
12863
  if (t >= Number(xMin) && t < Number(xMax)) {
12864
12864
  var bezierPath = this.curveSegments[keyTimeData[i]].pathCurve;
12865
12865
  perc = this.getPercValue(keyTimeData[i], t);
@@ -12878,8 +12878,8 @@ var BezierCurvePath = /*#__PURE__*/ function(ValueGetter) {
12878
12878
  return clamp$1(value, 0, 1);
12879
12879
  };
12880
12880
  _proto.getMaxTime = function getMaxTime() {
12881
- var keyTimeData = Object.keys(this.curveSegments);
12882
- return Number(keyTimeData[keyTimeData.length - 1].split("&")[1]);
12881
+ var keyTimeData = this.keyTimeData;
12882
+ return this.curveSegments[keyTimeData[keyTimeData.length - 1]].timeEnd;
12883
12883
  };
12884
12884
  return BezierCurvePath;
12885
12885
  }(ValueGetter);
@@ -13032,15 +13032,18 @@ function createKeyFrameMeta() {
13032
13032
  }
13033
13033
 
13034
13034
  function _is_native_reflect_construct() {
13035
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
13036
- if (Reflect.construct.sham) return false;
13037
- if (typeof Proxy === "function") return true;
13035
+ // Since Reflect.construct can't be properly polyfilled, some
13036
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
13037
+ // Those polyfills don't allow us to subclass built-ins, so we need to
13038
+ // use our fallback implementation.
13038
13039
  try {
13039
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
13040
- return true;
13041
- } catch (e) {
13042
- return false;
13043
- }
13040
+ // If the internal slots aren't set, this throws an error similar to
13041
+ // TypeError: this is not a Boolean object.
13042
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
13043
+ } catch (_) {}
13044
+ return (_is_native_reflect_construct = function _is_native_reflect_construct() {
13045
+ return !!result;
13046
+ })();
13044
13047
  }
13045
13048
 
13046
13049
  function _construct(Parent, args, Class) {
@@ -15904,6 +15907,7 @@ exports.ShapeComponent = /*#__PURE__*/ function(MeshComponent) {
15904
15907
  if (this.animated) {
15905
15908
  this.buildPath(this.data);
15906
15909
  this.buildGeometryFromPath(this.path.shapePath);
15910
+ this.animated = false;
15907
15911
  }
15908
15912
  };
15909
15913
  _proto.buildGeometryFromPath = function buildGeometryFromPath(shapePath) {
@@ -17011,14 +17015,10 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17011
17015
  var playableOutput2 = _step2.value;
17012
17016
  this.processFrameWithRoot(playableOutput2);
17013
17017
  }
17014
- // 更新节点时间
17015
- for(var _iterator3 = _create_for_of_iterator_helper_loose(this.playables), _step3; !(_step3 = _iterator3()).done;){
17016
- var playable = _step3.value;
17017
- this.updatePlayableTime(playable, dt / 1000);
17018
- }
17019
- };
17020
- _proto.connect = function connect(source, sourceOutputPort, destination, destinationInputPort) {
17021
- destination.connectInput(destinationInputPort, source, sourceOutputPort);
17018
+ // 更新节点时间
17019
+ // for (const playable of this.playables) {
17020
+ // this.updatePlayableTime(playable, dt / 1000);
17021
+ // }
17022
17022
  };
17023
17023
  _proto.addOutput = function addOutput(output) {
17024
17024
  this.playableOutputs.push(output);
@@ -17027,12 +17027,12 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17027
17027
  this.playables.push(playable);
17028
17028
  };
17029
17029
  _proto.processFrameWithRoot = function processFrameWithRoot(output) {
17030
- output.sourcePlayable.processFrameRecursive(output.context, output.getSourceOutputPort());
17030
+ output.sourcePlayable.processFrame(output.context);
17031
17031
  output.processFrame();
17032
17032
  };
17033
17033
  _proto.prepareFrameWithRoot = function prepareFrameWithRoot(output) {
17034
- output.sourcePlayable.prepareFrameRecursive(output.context, output.getSourceOutputPort());
17035
17034
  output.prepareFrame();
17035
+ output.sourcePlayable.prepareFrame(output.context);
17036
17036
  };
17037
17037
  _proto.updatePlayableTime = function updatePlayableTime(playable, deltaTime) {
17038
17038
  if (playable.getPlayState() !== 0) {
@@ -17047,24 +17047,15 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17047
17047
  * @since 2.0.0
17048
17048
  */ var Playable = /*#__PURE__*/ function() {
17049
17049
  function Playable(graph, inputCount) {
17050
- if (inputCount === void 0) inputCount = 0;
17051
17050
  this.onPlayablePlayFlag = true;
17052
17051
  this.onPlayablePauseFlag = false;
17053
17052
  this.duration = 0;
17054
17053
  this.destroyed = false;
17055
- this.inputs = [];
17056
- this.inputOuputPorts = [];
17057
- this.inputWeight = [];
17058
- this.outputs = [];
17059
17054
  this.playState = 0;
17060
- this.traversalMode = 0;
17061
17055
  /**
17062
17056
  * 当前本地播放的时间
17063
17057
  */ this.time = 0;
17064
17058
  graph.addPlayable(this);
17065
- this.inputs = new Array(inputCount);
17066
- this.inputOuputPorts = new Array(inputCount);
17067
- this.inputWeight = new Array(inputCount);
17068
17059
  }
17069
17060
  var _proto = Playable.prototype;
17070
17061
  _proto.play = function play() {
@@ -17087,56 +17078,6 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17087
17078
  break;
17088
17079
  }
17089
17080
  };
17090
- _proto.connectInput = function connectInput(inputPort, sourcePlayable, sourceOutputPort, weight) {
17091
- if (weight === void 0) weight = 1.0;
17092
- this.setInput(sourcePlayable, inputPort);
17093
- this.setInputWeight(inputPort, weight);
17094
- sourcePlayable.setOutput(this, sourceOutputPort);
17095
- if (this.inputOuputPorts.length < inputPort + 1) {
17096
- this.inputOuputPorts.length = inputPort + 1;
17097
- }
17098
- this.inputOuputPorts[inputPort] = sourceOutputPort;
17099
- };
17100
- _proto.addInput = function addInput(sourcePlayable, sourceOutputPort, weight) {
17101
- if (weight === void 0) weight = 1.0;
17102
- this.connectInput(this.getInputCount(), sourcePlayable, sourceOutputPort, weight);
17103
- };
17104
- _proto.getInputCount = function getInputCount() {
17105
- return this.inputs.length;
17106
- };
17107
- _proto.getInputs = function getInputs() {
17108
- return this.inputs;
17109
- };
17110
- _proto.getInput = function getInput(index) {
17111
- return this.inputs[index];
17112
- };
17113
- _proto.getOutputCount = function getOutputCount() {
17114
- return this.outputs.length;
17115
- };
17116
- _proto.getOutputs = function getOutputs() {
17117
- return this.outputs;
17118
- };
17119
- _proto.getOutput = function getOutput(index) {
17120
- return this.outputs[index];
17121
- };
17122
- _proto.getInputWeight = function getInputWeight(inputIndex) {
17123
- return this.inputWeight[inputIndex];
17124
- };
17125
- _proto.setInputWeight = function setInputWeight(playableOrIndex, weight) {
17126
- if (_instanceof1(playableOrIndex, Playable)) {
17127
- for(var i = 0; i < this.inputs.length; i++){
17128
- if (this.inputs[i] === playableOrIndex) {
17129
- this.inputWeight[i] = weight;
17130
- return;
17131
- }
17132
- }
17133
- } else {
17134
- if (this.inputWeight.length < playableOrIndex + 1) {
17135
- this.inputWeight.length = playableOrIndex + 1;
17136
- }
17137
- this.inputWeight[playableOrIndex] = weight;
17138
- }
17139
- };
17140
17081
  _proto.setTime = function setTime(time) {
17141
17082
  this.time = time;
17142
17083
  };
@@ -17152,18 +17093,14 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17152
17093
  _proto.getPlayState = function getPlayState() {
17153
17094
  return this.playState;
17154
17095
  };
17155
- _proto.setTraversalMode = function setTraversalMode(mode) {
17156
- this.traversalMode = mode;
17157
- };
17158
- _proto.getTraversalMode = function getTraversalMode() {
17159
- return this.traversalMode;
17160
- };
17161
17096
  // onGraphStart () {
17162
17097
  // }
17163
17098
  // onGraphStop () {
17164
17099
  // }
17165
- _proto.onPlayablePlay = function onPlayablePlay(context) {};
17166
- _proto.onPlayablePause = function onPlayablePause(context) {};
17100
+ // onPlayablePlay (context: FrameContext) {
17101
+ // }
17102
+ // onPlayablePause (context: FrameContext) {
17103
+ // }
17167
17104
  _proto.prepareFrame = function prepareFrame(context) {};
17168
17105
  _proto.processFrame = function processFrame(context) {};
17169
17106
  _proto.onPlayableDestroy = function onPlayableDestroy() {};
@@ -17175,76 +17112,6 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17175
17112
  // TODO 将节点从动画图中移除
17176
17113
  this.destroyed = true;
17177
17114
  };
17178
- /**
17179
- * @internal
17180
- */ _proto.prepareFrameRecursive = function prepareFrameRecursive(context, passthroughPort) {
17181
- if (this.destroyed || this.playState !== 0) {
17182
- return;
17183
- }
17184
- if (this.onPlayablePlayFlag) {
17185
- this.onPlayablePlay(context);
17186
- this.onPlayablePlayFlag = false;
17187
- }
17188
- if (this.onPlayablePauseFlag) {
17189
- this.onPlayablePause(context);
17190
- this.onPlayablePauseFlag = false;
17191
- }
17192
- if (passthroughPort === 0) {
17193
- this.prepareFrame(context);
17194
- }
17195
- // 前序遍历,用于设置节点的初始状态,weight etc.
17196
- switch(this.getTraversalMode()){
17197
- case 0:
17198
- for(var i = 0; i < this.getInputCount(); i++){
17199
- var input = this.getInput(i);
17200
- input.prepareFrameRecursive(context, this.inputOuputPorts[i]);
17201
- }
17202
- break;
17203
- case 1:
17204
- {
17205
- var input1 = this.getInput(passthroughPort);
17206
- input1.prepareFrameRecursive(context, this.inputOuputPorts[passthroughPort]);
17207
- break;
17208
- }
17209
- }
17210
- };
17211
- /**
17212
- * @internal
17213
- */ _proto.processFrameRecursive = function processFrameRecursive(context, passthroughPort) {
17214
- if (this.destroyed || this.playState !== 0) {
17215
- return;
17216
- }
17217
- // 后序遍历,保证 playable 拿到的 input 节点的估计数据是最新的
17218
- switch(this.getTraversalMode()){
17219
- case 0:
17220
- {
17221
- for(var i = 0; i < this.getInputCount(); i++){
17222
- var input = this.getInput(i);
17223
- input.processFrameRecursive(context, this.inputOuputPorts[i]);
17224
- }
17225
- break;
17226
- }
17227
- case 1:
17228
- {
17229
- var input1 = this.getInput(passthroughPort);
17230
- input1.processFrameRecursive(context, this.inputOuputPorts[passthroughPort]);
17231
- break;
17232
- }
17233
- }
17234
- this.processFrame(context);
17235
- };
17236
- _proto.setOutput = function setOutput(outputPlayable, outputPort) {
17237
- if (this.outputs.length < outputPort + 1) {
17238
- this.outputs.length = outputPort + 1;
17239
- }
17240
- this.outputs[outputPort] = outputPlayable;
17241
- };
17242
- _proto.setInput = function setInput(inputPlayable, inputPort) {
17243
- if (this.inputs.length < inputPort + 1) {
17244
- this.inputs.length = inputPort + 1;
17245
- }
17246
- this.inputs[inputPort] = inputPlayable;
17247
- };
17248
17115
  return Playable;
17249
17116
  }();
17250
17117
  /**
@@ -17252,20 +17119,14 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
17252
17119
  * @since 2.0.0
17253
17120
  */ var PlayableOutput = /*#__PURE__*/ function() {
17254
17121
  function PlayableOutput() {
17255
- this.sourceOutputPort = 0;
17256
17122
  this.context = {
17257
17123
  deltaTime: 0,
17258
17124
  output: this
17259
17125
  };
17260
17126
  }
17261
17127
  var _proto = PlayableOutput.prototype;
17262
- _proto.setSourcePlayable = function setSourcePlayable(playable, port) {
17263
- if (port === void 0) port = 0;
17128
+ _proto.setSourcePlayable = function setSourcePlayable(playable) {
17264
17129
  this.sourcePlayable = playable;
17265
- this.sourceOutputPort = port;
17266
- };
17267
- _proto.getSourceOutputPort = function getSourceOutputPort() {
17268
- return this.sourceOutputPort;
17269
17130
  };
17270
17131
  _proto.setUserData = function setUserData(value) {
17271
17132
  this.userData = value;
@@ -17291,11 +17152,6 @@ var PlayState;
17291
17152
  PlayState[PlayState["Playing"] = 0] = "Playing";
17292
17153
  PlayState[PlayState["Paused"] = 1] = "Paused";
17293
17154
  })(PlayState || (PlayState = {}));
17294
- var PlayableTraversalMode;
17295
- (function(PlayableTraversalMode) {
17296
- PlayableTraversalMode[PlayableTraversalMode["Mix"] = 0] = "Mix";
17297
- PlayableTraversalMode[PlayableTraversalMode["Passthrough"] = 1] = "Passthrough";
17298
- })(PlayableTraversalMode || (PlayableTraversalMode = {}));
17299
17155
 
17300
17156
  var tempQuat$1 = new Quaternion();
17301
17157
  var seed$3 = 1;
@@ -17948,7 +17804,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
17948
17804
  };
17949
17805
  /**
17950
17806
  * 添加组件
17951
- * @param classConstructor - 要添加的组件类型
17807
+ * @param classConstructor - 要添加的组件
17952
17808
  */ _proto.addComponent = function addComponent(classConstructor) {
17953
17809
  var newComponent = new classConstructor(this.engine);
17954
17810
  this.components.push(newComponent);
@@ -18191,7 +18047,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
18191
18047
  };
18192
18048
  _proto.fromData = function fromData(data) {
18193
18049
  EffectsObject.prototype.fromData.call(this, data);
18194
- var id = data.id, name = data.name, delay = data.delay, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_listIndex = data.listIndex, listIndex = _data_listIndex === void 0 ? 0 : _data_listIndex, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration;
18050
+ var id = data.id, name = data.name, delay = data.delay, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration;
18195
18051
  this.props = data;
18196
18052
  //@ts-expect-error
18197
18053
  this.type = data.type;
@@ -18253,8 +18109,6 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
18253
18109
  this.rendererComponents.push(component.renderer);
18254
18110
  }
18255
18111
  }
18256
- // renderOrder 在 component 初始化后设置。确保能拿到 rendererComponent。
18257
- this.renderOrder = listIndex;
18258
18112
  };
18259
18113
  _proto.toData = function toData() {
18260
18114
  var _this_parent;
@@ -22800,12 +22654,6 @@ var AnimationStream = /*#__PURE__*/ function() {
22800
22654
  _proto.findCurveValue = function findCurveValue(componentType, propertyName) {
22801
22655
  return this.curveValues[componentType + propertyName];
22802
22656
  };
22803
- _proto.getInputStream = function getInputStream(index) {
22804
- var inputPlayable = this.playable.getInput(index);
22805
- if (_instanceof1(inputPlayable, AnimationPlayable)) {
22806
- return inputPlayable.animationStream;
22807
- }
22808
- };
22809
22657
  return AnimationStream;
22810
22658
  }();
22811
22659
 
@@ -23140,266 +22988,147 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
23140
22988
  return AnimationClipPlayable;
23141
22989
  }(Playable);
23142
22990
 
23143
- /**
23144
- * @since 2.0.0
23145
- */ var TimelineClip = /*#__PURE__*/ function() {
23146
- function TimelineClip() {
23147
- this.start = 0;
23148
- this.duration = 0;
23149
- }
23150
- var _proto = TimelineClip.prototype;
23151
- _proto.toLocalTime = function toLocalTime(time) {
23152
- var localTime = time - this.start;
23153
- var duration = this.duration;
23154
- if (localTime - duration > 0) {
23155
- if (this.endBehavior === EndBehavior.restart) {
23156
- localTime = localTime % duration;
23157
- } else if (this.endBehavior === EndBehavior.freeze) {
23158
- localTime = Math.min(duration, localTime);
23159
- }
23160
- }
23161
- return localTime;
23162
- };
23163
- return TimelineClip;
23164
- }();
23165
- exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
23166
- _inherits(TrackAsset, PlayableAsset);
23167
- function TrackAsset() {
22991
+ var TrackMixerPlayable = /*#__PURE__*/ function(Playable1) {
22992
+ _inherits(TrackMixerPlayable, Playable1);
22993
+ function TrackMixerPlayable() {
23168
22994
  var _this;
23169
- _this = PlayableAsset.apply(this, arguments) || this;
23170
- _this.trackType = 0;
23171
- _this.clipSeed = 0;
23172
- _this.clips = [];
23173
- _this.children = [];
22995
+ _this = Playable1.apply(this, arguments) || this;
22996
+ _this.clipPlayables = [];
22997
+ _this.clipWeights = [];
23174
22998
  return _this;
23175
22999
  }
23176
- var _proto = TrackAsset.prototype;
23177
- /**
23178
- * 重写该方法以获取自定义对象绑定
23179
- */ _proto.updateAnimatedObject = function updateAnimatedObject() {
23180
- if (this.parent) {
23181
- this.boundObject = this.parent.boundObject;
23182
- }
23183
- };
23184
- /**
23185
- * 重写该方法以创建自定义混合器
23186
- */ _proto.createTrackMixer = function createTrackMixer(graph) {
23187
- return new Playable(graph);
23188
- };
23189
- _proto.createOutput = function createOutput() {
23190
- var output = new PlayableOutput();
23191
- return output;
23192
- };
23193
- _proto.createPlayableGraph = function createPlayableGraph(graph, runtimeClips) {
23194
- var mixerPlayable = this.createMixerPlayableGraph(graph, runtimeClips);
23195
- return mixerPlayable;
23196
- };
23197
- _proto.createMixerPlayableGraph = function createMixerPlayableGraph(graph, runtimeClips) {
23198
- var clips = [];
23199
- for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
23200
- var clip = _step.value;
23201
- clips.push(clip);
23000
+ var _proto = TrackMixerPlayable.prototype;
23001
+ _proto.processFrame = function processFrame(context) {
23002
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.clipPlayables), _step; !(_step = _iterator()).done;){
23003
+ var clipPlayable = _step.value;
23004
+ clipPlayable.processFrame(context);
23202
23005
  }
23203
- var mixerPlayable = this.compileClips(graph, clips, runtimeClips);
23204
- return mixerPlayable;
23006
+ this.evaluate(context);
23205
23007
  };
23206
- _proto.compileClips = function compileClips(graph, timelineClips, runtimeClips) {
23207
- var mixer = this.createTrackMixer(graph);
23208
- for(var _iterator = _create_for_of_iterator_helper_loose(timelineClips), _step; !(_step = _iterator()).done;){
23209
- var timelineClip = _step.value;
23210
- var clipPlayable = this.createClipPlayable(graph, timelineClip);
23211
- clipPlayable.setDuration(timelineClip.duration);
23212
- var clip = new RuntimeClip(timelineClip, clipPlayable, mixer, this);
23213
- runtimeClips.push(clip);
23214
- mixer.addInput(clipPlayable, 0);
23215
- mixer.setInputWeight(clipPlayable, 0.0);
23008
+ _proto.setClipWeight = function setClipWeight(playableOrIndex, weight) {
23009
+ if (_instanceof1(playableOrIndex, Playable)) {
23010
+ for(var i = 0; i < this.clipPlayables.length; i++){
23011
+ if (this.clipPlayables[i] === playableOrIndex) {
23012
+ this.clipWeights[i] = weight;
23013
+ return;
23014
+ }
23015
+ }
23016
+ } else {
23017
+ if (this.clipWeights.length < playableOrIndex + 1) {
23018
+ this.clipWeights.length = playableOrIndex + 1;
23019
+ }
23020
+ this.clipWeights[playableOrIndex] = weight;
23216
23021
  }
23217
- return mixer;
23218
- };
23219
- _proto.createPlayable = function createPlayable(graph) {
23220
- return new Playable(graph);
23221
- };
23222
- _proto.getChildTracks = function getChildTracks() {
23223
- return this.children;
23224
23022
  };
23225
- _proto.addChild = function addChild(child) {
23226
- this.children.push(child);
23227
- child.parent = this;
23023
+ _proto.getClipWeight = function getClipWeight(inputIndex) {
23024
+ return this.clipWeights[inputIndex];
23228
23025
  };
23229
- _proto.createClip = function createClip(classConstructor, name) {
23230
- var newClip = new TimelineClip();
23231
- newClip.asset = new classConstructor(this.engine);
23232
- newClip.name = name ? name : "TimelineClip" + newClip.id;
23233
- this.addClip(newClip);
23234
- return newClip;
23026
+ _proto.getClipPlayable = function getClipPlayable(index) {
23027
+ return this.clipPlayables[index];
23235
23028
  };
23236
- _proto.getClips = function getClips() {
23237
- return this.clips;
23029
+ _proto.evaluate = function evaluate(context) {
23030
+ // Override
23238
23031
  };
23239
- _proto.findClip = function findClip(name) {
23240
- for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
23241
- var clip = _step.value;
23242
- if (clip.name === name) {
23243
- return clip;
23032
+ return TrackMixerPlayable;
23033
+ }(Playable);
23034
+
23035
+ var ActivationMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23036
+ _inherits(ActivationMixerPlayable, TrackMixerPlayable);
23037
+ function ActivationMixerPlayable() {
23038
+ return TrackMixerPlayable.apply(this, arguments);
23039
+ }
23040
+ var _proto = ActivationMixerPlayable.prototype;
23041
+ _proto.evaluate = function evaluate(context) {
23042
+ var boundObject = context.output.getUserData();
23043
+ if (!_instanceof1(boundObject, exports.VFXItem)) {
23044
+ return;
23045
+ }
23046
+ var boundItem = boundObject;
23047
+ var hasInput = false;
23048
+ for(var i = 0; i < this.clipPlayables.length; i++){
23049
+ if (this.getClipWeight(i) > 0) {
23050
+ hasInput = true;
23051
+ break;
23244
23052
  }
23245
23053
  }
23054
+ if (hasInput) {
23055
+ boundItem.transform.setValid(true);
23056
+ boundItem.setActive(true);
23057
+ } else {
23058
+ boundItem.transform.setValid(false);
23059
+ boundItem.setActive(false);
23060
+ }
23246
23061
  };
23247
- _proto.addClip = function addClip(clip) {
23248
- clip.id = (this.clipSeed++).toString();
23249
- this.clips.push(clip);
23250
- };
23251
- _proto.createClipPlayable = function createClipPlayable(graph, clip) {
23252
- return clip.asset.createPlayable(graph);
23062
+ return ActivationMixerPlayable;
23063
+ }(TrackMixerPlayable);
23064
+
23065
+ var PropertyClipPlayable = /*#__PURE__*/ function(Playable) {
23066
+ _inherits(PropertyClipPlayable, Playable);
23067
+ function PropertyClipPlayable() {
23068
+ return Playable.apply(this, arguments);
23069
+ }
23070
+ var _proto = PropertyClipPlayable.prototype;
23071
+ _proto.processFrame = function processFrame(context) {
23072
+ this.value = this.curve.getValue(this.time / this.getDuration());
23253
23073
  };
23254
- _proto.fromData = function fromData(data) {
23255
- PlayableAsset.prototype.fromData.call(this, data);
23256
- for(var _iterator = _create_for_of_iterator_helper_loose(this.children), _step; !(_step = _iterator()).done;){
23257
- var child = _step.value;
23258
- child.parent = this;
23074
+ return PropertyClipPlayable;
23075
+ }(Playable);
23076
+
23077
+ var ColorPropertyMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23078
+ _inherits(ColorPropertyMixerPlayable, TrackMixerPlayable);
23079
+ function ColorPropertyMixerPlayable() {
23080
+ var _this;
23081
+ _this = TrackMixerPlayable.apply(this, arguments) || this;
23082
+ _this.propertyName = "";
23083
+ return _this;
23084
+ }
23085
+ var _proto = ColorPropertyMixerPlayable.prototype;
23086
+ _proto.evaluate = function evaluate(context) {
23087
+ var boundObject = context.output.getUserData();
23088
+ if (!boundObject) {
23089
+ return;
23090
+ }
23091
+ var hasInput = false;
23092
+ var value = boundObject[this.propertyName];
23093
+ if (!_instanceof1(value, Color)) {
23094
+ return;
23095
+ }
23096
+ value.setZero();
23097
+ // evaluate the curve
23098
+ for(var i = 0; i < this.clipPlayables.length; i++){
23099
+ var weight = this.getClipWeight(i);
23100
+ if (weight > 0) {
23101
+ var propertyClipPlayable = this.getClipPlayable(i);
23102
+ if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
23103
+ console.error("ColorPropertyMixerPlayable received incompatible input");
23104
+ continue;
23105
+ }
23106
+ var curveValue = propertyClipPlayable.value;
23107
+ value.r += curveValue.r * weight;
23108
+ value.g += curveValue.g * weight;
23109
+ value.b += curveValue.b * weight;
23110
+ value.a += curveValue.a * weight;
23111
+ hasInput = true;
23112
+ }
23113
+ }
23114
+ // set value
23115
+ if (hasInput) {
23116
+ boundObject[this.propertyName] = value;
23259
23117
  }
23260
23118
  };
23261
- return TrackAsset;
23262
- }(PlayableAsset);
23263
- __decorate([
23264
- serialize(TimelineClip)
23265
- ], exports.TrackAsset.prototype, "clips", void 0);
23266
- __decorate([
23267
- serialize()
23268
- ], exports.TrackAsset.prototype, "children", void 0);
23269
- exports.TrackAsset = __decorate([
23270
- effectsClass(DataType.TrackAsset)
23271
- ], exports.TrackAsset);
23272
- exports.TrackType = void 0;
23273
- (function(TrackType) {
23274
- TrackType[TrackType["MasterTrack"] = 0] = "MasterTrack";
23275
- TrackType[TrackType["ObjectTrack"] = 1] = "ObjectTrack";
23276
- })(exports.TrackType || (exports.TrackType = {}));
23277
- var RuntimeClip = /*#__PURE__*/ function() {
23278
- function RuntimeClip(clip, clipPlayable, parentMixer, track) {
23279
- this.clip = clip;
23280
- this.playable = clipPlayable;
23281
- this.parentMixer = parentMixer;
23282
- this.track = track;
23283
- if (_instanceof1(this.track.boundObject, exports.VFXItem)) {
23284
- this.particleSystem = this.track.boundObject.getComponent(exports.ParticleSystem);
23285
- }
23286
- }
23287
- var _proto = RuntimeClip.prototype;
23288
- _proto.evaluateAt = function evaluateAt(localTime) {
23289
- var clip = this.clip;
23290
- var weight = 1.0;
23291
- var ended = false;
23292
- var started = false;
23293
- var boundObject = this.track.boundObject;
23294
- if (localTime >= clip.start + clip.duration && clip.endBehavior === EndBehavior.destroy) {
23295
- if (_instanceof1(boundObject, exports.VFXItem) && exports.VFXItem.isParticle(boundObject) && this.particleSystem && !this.particleSystem.destroyed) {
23296
- weight = 1.0;
23297
- } else {
23298
- weight = 0.0;
23299
- ended = true;
23300
- }
23301
- } else if (localTime - this.clip.start >= 0) {
23302
- weight = 1.0;
23303
- started = true;
23304
- } else if (localTime < clip.start) {
23305
- weight = 0.0;
23306
- }
23307
- if (started && this.playable.getPlayState() !== PlayState.Playing) {
23308
- this.playable.play();
23309
- }
23310
- this.parentMixer.setInputWeight(this.playable, weight);
23311
- var clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));
23312
- this.playable.setTime(clipTime);
23313
- // 判断动画是否结束
23314
- if (ended) {
23315
- if (this.playable.getPlayState() === PlayState.Playing) {
23316
- this.playable.pause();
23317
- }
23318
- }
23319
- };
23320
- _create_class(RuntimeClip, [
23321
- {
23322
- key: "enable",
23323
- set: function set(value) {
23324
- if (value) {
23325
- this.playable.play();
23326
- } else {
23327
- this.parentMixer.setInputWeight(this.playable, 0);
23328
- this.playable.pause();
23329
- }
23330
- }
23331
- }
23332
- ]);
23333
- return RuntimeClip;
23334
- }();
23335
-
23336
- var ActivationMixerPlayable = /*#__PURE__*/ function(Playable) {
23337
- _inherits(ActivationMixerPlayable, Playable);
23338
- function ActivationMixerPlayable() {
23339
- return Playable.apply(this, arguments);
23340
- }
23341
- var _proto = ActivationMixerPlayable.prototype;
23342
- _proto.processFrame = function processFrame(context) {
23343
- var boundObject = context.output.getUserData();
23344
- if (!_instanceof1(boundObject, exports.VFXItem)) {
23345
- return;
23346
- }
23347
- var boundItem = boundObject;
23348
- var hasInput = false;
23349
- for(var i = 0; i < this.getInputCount(); i++){
23350
- if (this.getInputWeight(i) > 0) {
23351
- hasInput = true;
23352
- break;
23353
- }
23354
- }
23355
- if (hasInput) {
23356
- boundItem.transform.setValid(true);
23357
- boundItem.setActive(true);
23358
- } else {
23359
- boundItem.transform.setValid(false);
23360
- boundItem.setActive(false);
23361
- }
23362
- };
23363
- return ActivationMixerPlayable;
23364
- }(Playable);
23365
-
23366
- exports.ActivationTrack = /*#__PURE__*/ function(TrackAsset) {
23367
- _inherits(ActivationTrack, TrackAsset);
23368
- function ActivationTrack() {
23369
- return TrackAsset.apply(this, arguments);
23370
- }
23371
- var _proto = ActivationTrack.prototype;
23372
- _proto.createTrackMixer = function createTrackMixer(graph) {
23373
- return new ActivationMixerPlayable(graph);
23374
- };
23375
- return ActivationTrack;
23376
- }(exports.TrackAsset);
23377
- exports.ActivationTrack = __decorate([
23378
- effectsClass(DataType.ActivationTrack)
23379
- ], exports.ActivationTrack);
23380
-
23381
- var PropertyClipPlayable = /*#__PURE__*/ function(Playable) {
23382
- _inherits(PropertyClipPlayable, Playable);
23383
- function PropertyClipPlayable() {
23384
- return Playable.apply(this, arguments);
23385
- }
23386
- var _proto = PropertyClipPlayable.prototype;
23387
- _proto.processFrame = function processFrame(context) {
23388
- this.value = this.curve.getValue(this.time / this.getDuration());
23389
- };
23390
- return PropertyClipPlayable;
23391
- }(Playable);
23119
+ return ColorPropertyMixerPlayable;
23120
+ }(TrackMixerPlayable);
23392
23121
 
23393
- var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
23394
- _inherits(FloatPropertyMixerPlayable, Playable);
23122
+ var FloatPropertyMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23123
+ _inherits(FloatPropertyMixerPlayable, TrackMixerPlayable);
23395
23124
  function FloatPropertyMixerPlayable() {
23396
23125
  var _this;
23397
- _this = Playable.apply(this, arguments) || this;
23126
+ _this = TrackMixerPlayable.apply(this, arguments) || this;
23398
23127
  _this.propertyName = "";
23399
23128
  return _this;
23400
23129
  }
23401
23130
  var _proto = FloatPropertyMixerPlayable.prototype;
23402
- _proto.processFrame = function processFrame(context) {
23131
+ _proto.evaluate = function evaluate(context) {
23403
23132
  var boundObject = context.output.getUserData();
23404
23133
  if (!boundObject) {
23405
23134
  return;
@@ -23407,10 +23136,10 @@ var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
23407
23136
  var hasInput = false;
23408
23137
  var value = 0;
23409
23138
  // evaluate the curve
23410
- for(var i = 0; i < this.getInputCount(); i++){
23411
- var weight = this.getInputWeight(i);
23139
+ for(var i = 0; i < this.clipPlayables.length; i++){
23140
+ var weight = this.getClipWeight(i);
23412
23141
  if (weight > 0) {
23413
- var propertyClipPlayable = this.getInput(i);
23142
+ var propertyClipPlayable = this.getClipPlayable(i);
23414
23143
  if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
23415
23144
  console.error("FloatPropertyTrack added non-FloatPropertyPlayableAsset");
23416
23145
  continue;
@@ -23426,7 +23155,27 @@ var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
23426
23155
  }
23427
23156
  };
23428
23157
  return FloatPropertyMixerPlayable;
23429
- }(Playable);
23158
+ }(TrackMixerPlayable);
23159
+
23160
+ var ParticleMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23161
+ _inherits(ParticleMixerPlayable, TrackMixerPlayable);
23162
+ function ParticleMixerPlayable() {
23163
+ return TrackMixerPlayable.apply(this, arguments);
23164
+ }
23165
+ var _proto = ParticleMixerPlayable.prototype;
23166
+ _proto.evaluate = function evaluate(context) {};
23167
+ return ParticleMixerPlayable;
23168
+ }(TrackMixerPlayable);
23169
+
23170
+ var SpriteColorMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23171
+ _inherits(SpriteColorMixerPlayable, TrackMixerPlayable);
23172
+ function SpriteColorMixerPlayable() {
23173
+ return TrackMixerPlayable.apply(this, arguments);
23174
+ }
23175
+ var _proto = SpriteColorMixerPlayable.prototype;
23176
+ _proto.evaluate = function evaluate(context) {};
23177
+ return SpriteColorMixerPlayable;
23178
+ }(TrackMixerPlayable);
23430
23179
 
23431
23180
  var SerializationHelper = /*#__PURE__*/ function() {
23432
23181
  function SerializationHelper() {}
@@ -23918,7 +23667,8 @@ var SerializationHelper = /*#__PURE__*/ function() {
23918
23667
  this.timelinePlayable.setTime(time);
23919
23668
  // The properties of the object may change dynamically,
23920
23669
  // so reset the track binding to avoid invalidation of the previously obtained binding object.
23921
- this.resolveBindings();
23670
+ // this.resolveBindings();
23671
+ this.timelinePlayable.evaluate();
23922
23672
  this.graph.evaluate(dt);
23923
23673
  };
23924
23674
  _proto.createContent = function createContent() {
@@ -24051,6 +23801,20 @@ var SerializationHelper = /*#__PURE__*/ function() {
24051
23801
  }
24052
23802
  return regions;
24053
23803
  };
23804
+ /**
23805
+ * 设置当前合成子元素的渲染顺序
23806
+ * @internal
23807
+ */ _proto.setChildrenRenderOrder = function setChildrenRenderOrder(startOrder) {
23808
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
23809
+ var item = _step.value;
23810
+ item.renderOrder = startOrder++;
23811
+ var subCompositionComponent = item.getComponent(CompositionComponent);
23812
+ if (subCompositionComponent) {
23813
+ startOrder = subCompositionComponent.setChildrenRenderOrder(startOrder);
23814
+ }
23815
+ }
23816
+ return startOrder;
23817
+ };
24054
23818
  _proto.fromData = function fromData(data) {
24055
23819
  Behaviour.prototype.fromData.call(this, data);
24056
23820
  this.items = data.items;
@@ -24097,21 +23861,21 @@ var SubCompositionClipPlayable = /*#__PURE__*/ function(Playable) {
24097
23861
  return SubCompositionClipPlayable;
24098
23862
  }(Playable);
24099
23863
 
24100
- var SubCompositionMixerPlayable = /*#__PURE__*/ function(Playable) {
24101
- _inherits(SubCompositionMixerPlayable, Playable);
23864
+ var SubCompositionMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23865
+ _inherits(SubCompositionMixerPlayable, TrackMixerPlayable);
24102
23866
  function SubCompositionMixerPlayable() {
24103
- return Playable.apply(this, arguments);
23867
+ return TrackMixerPlayable.apply(this, arguments);
24104
23868
  }
24105
23869
  var _proto = SubCompositionMixerPlayable.prototype;
24106
- _proto.processFrame = function processFrame(context) {
23870
+ _proto.evaluate = function evaluate(context) {
24107
23871
  var boundObject = context.output.getUserData();
24108
23872
  if (!_instanceof1(boundObject, CompositionComponent)) {
24109
23873
  return;
24110
23874
  }
24111
23875
  var compositionComponent = boundObject;
24112
23876
  var hasInput = false;
24113
- for(var i = 0; i < this.getInputCount(); i++){
24114
- if (this.getInputWeight(i) > 0) {
23877
+ for(var i = 0; i < this.clipPlayables.length; i++){
23878
+ if (this.getClipWeight(i) > 0) {
24115
23879
  hasInput = true;
24116
23880
  break;
24117
23881
  }
@@ -24123,18 +23887,28 @@ var SubCompositionMixerPlayable = /*#__PURE__*/ function(Playable) {
24123
23887
  }
24124
23888
  };
24125
23889
  return SubCompositionMixerPlayable;
24126
- }(Playable);
23890
+ }(TrackMixerPlayable);
23891
+
23892
+ var TransformMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23893
+ _inherits(TransformMixerPlayable, TrackMixerPlayable);
23894
+ function TransformMixerPlayable() {
23895
+ return TrackMixerPlayable.apply(this, arguments);
23896
+ }
23897
+ var _proto = TransformMixerPlayable.prototype;
23898
+ _proto.evaluate = function evaluate(context) {};
23899
+ return TransformMixerPlayable;
23900
+ }(TrackMixerPlayable);
24127
23901
 
24128
- var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
24129
- _inherits(Vector4PropertyMixerPlayable, Playable);
23902
+ var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(TrackMixerPlayable) {
23903
+ _inherits(Vector4PropertyMixerPlayable, TrackMixerPlayable);
24130
23904
  function Vector4PropertyMixerPlayable() {
24131
23905
  var _this;
24132
- _this = Playable.apply(this, arguments) || this;
23906
+ _this = TrackMixerPlayable.apply(this, arguments) || this;
24133
23907
  _this.propertyName = "";
24134
23908
  return _this;
24135
23909
  }
24136
23910
  var _proto = Vector4PropertyMixerPlayable.prototype;
24137
- _proto.processFrame = function processFrame(context) {
23911
+ _proto.evaluate = function evaluate(context) {
24138
23912
  var boundObject = context.output.getUserData();
24139
23913
  if (!boundObject) {
24140
23914
  return;
@@ -24146,10 +23920,10 @@ var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
24146
23920
  }
24147
23921
  value.setZero();
24148
23922
  // evaluate the curve
24149
- for(var i = 0; i < this.getInputCount(); i++){
24150
- var weight = this.getInputWeight(i);
23923
+ for(var i = 0; i < this.clipPlayables.length; i++){
23924
+ var weight = this.getClipWeight(i);
24151
23925
  if (weight > 0) {
24152
- var propertyClipPlayable = this.getInput(i);
23926
+ var propertyClipPlayable = this.getClipPlayable(i);
24153
23927
  if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
24154
23928
  console.error("Vector4PropertyTrack added non-Vector4PropertyPlayableAsset");
24155
23929
  continue;
@@ -24168,52 +23942,215 @@ var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
24168
23942
  }
24169
23943
  };
24170
23944
  return Vector4PropertyMixerPlayable;
24171
- }(Playable);
23945
+ }(TrackMixerPlayable);
24172
23946
 
24173
- var ColorPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
24174
- _inherits(ColorPropertyMixerPlayable, Playable);
24175
- function ColorPropertyMixerPlayable() {
23947
+ /**
23948
+ * @since 2.0.0
23949
+ */ var TimelineClip = /*#__PURE__*/ function() {
23950
+ function TimelineClip() {
23951
+ this.start = 0;
23952
+ this.duration = 0;
23953
+ }
23954
+ var _proto = TimelineClip.prototype;
23955
+ _proto.toLocalTime = function toLocalTime(time) {
23956
+ var localTime = time - this.start;
23957
+ var duration = this.duration;
23958
+ if (localTime - duration > 0) {
23959
+ if (this.endBehavior === EndBehavior.restart) {
23960
+ localTime = localTime % duration;
23961
+ } else if (this.endBehavior === EndBehavior.freeze) {
23962
+ localTime = Math.min(duration, localTime);
23963
+ }
23964
+ }
23965
+ return localTime;
23966
+ };
23967
+ return TimelineClip;
23968
+ }();
23969
+ exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
23970
+ _inherits(TrackAsset, PlayableAsset);
23971
+ function TrackAsset() {
24176
23972
  var _this;
24177
- _this = Playable.apply(this, arguments) || this;
24178
- _this.propertyName = "";
23973
+ _this = PlayableAsset.apply(this, arguments) || this;
23974
+ _this.trackType = 0;
23975
+ _this.clipSeed = 0;
23976
+ _this.clips = [];
23977
+ _this.children = [];
24179
23978
  return _this;
24180
23979
  }
24181
- var _proto = ColorPropertyMixerPlayable.prototype;
24182
- _proto.processFrame = function processFrame(context) {
24183
- var boundObject = context.output.getUserData();
24184
- if (!boundObject) {
24185
- return;
23980
+ var _proto = TrackAsset.prototype;
23981
+ /**
23982
+ * 重写该方法以获取自定义对象绑定
23983
+ */ _proto.updateAnimatedObject = function updateAnimatedObject() {
23984
+ if (this.parent) {
23985
+ this.boundObject = this.parent.boundObject;
24186
23986
  }
24187
- var hasInput = false;
24188
- var value = boundObject[this.propertyName];
24189
- if (!_instanceof1(value, Color)) {
24190
- return;
23987
+ };
23988
+ /**
23989
+ * 重写该方法以创建自定义混合器
23990
+ */ _proto.createTrackMixer = function createTrackMixer(graph) {
23991
+ return new TrackMixerPlayable(graph);
23992
+ };
23993
+ _proto.createOutput = function createOutput() {
23994
+ var output = new PlayableOutput();
23995
+ return output;
23996
+ };
23997
+ _proto.createPlayableGraph = function createPlayableGraph(graph, runtimeClips) {
23998
+ var mixerPlayable = this.createMixerPlayableGraph(graph, runtimeClips);
23999
+ return mixerPlayable;
24000
+ };
24001
+ _proto.createMixerPlayableGraph = function createMixerPlayableGraph(graph, runtimeClips) {
24002
+ var clips = [];
24003
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
24004
+ var clip = _step.value;
24005
+ clips.push(clip);
24191
24006
  }
24192
- value.setZero();
24193
- // evaluate the curve
24194
- for(var i = 0; i < this.getInputCount(); i++){
24195
- var weight = this.getInputWeight(i);
24196
- if (weight > 0) {
24197
- var propertyClipPlayable = this.getInput(i);
24198
- if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
24199
- console.error("ColorPropertyMixerPlayable received incompatible input");
24200
- continue;
24201
- }
24202
- var curveValue = propertyClipPlayable.value;
24203
- value.r += curveValue.r * weight;
24204
- value.g += curveValue.g * weight;
24205
- value.b += curveValue.b * weight;
24206
- value.a += curveValue.a * weight;
24207
- hasInput = true;
24007
+ var mixerPlayable = this.compileClips(graph, clips, runtimeClips);
24008
+ return mixerPlayable;
24009
+ };
24010
+ _proto.compileClips = function compileClips(graph, timelineClips, runtimeClips) {
24011
+ var mixer = this.createTrackMixer(graph);
24012
+ for(var _iterator = _create_for_of_iterator_helper_loose(timelineClips), _step; !(_step = _iterator()).done;){
24013
+ var timelineClip = _step.value;
24014
+ var clipPlayable = this.createClipPlayable(graph, timelineClip);
24015
+ clipPlayable.setDuration(timelineClip.duration);
24016
+ var clip = new RuntimeClip(timelineClip, clipPlayable, mixer, this);
24017
+ runtimeClips.push(clip);
24018
+ mixer.clipPlayables.push(clipPlayable);
24019
+ mixer.setClipWeight(clipPlayable, 0.0);
24020
+ }
24021
+ return mixer;
24022
+ };
24023
+ _proto.createPlayable = function createPlayable(graph) {
24024
+ return new Playable(graph);
24025
+ };
24026
+ _proto.getChildTracks = function getChildTracks() {
24027
+ return this.children;
24028
+ };
24029
+ _proto.addChild = function addChild(child) {
24030
+ this.children.push(child);
24031
+ child.parent = this;
24032
+ };
24033
+ _proto.createClip = function createClip(classConstructor, name) {
24034
+ var newClip = new TimelineClip();
24035
+ newClip.asset = new classConstructor(this.engine);
24036
+ newClip.name = name ? name : "TimelineClip" + newClip.id;
24037
+ this.addClip(newClip);
24038
+ return newClip;
24039
+ };
24040
+ _proto.getClips = function getClips() {
24041
+ return this.clips;
24042
+ };
24043
+ _proto.findClip = function findClip(name) {
24044
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
24045
+ var clip = _step.value;
24046
+ if (clip.name === name) {
24047
+ return clip;
24208
24048
  }
24209
24049
  }
24210
- // set value
24211
- if (hasInput) {
24212
- boundObject[this.propertyName] = value;
24050
+ };
24051
+ _proto.addClip = function addClip(clip) {
24052
+ clip.id = (this.clipSeed++).toString();
24053
+ this.clips.push(clip);
24054
+ };
24055
+ _proto.createClipPlayable = function createClipPlayable(graph, clip) {
24056
+ return clip.asset.createPlayable(graph);
24057
+ };
24058
+ _proto.fromData = function fromData(data) {
24059
+ PlayableAsset.prototype.fromData.call(this, data);
24060
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.children), _step; !(_step = _iterator()).done;){
24061
+ var child = _step.value;
24062
+ child.parent = this;
24213
24063
  }
24214
24064
  };
24215
- return ColorPropertyMixerPlayable;
24216
- }(Playable);
24065
+ return TrackAsset;
24066
+ }(PlayableAsset);
24067
+ __decorate([
24068
+ serialize(TimelineClip)
24069
+ ], exports.TrackAsset.prototype, "clips", void 0);
24070
+ __decorate([
24071
+ serialize()
24072
+ ], exports.TrackAsset.prototype, "children", void 0);
24073
+ exports.TrackAsset = __decorate([
24074
+ effectsClass(DataType.TrackAsset)
24075
+ ], exports.TrackAsset);
24076
+ exports.TrackType = void 0;
24077
+ (function(TrackType) {
24078
+ TrackType[TrackType["MasterTrack"] = 0] = "MasterTrack";
24079
+ TrackType[TrackType["ObjectTrack"] = 1] = "ObjectTrack";
24080
+ })(exports.TrackType || (exports.TrackType = {}));
24081
+ var RuntimeClip = /*#__PURE__*/ function() {
24082
+ function RuntimeClip(clip, clipPlayable, parentMixer, track) {
24083
+ this.clip = clip;
24084
+ this.playable = clipPlayable;
24085
+ this.parentMixer = parentMixer;
24086
+ this.track = track;
24087
+ if (_instanceof1(this.track.boundObject, exports.VFXItem)) {
24088
+ this.particleSystem = this.track.boundObject.getComponent(exports.ParticleSystem);
24089
+ }
24090
+ }
24091
+ var _proto = RuntimeClip.prototype;
24092
+ _proto.evaluateAt = function evaluateAt(localTime) {
24093
+ var clip = this.clip;
24094
+ var weight = 1.0;
24095
+ var ended = false;
24096
+ var started = false;
24097
+ var boundObject = this.track.boundObject;
24098
+ if (localTime >= clip.start + clip.duration && clip.endBehavior === EndBehavior.destroy) {
24099
+ if (_instanceof1(boundObject, exports.VFXItem) && exports.VFXItem.isParticle(boundObject) && this.particleSystem && !this.particleSystem.destroyed) {
24100
+ weight = 1.0;
24101
+ } else {
24102
+ weight = 0.0;
24103
+ ended = true;
24104
+ }
24105
+ } else if (localTime - this.clip.start >= 0) {
24106
+ weight = 1.0;
24107
+ started = true;
24108
+ } else if (localTime < clip.start) {
24109
+ weight = 0.0;
24110
+ }
24111
+ if (started && this.playable.getPlayState() !== PlayState.Playing) {
24112
+ this.playable.play();
24113
+ }
24114
+ this.parentMixer.setClipWeight(this.playable, weight);
24115
+ var clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));
24116
+ this.playable.setTime(clipTime);
24117
+ // 判断动画是否结束
24118
+ if (ended) {
24119
+ if (this.playable.getPlayState() === PlayState.Playing) {
24120
+ this.playable.pause();
24121
+ }
24122
+ }
24123
+ };
24124
+ _create_class(RuntimeClip, [
24125
+ {
24126
+ key: "enable",
24127
+ set: function set(value) {
24128
+ if (value) {
24129
+ this.playable.play();
24130
+ } else {
24131
+ this.parentMixer.setClipWeight(this.playable, 0);
24132
+ this.playable.pause();
24133
+ }
24134
+ }
24135
+ }
24136
+ ]);
24137
+ return RuntimeClip;
24138
+ }();
24139
+
24140
+ exports.ActivationTrack = /*#__PURE__*/ function(TrackAsset) {
24141
+ _inherits(ActivationTrack, TrackAsset);
24142
+ function ActivationTrack() {
24143
+ return TrackAsset.apply(this, arguments);
24144
+ }
24145
+ var _proto = ActivationTrack.prototype;
24146
+ _proto.createTrackMixer = function createTrackMixer(graph) {
24147
+ return new ActivationMixerPlayable(graph);
24148
+ };
24149
+ return ActivationTrack;
24150
+ }(exports.TrackAsset);
24151
+ exports.ActivationTrack = __decorate([
24152
+ effectsClass(DataType.ActivationTrack)
24153
+ ], exports.ActivationTrack);
24217
24154
 
24218
24155
  var PropertyTrack = /*#__PURE__*/ function(TrackAsset) {
24219
24156
  _inherits(PropertyTrack, TrackAsset);
@@ -24286,6 +24223,10 @@ exports.SpriteColorTrack = /*#__PURE__*/ function(TrackAsset) {
24286
24223
  function SpriteColorTrack() {
24287
24224
  return TrackAsset.apply(this, arguments);
24288
24225
  }
24226
+ var _proto = SpriteColorTrack.prototype;
24227
+ _proto.createTrackMixer = function createTrackMixer(graph) {
24228
+ return new SpriteColorMixerPlayable(graph);
24229
+ };
24289
24230
  return SpriteColorTrack;
24290
24231
  }(exports.TrackAsset);
24291
24232
  exports.SpriteColorTrack = __decorate([
@@ -24318,6 +24259,10 @@ exports.TransformTrack = /*#__PURE__*/ function(TrackAsset) {
24318
24259
  function TransformTrack() {
24319
24260
  return TrackAsset.apply(this, arguments);
24320
24261
  }
24262
+ var _proto = TransformTrack.prototype;
24263
+ _proto.createTrackMixer = function createTrackMixer(graph) {
24264
+ return new TransformMixerPlayable(graph);
24265
+ };
24321
24266
  return TransformTrack;
24322
24267
  }(exports.TrackAsset);
24323
24268
  exports.TransformTrack = __decorate([
@@ -24346,6 +24291,18 @@ exports.MaterialTrack = __decorate([
24346
24291
  effectsClass("MaterialTrack")
24347
24292
  ], exports.MaterialTrack);
24348
24293
 
24294
+ var ParticleTrack = /*#__PURE__*/ function(TrackAsset) {
24295
+ _inherits(ParticleTrack, TrackAsset);
24296
+ function ParticleTrack() {
24297
+ return TrackAsset.apply(this, arguments);
24298
+ }
24299
+ var _proto = ParticleTrack.prototype;
24300
+ _proto.createTrackMixer = function createTrackMixer(graph) {
24301
+ return new ParticleMixerPlayable(graph);
24302
+ };
24303
+ return ParticleTrack;
24304
+ }(exports.TrackAsset);
24305
+
24349
24306
  exports.Vector4PropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
24350
24307
  _inherits(Vector4PropertyTrack, PropertyTrack);
24351
24308
  function Vector4PropertyTrack() {
@@ -24474,7 +24431,6 @@ exports.TimelineAsset = /*#__PURE__*/ function(PlayableAsset) {
24474
24431
  var _proto = TimelineAsset.prototype;
24475
24432
  _proto.createPlayable = function createPlayable(graph) {
24476
24433
  var timelinePlayable = new TimelinePlayable(graph);
24477
- timelinePlayable.setTraversalMode(PlayableTraversalMode.Passthrough);
24478
24434
  for(var _iterator = _create_for_of_iterator_helper_loose(this.tracks), _step; !(_step = _iterator()).done;){
24479
24435
  var track = _step.value;
24480
24436
  if (_instanceof1(track, exports.ObjectBindingTrack)) {
@@ -24555,9 +24511,7 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
24555
24511
  return _this;
24556
24512
  }
24557
24513
  var _proto = TimelinePlayable.prototype;
24558
- _proto.prepareFrame = function prepareFrame(context) {
24559
- this.evaluate();
24560
- };
24514
+ _proto.prepareFrame = function prepareFrame(context) {};
24561
24515
  _proto.evaluate = function evaluate() {
24562
24516
  var time = this.getTime();
24563
24517
  // TODO search active clips
@@ -24574,11 +24528,10 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
24574
24528
  var track = _step.value;
24575
24529
  // create track mixer and track output
24576
24530
  var trackMixPlayable = track.createPlayableGraph(graph, this.clips);
24577
- this.addInput(trackMixPlayable, 0);
24578
24531
  var trackOutput = track.createOutput();
24579
24532
  trackOutput.setUserData(track.boundObject);
24580
24533
  graph.addOutput(trackOutput);
24581
- trackOutput.setSourcePlayable(this, this.getInputCount() - 1);
24534
+ trackOutput.setSourcePlayable(trackMixPlayable);
24582
24535
  // create track instance
24583
24536
  var trackInstance = new TrackInstance(track, trackMixPlayable, trackOutput);
24584
24537
  trackInstanceMap[track.getInstanceId()] = trackInstance;
@@ -24639,10 +24592,10 @@ exports.Vector4PropertyPlayableAsset = __decorate([
24639
24592
  effectsClass("Vector4PropertyPlayableAsset")
24640
24593
  ], exports.Vector4PropertyPlayableAsset);
24641
24594
 
24642
- exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
24643
- _inherits(ObjectBindingTrack, TrackAsset1);
24595
+ exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset) {
24596
+ _inherits(ObjectBindingTrack, TrackAsset);
24644
24597
  function ObjectBindingTrack() {
24645
- return TrackAsset1.apply(this, arguments);
24598
+ return TrackAsset.apply(this, arguments);
24646
24599
  }
24647
24600
  var _proto = ObjectBindingTrack.prototype;
24648
24601
  _proto.updateAnimatedObject = function updateAnimatedObject() {};
@@ -24653,7 +24606,7 @@ exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
24653
24606
  var boundItem = this.boundObject;
24654
24607
  // 添加粒子动画 clip // TODO 待移除
24655
24608
  if (boundItem.getComponent(exports.ParticleSystem)) {
24656
- var particleTrack = timelineAsset.createTrack(exports.TrackAsset, this, "ParticleTrack");
24609
+ var particleTrack = timelineAsset.createTrack(ParticleTrack, this, "ParticleTrack");
24657
24610
  particleTrack.boundObject = this.boundObject;
24658
24611
  var particleClip = particleTrack.createClip(ParticleBehaviourPlayableAsset);
24659
24612
  particleClip.start = boundItem.start;
@@ -24676,14 +24629,14 @@ var TextLayout = /*#__PURE__*/ function() {
24676
24629
  function TextLayout(options) {
24677
24630
  this.width = 0;
24678
24631
  this.height = 0;
24679
- var _options_textHeight = options.textHeight, textHeight = _options_textHeight === void 0 ? 100 : _options_textHeight, _options_textWidth = options.textWidth, textWidth = _options_textWidth === void 0 ? 100 : _options_textWidth, _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? TextOverflow.display : _options_textOverflow, _options_textBaseline = options.textBaseline, textBaseline = _options_textBaseline === void 0 ? TextBaseline.top : _options_textBaseline, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? TextAlignment.left : _options_textAlign, _options_text = options.text, text = _options_text === void 0 ? " " : _options_text, _options_letterSpace = options.letterSpace, letterSpace = _options_letterSpace === void 0 ? 0 : _options_letterSpace, _options_autoWidth = options.autoWidth, autoWidth = _options_autoWidth === void 0 ? false : _options_autoWidth, fontSize = options.fontSize, _options_lineHeight = options.lineHeight, lineHeight = _options_lineHeight === void 0 ? fontSize : _options_lineHeight;
24632
+ var _options_textHeight = options.textHeight, textHeight = _options_textHeight === void 0 ? 100 : _options_textHeight, _options_textWidth = options.textWidth, textWidth = _options_textWidth === void 0 ? 100 : _options_textWidth, _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? TextOverflow.clip : _options_textOverflow, _options_textBaseline = options.textBaseline, textBaseline = _options_textBaseline === void 0 ? TextBaseline.top : _options_textBaseline, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? TextAlignment.left : _options_textAlign, _options_text = options.text, text = _options_text === void 0 ? " " : _options_text, _options_letterSpace = options.letterSpace, letterSpace = _options_letterSpace === void 0 ? 0 : _options_letterSpace, _options_autoWidth = options.autoWidth, autoWidth = _options_autoWidth === void 0 ? false : _options_autoWidth, fontSize = options.fontSize, _options_lineHeight = options.lineHeight, lineHeight = _options_lineHeight === void 0 ? fontSize : _options_lineHeight;
24680
24633
  var tempWidth = fontSize + letterSpace;
24681
24634
  this.autoWidth = autoWidth;
24682
24635
  this.maxTextWidth = text.length * tempWidth;
24683
24636
  this.width = textWidth;
24684
24637
  this.height = textHeight;
24685
24638
  this.letterSpace = letterSpace;
24686
- this.overFlow = textOverflow;
24639
+ this.overflow = textOverflow;
24687
24640
  this.textBaseline = textBaseline;
24688
24641
  this.textAlign = textAlign;
24689
24642
  this.lineHeight = lineHeight;
@@ -27673,11 +27626,11 @@ var seed = 1;
27673
27626
  if (compressedTexture === void 0) compressedTexture = 0;
27674
27627
  var _this = this;
27675
27628
  return _async_to_generator(function() {
27676
- var _this_options, useCompressedTexture, variables, baseUrl, jobs, loadedImages;
27629
+ var _this_options, useCompressedTexture, variables, disableWebP, disableAVIF, baseUrl, jobs, loadedImages;
27677
27630
  return __generator(this, function(_state) {
27678
27631
  switch(_state.label){
27679
27632
  case 0:
27680
- _this_options = _this.options, useCompressedTexture = _this_options.useCompressedTexture, variables = _this_options.variables;
27633
+ _this_options = _this.options, useCompressedTexture = _this_options.useCompressedTexture, variables = _this_options.variables, disableWebP = _this_options.disableWebP, disableAVIF = _this_options.disableAVIF;
27681
27634
  baseUrl = _this.baseUrl;
27682
27635
  jobs = images.map(/*#__PURE__*/ _async_to_generator(function(img, idx) {
27683
27636
  var png, webp, avif, imageURL, webpURL, avifURL, id, template, background, url, isVideo, loadFn, resultImage, e, compressed, src, bufferURL, _ref, url1, image, _tmp;
@@ -27688,9 +27641,9 @@ var seed = 1;
27688
27641
  // eslint-disable-next-line compat/compat
27689
27642
  imageURL = new URL(png, baseUrl).href;
27690
27643
  // eslint-disable-next-line compat/compat
27691
- webpURL = webp && new URL(webp, baseUrl).href;
27644
+ webpURL = !disableWebP && webp ? new URL(webp, baseUrl).href : undefined;
27692
27645
  // eslint-disable-next-line compat/compat
27693
- avifURL = avif && new URL(avif, baseUrl).href;
27646
+ avifURL = !disableAVIF && avif ? new URL(avif, baseUrl).href : undefined;
27694
27647
  id = img.id;
27695
27648
  if (!("template" in img)) return [
27696
27649
  3,
@@ -28379,7 +28332,6 @@ var tmpScale = new Vector3(1, 1, 1);
28379
28332
  return Camera;
28380
28333
  }();
28381
28334
 
28382
- var listOrder = 0;
28383
28335
  /**
28384
28336
  * 合成资源管理
28385
28337
  */ var CompositionSourceManager = /*#__PURE__*/ function() {
@@ -28412,7 +28364,6 @@ var listOrder = 0;
28412
28364
  this.pluginSystem = pluginSystem;
28413
28365
  this.totalTime = totalTime != null ? totalTime : 0;
28414
28366
  this.textures = cachedTextures;
28415
- listOrder = 0;
28416
28367
  this.sourceContent = this.getContent(this.composition);
28417
28368
  }
28418
28369
  var _proto = CompositionSourceManager.prototype;
@@ -28443,7 +28394,6 @@ var listOrder = 0;
28443
28394
  var sourceItemData = this.engine.jsonSceneData[itemDataPath.id];
28444
28395
  var itemProps = sourceItemData;
28445
28396
  if (passRenderLevel(sourceItemData.renderLevel, this.renderLevel)) {
28446
- itemProps.listIndex = listOrder++;
28447
28397
  if (itemProps.type === ItemType.sprite || itemProps.type === ItemType.particle || itemProps.type === ItemType.spine || //@ts-expect-error
28448
28398
  itemProps.type === ItemType.shape) {
28449
28399
  for(var _iterator2 = _create_for_of_iterator_helper_loose(itemProps.components), _step2; !(_step2 = _iterator2()).done;){
@@ -28746,6 +28696,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
28746
28696
  SerializationHelper.deserialize(sourceContent, _this.rootComposition);
28747
28697
  _this.rootComposition.createContent();
28748
28698
  _this.buildItemTree(_this.rootItem);
28699
+ _this.rootComposition.setChildrenRenderOrder(0);
28749
28700
  _this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
28750
28701
  return _this;
28751
28702
  }
@@ -31385,7 +31336,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31385
31336
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31386
31337
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31387
31338
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31388
- var version = "2.1.5";
31339
+ var version = "2.2.0";
31389
31340
  logger.info("Core version: " + version + ".");
31390
31341
 
31391
31342
  exports.AbstractPlugin = AbstractPlugin;
@@ -31448,6 +31399,7 @@ exports.ParticleBehaviourPlayableAsset = ParticleBehaviourPlayableAsset;
31448
31399
  exports.ParticleLoader = ParticleLoader;
31449
31400
  exports.ParticleMesh = ParticleMesh;
31450
31401
  exports.ParticleSystemRenderer = ParticleSystemRenderer;
31402
+ exports.ParticleTrack = ParticleTrack;
31451
31403
  exports.PassTextureCache = PassTextureCache;
31452
31404
  exports.PathSegments = PathSegments;
31453
31405
  exports.PluginSystem = PluginSystem;