@galacean/effects-threejs 2.0.0-alpha.16 → 2.0.0-alpha.17

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 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.16
6
+ * Version: v2.0.0-alpha.17
7
7
  */
8
8
 
9
9
  'use strict';
@@ -474,7 +474,6 @@ function isSimulatorCellPhone() {
474
474
  }
475
475
  function isAlipayMiniApp() {
476
476
  var _my;
477
- // @ts-expect-error
478
477
  return typeof my !== "undefined" && ((_my = my) == null ? void 0 : _my.renderTarget) === "web";
479
478
  }
480
479
 
@@ -730,8 +729,8 @@ function noop() {}
730
729
  *
731
730
  * @static
732
731
  * @function isString
733
- * @param {object} obj - 要判断的对象
734
- * @return {boolean}
732
+ * @param obj - 要判断的对象
733
+ * @return
735
734
  */ function isString(obj) {
736
735
  return typeof obj === "string";
737
736
  }
@@ -740,8 +739,8 @@ function noop() {}
740
739
  *
741
740
  * @static
742
741
  * @function isArray
743
- * @param {object} obj - 要判断的对象
744
- * @return {boolean}
742
+ * @param obj - 要判断的对象
743
+ * @return
745
744
  */ var isArray = Array.isArray || function(obj) {
746
745
  return Object.prototype.toString.call(obj) === "[object Array]";
747
746
  };
@@ -750,8 +749,8 @@ function noop() {}
750
749
  *
751
750
  * @static
752
751
  * @function isFunction
753
- * @param {object} obj - 要判断的对象
754
- * @return {boolean}
752
+ * @param obj - 要判断的对象
753
+ * @return
755
754
  */ function isFunction(obj) {
756
755
  return Object.prototype.toString.call(obj) === "[object Function]";
757
756
  }
@@ -760,8 +759,8 @@ function noop() {}
760
759
  *
761
760
  * @static
762
761
  * @function isObject
763
- * @param {object} obj - 要判断的对象
764
- * @return {boolean}
762
+ * @param obj - 要判断的对象
763
+ * @return
765
764
  */ function isObject(obj) {
766
765
  return Object.prototype.toString.call(obj) === "[object Object]";
767
766
  }
@@ -770,25 +769,12 @@ function isCanvas(canvas) {
770
769
  // 小程序 Canvas 无法使用 instanceof HTMLCanvasElement 判断
771
770
  return typeof canvas === "object" && canvas !== null && ((_canvas_tagName = canvas.tagName) == null ? void 0 : _canvas_tagName.toUpperCase()) === "CANVAS";
772
771
  }
773
- function deepClone(obj) {
774
- if (isArray(obj)) {
775
- return obj.map(deepClone);
776
- } else if (obj && typeof obj === "object") {
777
- if (ArrayBuffer.isView(obj)) {
778
- return obj.slice();
779
- }
780
- var ret = {};
781
- var kas = Object.keys(obj);
782
- for(var i = 0; i < kas.length; i++){
783
- var key = kas[i];
784
- ret[key] = deepClone(obj[key]);
785
- }
786
- return ret;
787
- }
788
- return obj;
789
- }
790
- // TODO: 改名
791
- function random(min, max) {
772
+ /**
773
+ * 生成一个位于 min 和 max 之间的随机数
774
+ * @param min
775
+ * @param max
776
+ * @returns
777
+ */ function randomInRange(min, max) {
792
778
  return min + Math.random() * (max - min);
793
779
  }
794
780
  function throwDestroyedError() {
@@ -4119,7 +4105,7 @@ var CameraClipMode;
4119
4105
  * 蒙版形状切分
4120
4106
  */ ValueType[ValueType["SHAPE_SPLITS"] = 11] = "SHAPE_SPLITS";
4121
4107
  /**
4122
- *直线路径
4108
+ * 直线路径
4123
4109
  */ ValueType[ValueType["LINEAR_PATH"] = 12] = "LINEAR_PATH";
4124
4110
  /**
4125
4111
  * 多色
@@ -4295,7 +4281,7 @@ var TextAlignment;
4295
4281
  (function(TextAlignment) {
4296
4282
  /**
4297
4283
  * text alignment starts from(x,y) to right direction
4298
- * 从(x,y)开始第一个字符,向右边延伸
4284
+ * 从 (x,y) 开始第一个字符,向右边延伸
4299
4285
  */ TextAlignment[TextAlignment["left"] = 0] = "left";
4300
4286
  /**
4301
4287
  * (x,y) is middle position of text, where (left + right)/2 =(x,y)
@@ -4303,7 +4289,7 @@ var TextAlignment;
4303
4289
  */ TextAlignment[TextAlignment["middle"] = 1] = "middle";
4304
4290
  /**
4305
4291
  * text alignment ends with(x,y) from left direction
4306
- * 从(x,y)结束最后一个字符,向左边延伸
4292
+ * 从 (x,y) 结束最后一个字符,向左边延伸
4307
4293
  */ TextAlignment[TextAlignment["right"] = 2] = "right";
4308
4294
  })(TextAlignment || (TextAlignment = {}));
4309
4295
  /**
@@ -4353,6 +4339,7 @@ var DataType;
4353
4339
  DataType["TimelineAsset"] = "TimelineAsset";
4354
4340
  DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
4355
4341
  DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
4342
+ DataType["BinaryAsset"] = "BinaryAsset";
4356
4343
  // FIXME: 先完成ECS的场景转换,后面移到spec中
4357
4344
  DataType["MeshComponent"] = "MeshComponent";
4358
4345
  DataType["SkyboxComponent"] = "SkyboxComponent";
@@ -4361,6 +4348,7 @@ var DataType;
4361
4348
  DataType["ModelPluginComponent"] = "ModelPluginComponent";
4362
4349
  DataType["TreeComponent"] = "TreeComponent";
4363
4350
  DataType["AnimationComponent"] = "AnimationComponent";
4351
+ DataType["SpineComponent"] = "SpineComponent";
4364
4352
  // Non-EffectObject
4365
4353
  DataType["TimelineClip"] = "TimelineClip";
4366
4354
  })(DataType || (DataType = {}));
@@ -4448,11 +4436,11 @@ var VertexBufferSemantic;
4448
4436
  VertexBufferSemantic["TangentBS3"] = "TANGENT_BS3";
4449
4437
  })(VertexBufferSemantic || (VertexBufferSemantic = {}));
4450
4438
 
4451
- var BuiltinObjectGUID = function BuiltinObjectGUID() {
4439
+ var BuiltinObjectGUID = {
4440
+ WhiteTexture: "whitetexture00000000000000000000",
4441
+ PBRShader: "pbr00000000000000000000000000000",
4442
+ UnlitShader: "unlit000000000000000000000000000"
4452
4443
  };
4453
- BuiltinObjectGUID.WhiteTexture = "whitetexture00000000000000000000";
4454
- BuiltinObjectGUID.PBRShader = "pbr00000000000000000000000000000";
4455
- BuiltinObjectGUID.UnlitShader = "unlit000000000000000000000000000";
4456
4444
 
4457
4445
  var index$1 = /*#__PURE__*/Object.freeze({
4458
4446
  __proto__: null,
@@ -4508,15 +4496,20 @@ var index$1 = /*#__PURE__*/Object.freeze({
4508
4496
  BuiltinObjectGUID: BuiltinObjectGUID
4509
4497
  });
4510
4498
 
4511
- var effectsClassStore = {};
4512
4499
  var decoratorInitialStore = {};
4513
4500
  var mergedStore = {};
4514
- function getDirectStore(target) {
4515
- var classKey = target.constructor.name;
4516
- if (!decoratorInitialStore[classKey]) {
4517
- decoratorInitialStore[classKey] = {};
4518
- }
4519
- return decoratorInitialStore[classKey];
4501
+ var effectsClassStore = {};
4502
+ function effectsClass(className) {
4503
+ return function(target, context) {
4504
+ if (effectsClassStore[className]) {
4505
+ console.warn("Class " + className + " 重复注册");
4506
+ }
4507
+ // TODO: three修改json dataType, 这边重复注册直接 return
4508
+ effectsClassStore[className] = target;
4509
+ };
4510
+ }
4511
+ function serialize(type, sourceName) {
4512
+ return generateSerializableMember(type, sourceName); // value member
4520
4513
  }
4521
4514
  function getMergedStore(target) {
4522
4515
  var classKey = target.constructor.name;
@@ -4541,18 +4534,6 @@ function getMergedStore(target) {
4541
4534
  }
4542
4535
  return store;
4543
4536
  }
4544
- function serialize(type, sourceName) {
4545
- return generateSerializableMember(type, sourceName); // value member
4546
- }
4547
- function effectsClass(className) {
4548
- return function(target, context) {
4549
- if (effectsClassStore[className]) {
4550
- console.warn("Class " + className + " 重复注册");
4551
- }
4552
- //TODO: three修改json dataType, 这边重复注册直接 return
4553
- effectsClassStore[className] = target;
4554
- };
4555
- }
4556
4537
  function generateSerializableMember(type, sourceName) {
4557
4538
  return function(target, propertyKey) {
4558
4539
  var classStore = getDirectStore(target);
@@ -4564,6 +4545,13 @@ function generateSerializableMember(type, sourceName) {
4564
4545
  }
4565
4546
  };
4566
4547
  }
4548
+ function getDirectStore(target) {
4549
+ var classKey = target.constructor.name;
4550
+ if (!decoratorInitialStore[classKey]) {
4551
+ decoratorInitialStore[classKey] = {};
4552
+ }
4553
+ return decoratorInitialStore[classKey];
4554
+ }
4567
4555
 
4568
4556
  /**
4569
4557
  * @since 2.0.0
@@ -4595,6 +4583,9 @@ function generateSerializableMember(type, sourceName) {
4595
4583
  }
4596
4584
  };
4597
4585
  _proto.dispose = function dispose() {};
4586
+ EffectsObject.is = function is(obj) {
4587
+ return _instanceof1(obj, EffectsObject) && "guid" in obj;
4588
+ };
4598
4589
  return EffectsObject;
4599
4590
  }();
4600
4591
  __decorate([
@@ -4747,6 +4738,7 @@ __decorate([
4747
4738
  _this = Component.apply(this, arguments) || this;
4748
4739
  _this.started = false;
4749
4740
  _this.materials = [];
4741
+ _this._priority = 0;
4750
4742
  _this._enabled = true;
4751
4743
  return _this;
4752
4744
  }
@@ -10003,7 +9995,7 @@ var RandomValue = /*#__PURE__*/ function(ValueGetter) {
10003
9995
  this.max = props[1];
10004
9996
  };
10005
9997
  _proto.getValue = function getValue(time) {
10006
- return random(this.min, this.max);
9998
+ return randomInRange(this.min, this.max);
10007
9999
  };
10008
10000
  _proto.toUniform = function toUniform() {
10009
10001
  return new Float32Array([
@@ -14739,7 +14731,7 @@ var Cone = /*#__PURE__*/ function() {
14739
14731
  // dir + [0,0,1]
14740
14732
  dir.z += 1;
14741
14733
  return {
14742
- position: position.multiply(random(0, 1)),
14734
+ position: position.multiply(randomInRange(0, 1)),
14743
14735
  direction: dir.normalize()
14744
14736
  };
14745
14737
  };
@@ -14747,7 +14739,7 @@ var Cone = /*#__PURE__*/ function() {
14747
14739
  }();
14748
14740
  function getArcAngle(arc, arcMode, opt) {
14749
14741
  if (arcMode === ShapeArcMode.RANDOM) {
14750
- arc = random(0, arc);
14742
+ arc = randomInRange(0, arc);
14751
14743
  } else if (arcMode === ShapeArcMode.UNIDIRECTIONAL_CYCLE) {
14752
14744
  var d = opt.index % (opt.total + 1);
14753
14745
  arc = arc / opt.total * d;
@@ -14787,8 +14779,8 @@ var Rectangle = /*#__PURE__*/ function() {
14787
14779
  }
14788
14780
  var _proto = Rectangle.prototype;
14789
14781
  _proto.generate = function generate(opt) {
14790
- var x = random(-this._d, this._d);
14791
- var y = random(-this._h, this._h);
14782
+ var x = randomInRange(-this._d, this._d);
14783
+ var y = randomInRange(-this._h, this._h);
14792
14784
  return {
14793
14785
  direction: new Vector3(0, 0, 1),
14794
14786
  position: new Vector3(x, y, 0)
@@ -14838,7 +14830,7 @@ var Edge = /*#__PURE__*/ function() {
14838
14830
  }
14839
14831
  var _proto = Edge.prototype;
14840
14832
  _proto.generate = function generate(options) {
14841
- var x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) : random(0, 1);
14833
+ var x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) : randomInRange(0, 1);
14842
14834
  return {
14843
14835
  direction: new Vector3(0, 1, 0),
14844
14836
  position: new Vector3(this._d * (x - 0.5), 0, 0)
@@ -14859,7 +14851,7 @@ var Donut = /*#__PURE__*/ function() {
14859
14851
  _proto.generate = function generate(opt) {
14860
14852
  var dradius = this.donutRadius;
14861
14853
  var center = this.radius - dradius;
14862
- var angle = random(0, Math.PI * 2);
14854
+ var angle = randomInRange(0, Math.PI * 2);
14863
14855
  var arc = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
14864
14856
  var rot = tempMat4$2.setFromRotationZ(arc);
14865
14857
  var direction = new Vector3(Math.cos(angle), Math.sin(angle), 0);
@@ -14882,7 +14874,7 @@ var Sphere = /*#__PURE__*/ function() {
14882
14874
  }
14883
14875
  var _proto = Sphere.prototype;
14884
14876
  _proto.getHorizontalAngle = function getHorizontalAngle() {
14885
- return random(-90, 90);
14877
+ return randomInRange(-90, 90);
14886
14878
  };
14887
14879
  _proto.generate = function generate(opt) {
14888
14880
  var rz = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
@@ -14905,7 +14897,7 @@ var Hemisphere = /*#__PURE__*/ function(Sphere) {
14905
14897
  }
14906
14898
  var _proto = Hemisphere.prototype;
14907
14899
  _proto.getHorizontalAngle = function getHorizontalAngle() {
14908
- return random(0, 90);
14900
+ return randomInRange(0, 90);
14909
14901
  };
14910
14902
  return Hemisphere;
14911
14903
  }(Sphere);
@@ -16943,11 +16935,9 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
16943
16935
  this.props = props;
16944
16936
  this.destroyed = false;
16945
16937
  var cachePrefix = "";
16946
- var options = props.options;
16947
- var positionOverLifetime = props.positionOverLifetime;
16948
- var shape = props.shape;
16949
- var gravityModifier = positionOverLifetime.gravityOverLifetime;
16950
- var gravity = ensureVec3(positionOverLifetime.gravity);
16938
+ var options = props.options, _props_positionOverLifetime = props.positionOverLifetime, positionOverLifetime = _props_positionOverLifetime === void 0 ? {} : _props_positionOverLifetime, shape = props.shape;
16939
+ var gravityModifier = positionOverLifetime == null ? void 0 : positionOverLifetime.gravityOverLifetime;
16940
+ var gravity = ensureVec3(positionOverLifetime == null ? void 0 : positionOverLifetime.gravity);
16951
16941
  var _textureSheetAnimation = props.textureSheetAnimation;
16952
16942
  var textureSheetAnimation = _textureSheetAnimation ? {
16953
16943
  animationDelay: createValueGetter(_textureSheetAnimation.animationDelay || 0),
@@ -16958,7 +16948,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
16958
16948
  row: _textureSheetAnimation.row,
16959
16949
  total: _textureSheetAnimation.total || _textureSheetAnimation.col * _textureSheetAnimation.row
16960
16950
  } : undefined;
16961
- var startTurbulence = !!(shape && shape.turbulenceX || shape.turbulenceY || shape.turbulenceZ);
16951
+ var startTurbulence = !!(shape && shape.turbulenceX || (shape == null ? void 0 : shape.turbulenceY) || (shape == null ? void 0 : shape.turbulenceZ));
16962
16952
  var turbulence;
16963
16953
  if (startTurbulence) {
16964
16954
  var _shape_turbulenceX, _shape_turbulenceY, _shape_turbulenceZ;
@@ -16991,7 +16981,7 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
16991
16981
  }
16992
16982
  }
16993
16983
  var forceTarget;
16994
- if (positionOverLifetime.forceTarget) {
16984
+ if (positionOverLifetime == null ? void 0 : positionOverLifetime.forceTarget) {
16995
16985
  forceTarget = {
16996
16986
  target: positionOverLifetime.target || [
16997
16987
  0,
@@ -18695,6 +18685,29 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
18695
18685
  return AnimationClipPlayable;
18696
18686
  }(Playable);
18697
18687
 
18688
+ /**
18689
+ * @since 2.0.0
18690
+ * @internal
18691
+ */ var TimelineClip = /*#__PURE__*/ function() {
18692
+ function TimelineClip() {
18693
+ this.start = 0;
18694
+ this.duration = 0;
18695
+ }
18696
+ var _proto = TimelineClip.prototype;
18697
+ _proto.toLocalTime = function toLocalTime(time) {
18698
+ var localTime = time - this.start;
18699
+ var duration = this.duration;
18700
+ if (localTime - duration > 0.001) {
18701
+ if (this.endBehaviour === ItemEndBehavior.loop) {
18702
+ localTime = localTime % duration;
18703
+ } else if (this.endBehaviour === ItemEndBehavior.freeze) {
18704
+ localTime = Math.min(duration, localTime);
18705
+ }
18706
+ }
18707
+ return localTime;
18708
+ };
18709
+ return TimelineClip;
18710
+ }();
18698
18711
  exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
18699
18712
  _inherits(TrackAsset, PlayableAsset);
18700
18713
  function TrackAsset() {
@@ -18756,7 +18769,7 @@ exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
18756
18769
  this.children.push(child);
18757
18770
  };
18758
18771
  _proto.createClip = function createClip(classConstructor, name) {
18759
- var newClip = new exports.TimelineClip();
18772
+ var newClip = new TimelineClip();
18760
18773
  newClip.asset = new classConstructor(this.engine);
18761
18774
  newClip.name = name ? name : "TimelineClip" + newClip.id;
18762
18775
  this.addClip(newClip);
@@ -18783,7 +18796,7 @@ exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
18783
18796
  return TrackAsset;
18784
18797
  }(PlayableAsset);
18785
18798
  __decorate([
18786
- serialize("TimelineClip")
18799
+ serialize(TimelineClip)
18787
18800
  ], exports.TrackAsset.prototype, "clips", void 0);
18788
18801
  __decorate([
18789
18802
  serialize()
@@ -18796,29 +18809,6 @@ exports.TrackType = void 0;
18796
18809
  TrackType[TrackType["MasterTrack"] = 0] = "MasterTrack";
18797
18810
  TrackType[TrackType["ObjectTrack"] = 1] = "ObjectTrack";
18798
18811
  })(exports.TrackType || (exports.TrackType = {}));
18799
- exports.TimelineClip = /*#__PURE__*/ function() {
18800
- function TimelineClip() {
18801
- this.start = 0;
18802
- this.duration = 0;
18803
- }
18804
- var _proto = TimelineClip.prototype;
18805
- _proto.toLocalTime = function toLocalTime(time) {
18806
- var localTime = time - this.start;
18807
- var duration = this.duration;
18808
- if (localTime - duration > 0.001) {
18809
- if (this.endBehaviour === ItemEndBehavior.loop) {
18810
- localTime = localTime % duration;
18811
- } else if (this.endBehaviour === ItemEndBehavior.freeze) {
18812
- localTime = Math.min(duration, localTime);
18813
- }
18814
- }
18815
- return localTime;
18816
- };
18817
- return TimelineClip;
18818
- }();
18819
- exports.TimelineClip = __decorate([
18820
- effectsClass("TimelineClip")
18821
- ], exports.TimelineClip);
18822
18812
  var RuntimeClip = /*#__PURE__*/ function() {
18823
18813
  function RuntimeClip(clip, clipPlayable, parentMixer, track) {
18824
18814
  this.clip = clip;
@@ -18905,10 +18895,6 @@ exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
18905
18895
  particleClip.endBehaviour = boundItem.endBehavior;
18906
18896
  }
18907
18897
  };
18908
- _proto.fromData = function fromData(data) {
18909
- TrackAsset1.prototype.fromData.call(this, data);
18910
- this.data = data;
18911
- };
18912
18898
  return ObjectBindingTrack;
18913
18899
  }(exports.TrackAsset);
18914
18900
  exports.ObjectBindingTrack = __decorate([
@@ -19148,7 +19134,6 @@ function compareTracks(a, b) {
19148
19134
  this.startTime = startTime;
19149
19135
  this.resolveBindings();
19150
19136
  this.timelinePlayable = this.timelineAsset.createPlayable(this.graph);
19151
- this.timelinePlayable.play();
19152
19137
  // 重播不销毁元素
19153
19138
  if (this.item.endBehavior !== ItemEndBehavior.destroy) {
19154
19139
  this.setReusable(true);
@@ -19567,7 +19552,6 @@ var CanvasPool = /*#__PURE__*/ function() {
19567
19552
  return this.elements.shift();
19568
19553
  }
19569
19554
  if (getConfig(TEMPLATE_USE_OFFSCREEN_CANVAS)) {
19570
- // @ts-expect-error
19571
19555
  return window._createOffscreenCanvas(10, 10);
19572
19556
  } else {
19573
19557
  // in hongmeng system, create too many canvas will case render error
@@ -20136,6 +20120,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
20136
20120
  /**
20137
20121
  * 元素动画的速度
20138
20122
  */ _this.speed = 1;
20123
+ _this.listIndex = 0;
20139
20124
  _this.name = "VFXItem";
20140
20125
  _this.transform.name = _this.name;
20141
20126
  _this.transform.engine = engine;
@@ -20406,7 +20391,6 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
20406
20391
  this.parentId = parentId;
20407
20392
  this.duration = duration;
20408
20393
  this.endBehavior = endBehavior;
20409
- this.renderOrder = listIndex;
20410
20394
  //@ts-expect-error
20411
20395
  this.oldId = data.oldId;
20412
20396
  if (!data.content) {
@@ -20417,18 +20401,12 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
20417
20401
  if (duration <= 0) {
20418
20402
  throw Error("Item duration can't be less than 0, see " + HELP_LINK["Item duration can't be less than 0"]);
20419
20403
  }
20420
- if (data.components) {
20421
- for(var _iterator = _create_for_of_iterator_helper_loose(data.components), _step; !(_step = _iterator()).done;){
20422
- var component = _step.value;
20423
- var newComponent = component;
20424
- this.components.push(newComponent);
20425
- if (_instanceof1(newComponent, RendererComponent)) {
20426
- this.rendererComponents.push(newComponent);
20427
- } else if (_instanceof1(newComponent, ItemBehaviour)) {
20428
- this.itemBehaviours.push(newComponent);
20429
- }
20430
- }
20404
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
20405
+ var component = _step.value;
20406
+ component.onAttached();
20431
20407
  }
20408
+ // renderOrder 在 component 初始化后设置。确保能拿到 rendererComponent。
20409
+ this.renderOrder = listIndex;
20432
20410
  };
20433
20411
  _proto.toData = function toData() {
20434
20412
  var _this_parent;
@@ -20559,6 +20537,9 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
20559
20537
  ]);
20560
20538
  return VFXItem;
20561
20539
  }(EffectsObject);
20540
+ __decorate([
20541
+ serialize()
20542
+ ], exports.VFXItem.prototype, "components", void 0);
20562
20543
  exports.VFXItem = __decorate([
20563
20544
  effectsClass(DataType.VFXItemData)
20564
20545
  ], exports.VFXItem);
@@ -20788,22 +20769,22 @@ var SerializationHelper = /*#__PURE__*/ function() {
20788
20769
  if (value === undefined) {
20789
20770
  value = effectsObject[key];
20790
20771
  }
20791
- if (_instanceof1(value, EffectsObject)) {
20792
- this.collectSerializableObject(value, res);
20793
- } else if (_instanceof1(value, Array)) {
20772
+ if (EffectsObject.is(value)) {
20773
+ SerializationHelper.collectSerializableObject(value, res);
20774
+ } else if (isArray(value)) {
20794
20775
  for(var _iterator1 = _create_for_of_iterator_helper_loose(value), _step1; !(_step1 = _iterator1()).done;){
20795
20776
  var arrayValue = _step1.value;
20796
- if (_instanceof1(arrayValue, EffectsObject)) {
20797
- this.collectSerializableObject(arrayValue, res);
20777
+ if (EffectsObject.is(arrayValue)) {
20778
+ SerializationHelper.collectSerializableObject(arrayValue, res);
20798
20779
  }
20799
20780
  }
20800
- } else if (_instanceof1(value, Object)) {
20781
+ } else if (isObject(value)) {
20801
20782
  // 非 EffectsObject 对象只递归一层
20802
20783
  for(var _iterator2 = _create_for_of_iterator_helper_loose(Object.keys(value)), _step2; !(_step2 = _iterator2()).done;){
20803
20784
  var objectKey = _step2.value;
20804
20785
  var objectValue = value[objectKey];
20805
- if (_instanceof1(objectValue, EffectsObject)) {
20806
- this.collectSerializableObject(objectValue, res);
20786
+ if (EffectsObject.is(objectValue)) {
20787
+ SerializationHelper.collectSerializableObject(objectValue, res);
20807
20788
  }
20808
20789
  }
20809
20790
  }
@@ -20840,17 +20821,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
20840
20821
  if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(value)) {
20841
20822
  // TODO json 数据避免传 typedArray
20842
20823
  serializedData[key] = value;
20843
- } else if (_instanceof1(value, Array)) {
20824
+ } else if (isArray(value)) {
20844
20825
  if (!serializedData[key]) {
20845
20826
  serializedData[key] = [];
20846
20827
  }
20847
20828
  SerializationHelper.serializeArrayProperty(value, serializedData[key], 0);
20848
- } else if (_instanceof1(value, EffectsObject)) {
20829
+ } else if (EffectsObject.is(value)) {
20849
20830
  // TODO 处理 EffectsObject 递归序列化
20850
20831
  serializedData[key] = {
20851
20832
  id: value.getInstanceId()
20852
20833
  };
20853
- } else if (_instanceof1(value, Object)) {
20834
+ } else if (isObject(value)) {
20854
20835
  if (!serializedData[key]) {
20855
20836
  serializedData[key] = {};
20856
20837
  }
@@ -20864,17 +20845,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
20864
20845
  if (typeof value1 === "number" || typeof value1 === "string" || typeof value1 === "boolean" || SerializationHelper.checkTypedArray(value1)) {
20865
20846
  // TODO json 数据避免传 typedArray
20866
20847
  serializedData[key1] = value1;
20867
- } else if (_instanceof1(value1, Array)) {
20848
+ } else if (isArray(value1)) {
20868
20849
  if (!serializedData[key1]) {
20869
20850
  serializedData[key1] = [];
20870
20851
  }
20871
20852
  SerializationHelper.serializeArrayProperty(value1, serializedData[key1], 0);
20872
- } else if (_instanceof1(value1, EffectsObject)) {
20853
+ } else if (EffectsObject.is(value1)) {
20873
20854
  // TODO 处理 EffectsObject 递归序列化
20874
20855
  serializedData[key1] = {
20875
20856
  id: value1.getInstanceId()
20876
20857
  };
20877
- } else if (_instanceof1(value1, Object)) {
20858
+ } else if (isObject(value1)) {
20878
20859
  if (!serializedData[key1]) {
20879
20860
  serializedData[key1] = {};
20880
20861
  }
@@ -20987,13 +20968,13 @@ var SerializationHelper = /*#__PURE__*/ function() {
20987
20968
  SerializationHelper.checkTypedArray = function checkTypedArray(obj) {
20988
20969
  return _instanceof1(obj, Int8Array) || _instanceof1(obj, Uint8Array) || _instanceof1(obj, Uint8ClampedArray) || _instanceof1(obj, Int16Array) || _instanceof1(obj, Uint16Array) || _instanceof1(obj, Int32Array) || _instanceof1(obj, Uint32Array) || _instanceof1(obj, Float32Array) || _instanceof1(obj, Float64Array) || _instanceof1(obj, ArrayBuffer);
20989
20970
  };
20971
+ // check value is { id: 7e69662e964e4892ae8933f24562395b }
20990
20972
  SerializationHelper.checkDataPath = function checkDataPath(value) {
20991
- // check value is { id: 7e69662e964e4892ae8933f24562395b }
20992
- return _instanceof1(value, Object) && Object.keys(value).length === 1 && value.id && value.id.length === 32;
20973
+ return !!(isObject(value) && Object.keys(value).length === 1 && "id" in value && isString(value.id) && value.id.length === 32);
20993
20974
  };
20994
20975
  // TODO 测试函数,2.0 上线后移除
20995
20976
  SerializationHelper.checkGLTFNode = function checkGLTFNode(value) {
20996
- return _instanceof1(value, Object) && value.nodeIndex !== undefined && value.isJoint !== undefined;
20977
+ return isObject(value) && value.nodeIndex !== undefined && value.isJoint !== undefined;
20997
20978
  };
20998
20979
  SerializationHelper.checkImageSource = function checkImageSource(value) {
20999
20980
  return isCanvas(value) || _instanceof1(value, HTMLImageElement);
@@ -21004,7 +20985,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
21004
20985
  return;
21005
20986
  }
21006
20987
  // 加载并链接 DataPath 字段表示的 EffectsObject 引用。Class 对象 copy [key, value] 会丢失对象信息,因此只递归数组对象和普通 js Object 结构对象。
21007
- if (_instanceof1(property, Array)) {
20988
+ if (isArray(property)) {
21008
20989
  var res = [];
21009
20990
  for(var _iterator = _create_for_of_iterator_helper_loose(property), _step; !(_step = _iterator()).done;){
21010
20991
  var value = _step.value;
@@ -21014,17 +20995,15 @@ var SerializationHelper = /*#__PURE__*/ function() {
21014
20995
  // TODO json 数据避免传 typedArray
21015
20996
  } else if (SerializationHelper.checkDataPath(property)) {
21016
20997
  return engine.assetLoader.loadGUID(property.id);
21017
- } else if (_instanceof1(property, Object) && property.constructor === Object) {
20998
+ } else if (isObject(property) && property.constructor === Object) {
21018
20999
  var res1;
21019
21000
  if (type) {
21020
- var classConstructor = effectsClassStore[type];
21021
- res1 = new classConstructor();
21001
+ res1 = new type();
21022
21002
  } else {
21023
21003
  res1 = {};
21024
21004
  }
21025
21005
  for(var _iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property)), _step1; !(_step1 = _iterator1()).done;){
21026
21006
  var key = _step1.value;
21027
- // @ts-expect-error
21028
21007
  res1[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
21029
21008
  }
21030
21009
  return res1;
@@ -21034,7 +21013,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
21034
21013
  };
21035
21014
  SerializationHelper.deserializePropertyAsync = function deserializePropertyAsync(property, engine, level, type) {
21036
21015
  return _async_to_generator(function() {
21037
- var res, _iterator, _step, value, _, res1, res2, classConstructor, _iterator1, _step1, key;
21016
+ var res, _iterator, _step, value, _, res1, res2, _iterator1, _step1, key;
21038
21017
  return __generator(this, function(_state) {
21039
21018
  switch(_state.label){
21040
21019
  case 0:
@@ -21044,7 +21023,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
21044
21023
  2
21045
21024
  ];
21046
21025
  }
21047
- if (!_instanceof1(property, Array)) return [
21026
+ if (!isArray(property)) return [
21048
21027
  3,
21049
21028
  5
21050
21029
  ];
@@ -21093,16 +21072,14 @@ var SerializationHelper = /*#__PURE__*/ function() {
21093
21072
  res1
21094
21073
  ];
21095
21074
  case 7:
21096
- if (_instanceof1(property, Object) && property.constructor === Object) {
21075
+ if (isObject(property) && property.constructor === Object) {
21097
21076
  if (type) {
21098
- classConstructor = effectsClassStore[type];
21099
- res2 = new classConstructor();
21077
+ res2 = new type();
21100
21078
  } else {
21101
21079
  res2 = {};
21102
21080
  }
21103
21081
  for(_iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property)); !(_step1 = _iterator1()).done;){
21104
21082
  key = _step1.value;
21105
- // @ts-expect-error
21106
21083
  res2[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
21107
21084
  }
21108
21085
  return [
@@ -21137,17 +21114,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
21137
21114
  if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(objectProperty)) {
21138
21115
  // TODO json 数据避免传 typedArray
21139
21116
  serializedData[key] = value;
21140
- } else if (_instanceof1(value, Array)) {
21117
+ } else if (isArray(value)) {
21141
21118
  if (!serializedData[key]) {
21142
21119
  serializedData[key] = [];
21143
21120
  }
21144
21121
  SerializationHelper.serializeArrayProperty(value, serializedData[key], level + 1);
21145
- } else if (_instanceof1(value, EffectsObject)) {
21122
+ } else if (EffectsObject.is(value)) {
21146
21123
  // TODO 处理 EffectsObject 递归序列化
21147
21124
  serializedData[key] = {
21148
21125
  id: value.getInstanceId()
21149
21126
  };
21150
- } else if (_instanceof1(value, Object)) {
21127
+ } else if (isObject(value)) {
21151
21128
  if (!serializedData[key]) {
21152
21129
  serializedData[key] = {};
21153
21130
  }
@@ -21168,17 +21145,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
21168
21145
  if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(arrayProperty)) {
21169
21146
  // TODO json 数据避免传 typedArray
21170
21147
  serializedData[i] = value;
21171
- } else if (_instanceof1(value, Array)) {
21148
+ } else if (isArray(value)) {
21172
21149
  if (!serializedData[i]) {
21173
21150
  serializedData[i] = [];
21174
21151
  }
21175
- this.serializeArrayProperty(value, serializedData[i], level + 1);
21176
- } else if (_instanceof1(value, EffectsObject)) {
21152
+ SerializationHelper.serializeArrayProperty(value, serializedData[i], level + 1);
21153
+ } else if (EffectsObject.is(value)) {
21177
21154
  // TODO 处理 EffectsObject 递归序列化
21178
21155
  serializedData[i] = {
21179
21156
  id: value.getInstanceId()
21180
21157
  };
21181
- } else if (_instanceof1(value, Object)) {
21158
+ } else if (isObject(value)) {
21182
21159
  if (!serializedData[i]) {
21183
21160
  serializedData[i] = {};
21184
21161
  }
@@ -22218,8 +22195,6 @@ function getStandardCameraContent(model) {
22218
22195
  // 生成时间轴数据
22219
22196
  convertTimelineAsset(compositionData, guidToItemMap, result);
22220
22197
  };
22221
- var // 更正 spine 数据中的 images 属性
22222
- _json_spines;
22223
22198
  var // 兼容老版本数据中不存在textures的情况
22224
22199
  _result;
22225
22200
  var result = _extends({}, json, {
@@ -22229,7 +22204,8 @@ function getStandardCameraContent(model) {
22229
22204
  materials: [],
22230
22205
  shaders: [],
22231
22206
  geometries: [],
22232
- animations: []
22207
+ animations: [],
22208
+ miscs: []
22233
22209
  });
22234
22210
  // image数据添加 guid
22235
22211
  for(var _iterator = _create_for_of_iterator_helper_loose(result.images), _step; !(_step = _iterator()).done;){
@@ -22259,17 +22235,10 @@ function getStandardCameraContent(model) {
22259
22235
  });
22260
22236
  }
22261
22237
  }
22262
- (_json_spines = json.spines) == null ? void 0 : _json_spines.forEach(function(spine) {
22263
- for(var i = 0; i < spine.images.length; i++){
22264
- var _json_textures_spine_images_i;
22265
- //@ts-expect-error
22266
- var textureId = (_json_textures_spine_images_i = json.textures[spine.images[i]]) == null ? void 0 : _json_textures_spine_images_i.id;
22267
- //@ts-expect-error
22268
- spine.images[i] = {
22269
- id: textureId
22270
- };
22271
- }
22272
- });
22238
+ // 处理老版本数据中 bins 没有 id 的情况
22239
+ if (json.bins) {
22240
+ convertBinaryAsset(json.bins, result);
22241
+ }
22273
22242
  var itemOldIdToGuidMap = {};
22274
22243
  var guidToItemMap = {};
22275
22244
  // 更正Composition.endBehavior
@@ -22433,6 +22402,10 @@ function getStandardCameraContent(model) {
22433
22402
  //@ts-expect-error
22434
22403
  item.type = "orientation-transformer";
22435
22404
  }
22405
+ // Spine 元素转为 guid 索引
22406
+ if (item.type === ItemType.spine && json.spines && json.spines.length !== 0) {
22407
+ convertSpineData(json.spines[item.content.options.spine], item.content, result);
22408
+ }
22436
22409
  // item 的 content 转为 component data 加入 JSONScene.components
22437
22410
  if (item.type === ItemType.sprite || item.type === ItemType.particle || item.type === ItemType.mesh || item.type === ItemType.skybox || item.type === ItemType.light || item.type === "camera" || item.type === ItemType.tree || item.type === ItemType.interact || item.type === ItemType.camera || item.type === ItemType.text || item.type === ItemType.spine || item.type === "editor-gizmo" || item.type === "orientation-transformer") {
22438
22411
  item.components = [];
@@ -22680,22 +22653,54 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
22680
22653
  id: timelineAssetData.id
22681
22654
  };
22682
22655
  composition.sceneBindings = sceneBindings;
22683
- if (!jsonScene.animations) {
22684
- jsonScene.animations = [];
22685
- }
22686
- // @ts-expect-error
22687
- jsonScene.animations.push(timelineAssetData);
22656
+ jsonScene.miscs.push(timelineAssetData);
22688
22657
  for(var _iterator2 = _create_for_of_iterator_helper_loose(trackDatas), _step2; !(_step2 = _iterator2()).done;){
22689
22658
  var trackData1 = _step2.value;
22690
22659
  //@ts-expect-error
22691
- jsonScene.animations.push(trackData1);
22660
+ jsonScene.miscs.push(trackData1);
22692
22661
  }
22693
22662
  for(var _iterator3 = _create_for_of_iterator_helper_loose(playableAssetDatas), _step3; !(_step3 = _iterator3()).done;){
22694
22663
  var playableAsset = _step3.value;
22695
22664
  //@ts-expect-error
22696
- jsonScene.animations.push(playableAsset);
22665
+ jsonScene.miscs.push(playableAsset);
22697
22666
  }
22698
22667
  }
22668
+ function convertBinaryAsset(bins, jsonScene) {
22669
+ //@ts-expect-error
22670
+ jsonScene.bins = bins.map(function(bin) {
22671
+ return {
22672
+ url: bin.url,
22673
+ "dataType": "BinaryAsset",
22674
+ id: generateGUID()
22675
+ };
22676
+ });
22677
+ }
22678
+ function convertSpineData(resource, content, jsonScene) {
22679
+ //@ts-expect-error
22680
+ content.resource = {
22681
+ "atlas": {
22682
+ "bins": {
22683
+ //@ts-expect-error
22684
+ "id": jsonScene.bins[resource.atlas[1][0]].id
22685
+ },
22686
+ "source": resource.atlas[1].slice(1)
22687
+ },
22688
+ "skeleton": {
22689
+ "bins": {
22690
+ //@ts-expect-error
22691
+ "id": jsonScene.bins[resource.skeleton[1][0]].id
22692
+ },
22693
+ "source": resource.skeleton[1].slice(1)
22694
+ },
22695
+ "skeletonType": resource.skeletonType,
22696
+ "images": resource.images.map(function(i) {
22697
+ return {
22698
+ //@ts-expect-error
22699
+ id: jsonScene.textures[i].id
22700
+ };
22701
+ })
22702
+ };
22703
+ }
22699
22704
 
22700
22705
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
22701
22706
  var standardVersion = /^(\d+)\.(\d+)$/;
@@ -23441,7 +23446,7 @@ var seed$1 = 1;
23441
23446
  return [
23442
23447
  4,
23443
23448
  new Promise(function(resolve) {
23444
- shaderLibrary.compileAllShaders(function() {
23449
+ shaderLibrary == null ? void 0 : shaderLibrary.compileAllShaders(function() {
23445
23450
  resolve(null);
23446
23451
  });
23447
23452
  })
@@ -25255,7 +25260,7 @@ var listOrder = 0;
25255
25260
  };
25256
25261
  _proto.addPackageDatas = function addPackageDatas(scene) {
25257
25262
  var jsonScene = scene.jsonScene, _scene_textureOptions = scene.textureOptions, textureOptions = _scene_textureOptions === void 0 ? [] : _scene_textureOptions;
25258
- var _jsonScene_items = jsonScene.items, items = _jsonScene_items === void 0 ? [] : _jsonScene_items, _jsonScene_materials = jsonScene.materials, materials = _jsonScene_materials === void 0 ? [] : _jsonScene_materials, _jsonScene_shaders = jsonScene.shaders, shaders = _jsonScene_shaders === void 0 ? [] : _jsonScene_shaders, _jsonScene_geometries = jsonScene.geometries, geometries = _jsonScene_geometries === void 0 ? [] : _jsonScene_geometries, _jsonScene_components = jsonScene.components, components = _jsonScene_components === void 0 ? [] : _jsonScene_components, _jsonScene_animations = jsonScene.animations, animations = _jsonScene_animations === void 0 ? [] : _jsonScene_animations, _jsonScene_bins = jsonScene.bins, bins = _jsonScene_bins === void 0 ? [] : _jsonScene_bins;
25263
+ var _jsonScene_items = jsonScene.items, items = _jsonScene_items === void 0 ? [] : _jsonScene_items, _jsonScene_materials = jsonScene.materials, materials = _jsonScene_materials === void 0 ? [] : _jsonScene_materials, _jsonScene_shaders = jsonScene.shaders, shaders = _jsonScene_shaders === void 0 ? [] : _jsonScene_shaders, _jsonScene_geometries = jsonScene.geometries, geometries = _jsonScene_geometries === void 0 ? [] : _jsonScene_geometries, _jsonScene_components = jsonScene.components, components = _jsonScene_components === void 0 ? [] : _jsonScene_components, _jsonScene_animations = jsonScene.animations, animations = _jsonScene_animations === void 0 ? [] : _jsonScene_animations, _jsonScene_bins = jsonScene.bins, bins = _jsonScene_bins === void 0 ? [] : _jsonScene_bins, _jsonScene_miscs = jsonScene.miscs, miscs = _jsonScene_miscs === void 0 ? [] : _jsonScene_miscs;
25259
25264
  for(var _iterator = _create_for_of_iterator_helper_loose(items), _step; !(_step = _iterator()).done;){
25260
25265
  var vfxItemData = _step.value;
25261
25266
  this.addEffectsObjectData(vfxItemData);
@@ -25280,6 +25285,10 @@ var listOrder = 0;
25280
25285
  var animationData = _step5.value;
25281
25286
  this.addEffectsObjectData(animationData);
25282
25287
  }
25288
+ for(var _iterator6 = _create_for_of_iterator_helper_loose(miscs), _step6; !(_step6 = _iterator6()).done;){
25289
+ var miscData = _step6.value;
25290
+ this.addEffectsObjectData(miscData);
25291
+ }
25283
25292
  for(var i = 0; i < bins.length; i++){
25284
25293
  var binaryData = bins[i];
25285
25294
  var binaryBuffer = scene.bins[i];
@@ -25291,8 +25300,8 @@ var listOrder = 0;
25291
25300
  this.addEffectsObjectData(binaryData);
25292
25301
  }
25293
25302
  }
25294
- for(var _iterator6 = _create_for_of_iterator_helper_loose(textureOptions), _step6; !(_step6 = _iterator6()).done;){
25295
- var textureData = _step6.value;
25303
+ for(var _iterator7 = _create_for_of_iterator_helper_loose(textureOptions), _step7; !(_step7 = _iterator7()).done;){
25304
+ var textureData = _step7.value;
25296
25305
  this.addEffectsObjectData(textureData);
25297
25306
  }
25298
25307
  };
@@ -26660,6 +26669,14 @@ var seed = 1;
26660
26669
  */ _proto.dispose = function dispose() {
26661
26670
  this.texture.dispose();
26662
26671
  };
26672
+ /**
26673
+ * 通过图层设置创建贴图
26674
+ * @param data - 图层设置
26675
+ */ _proto.fromData = function fromData(data) {
26676
+ Texture.prototype.fromData.call(this, data);
26677
+ this.texture = this.createTextureByType(data);
26678
+ this.texture.needsUpdate = true;
26679
+ };
26663
26680
  _proto.createTextureByType = function createTextureByType(options) {
26664
26681
  var assembleOptions = this.assembleOptions(options);
26665
26682
  // TODO renderer.getMaxAnisotropy() 查询最大各向异性
@@ -27180,7 +27197,7 @@ setMaxSpriteMeshItemCount(8);
27180
27197
  */ Mesh.create = function(engine, props) {
27181
27198
  return new ThreeMesh(engine, props);
27182
27199
  };
27183
- var version = "2.0.0-alpha.16";
27200
+ var version = "2.0.0-alpha.17";
27184
27201
  logger.info("THREEJS plugin version: " + version);
27185
27202
 
27186
27203
  exports.AbstractPlugin = AbstractPlugin;
@@ -27273,7 +27290,9 @@ exports.SpriteLoader = SpriteLoader;
27273
27290
  exports.StaticValue = StaticValue;
27274
27291
  exports.TEMPLATE_USE_OFFSCREEN_CANVAS = TEMPLATE_USE_OFFSCREEN_CANVAS;
27275
27292
  exports.TEXTURE_UNIFORM_MAP = TEXTURE_UNIFORM_MAP;
27293
+ exports.TextLayout = TextLayout;
27276
27294
  exports.TextLoader = TextLoader;
27295
+ exports.TextStyle = TextStyle;
27277
27296
  exports.Texture = Texture;
27278
27297
  exports.TextureFactory = TextureFactory;
27279
27298
  exports.ThreeComposition = ThreeComposition;
@@ -27282,6 +27301,7 @@ exports.ThreeEngine = ThreeEngine;
27282
27301
  exports.ThreeMaterial = ThreeMaterial;
27283
27302
  exports.ThreeTexture = ThreeTexture;
27284
27303
  exports.Ticker = Ticker;
27304
+ exports.TimelineClip = TimelineClip;
27285
27305
  exports.TimelinePlayable = TimelinePlayable;
27286
27306
  exports.TrackSortWrapper = TrackSortWrapper;
27287
27307
  exports.Transform = Transform;
@@ -27310,7 +27330,6 @@ exports.createShape = createShape;
27310
27330
  exports.createVFXItem = createVFXItem;
27311
27331
  exports.createValueGetter = createValueGetter;
27312
27332
  exports.decimalEqual = decimalEqual;
27313
- exports.deepClone = deepClone;
27314
27333
  exports.defaultGlobalVolume = defaultGlobalVolume;
27315
27334
  exports.defaultPlugins = defaultPlugins;
27316
27335
  exports.deserializeMipmapTexture = deserializeMipmapTexture;
@@ -27397,7 +27416,7 @@ exports.particleUniformTypeMap = particleUniformTypeMap;
27397
27416
  exports.particleVert = particleVert;
27398
27417
  exports.pluginLoaderMap = pluginLoaderMap;
27399
27418
  exports.pointOnLine = pointOnLine;
27400
- exports.random = random;
27419
+ exports.randomInRange = randomInRange;
27401
27420
  exports.registerPlugin = registerPlugin;
27402
27421
  exports.removeItem = removeItem;
27403
27422
  exports.rotateVec2 = rotateVec2;