@galacean/effects-threejs 2.0.0-alpha.1 → 2.0.0-alpha.3

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.mjs 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.1
6
+ * Version: v2.0.0-alpha.3
7
7
  */
8
8
 
9
9
  import * as THREE from 'three';
@@ -7340,275 +7340,6 @@ function generateSerializableMember(type, sourceName) {
7340
7340
  };
7341
7341
  }
7342
7342
 
7343
- /**
7344
- * @since 2.0.0
7345
- * @internal
7346
- */
7347
- var EffectsObject = /** @class */ (function () {
7348
- function EffectsObject(engine) {
7349
- this.engine = engine;
7350
- this.guid = generateGUID();
7351
- this.taggedProperties = {};
7352
- this.engine.addInstance(this);
7353
- }
7354
- EffectsObject.prototype.getInstanceId = function () {
7355
- return this.guid;
7356
- };
7357
- EffectsObject.prototype.setInstanceId = function (guid) {
7358
- this.engine.removeInstance(this.guid);
7359
- this.guid = guid;
7360
- this.engine.addInstance(this);
7361
- };
7362
- EffectsObject.prototype.toData = function () { };
7363
- /**
7364
- * 反序列化函数
7365
- *
7366
- * @param data - 对象的序列化的数据
7367
- */
7368
- EffectsObject.prototype.fromData = function (data) {
7369
- if (data.id) {
7370
- this.setInstanceId(data.id);
7371
- }
7372
- };
7373
- EffectsObject.prototype.dispose = function () { };
7374
- __decorate([
7375
- serialize()
7376
- ], EffectsObject.prototype, "guid", void 0);
7377
- return EffectsObject;
7378
- }());
7379
-
7380
- /**
7381
- * @since 2.0.0
7382
- * @internal
7383
- */
7384
- var Component = /** @class */ (function (_super) {
7385
- __extends(Component, _super);
7386
- function Component() {
7387
- return _super !== null && _super.apply(this, arguments) || this;
7388
- }
7389
- Object.defineProperty(Component.prototype, "transform", {
7390
- /**
7391
- * 附加到的 VFXItem 对象 Transform 组件
7392
- */
7393
- get: function () {
7394
- return this.item.transform;
7395
- },
7396
- enumerable: false,
7397
- configurable: true
7398
- });
7399
- Component.prototype.onAttached = function () { };
7400
- Component.prototype.onDestroy = function () { };
7401
- Component.prototype.fromData = function (data) {
7402
- _super.prototype.fromData.call(this, data);
7403
- if (data.item) {
7404
- this.item = data.item;
7405
- }
7406
- };
7407
- Component.prototype.dispose = function () {
7408
- this.onDestroy();
7409
- if (this.item) {
7410
- removeItem(this.item.components, this);
7411
- }
7412
- };
7413
- return Component;
7414
- }(EffectsObject));
7415
- /**
7416
- * @since 2.0.0
7417
- * @internal
7418
- */
7419
- var Behaviour = /** @class */ (function (_super) {
7420
- __extends(Behaviour, _super);
7421
- function Behaviour() {
7422
- var _this = _super !== null && _super.apply(this, arguments) || this;
7423
- _this._enabled = true;
7424
- return _this;
7425
- }
7426
- Object.defineProperty(Behaviour.prototype, "isActiveAndEnabled", {
7427
- /**
7428
- * 组件是否可以更新,true 更新,false 不更新
7429
- */
7430
- get: function () {
7431
- return this.item.getVisible() && this.enabled;
7432
- },
7433
- enumerable: false,
7434
- configurable: true
7435
- });
7436
- Object.defineProperty(Behaviour.prototype, "enabled", {
7437
- get: function () {
7438
- return this._enabled;
7439
- },
7440
- set: function (value) {
7441
- this._enabled = value;
7442
- if (value) {
7443
- this.onBehaviourEnable();
7444
- }
7445
- },
7446
- enumerable: false,
7447
- configurable: true
7448
- });
7449
- Behaviour.prototype.onBehaviourEnable = function () { };
7450
- Behaviour.prototype.fromData = function (data) {
7451
- _super.prototype.fromData.call(this, data);
7452
- };
7453
- Behaviour.prototype.toData = function () {
7454
- _super.prototype.toData.call(this);
7455
- };
7456
- __decorate([
7457
- serialize()
7458
- ], Behaviour.prototype, "_enabled", void 0);
7459
- return Behaviour;
7460
- }(Component));
7461
- /**
7462
- * @since 2.0.0
7463
- * @internal
7464
- */
7465
- var ItemBehaviour = /** @class */ (function (_super) {
7466
- __extends(ItemBehaviour, _super);
7467
- function ItemBehaviour() {
7468
- var _this = _super !== null && _super.apply(this, arguments) || this;
7469
- _this.started = false;
7470
- return _this;
7471
- }
7472
- // /**
7473
- // * 生命周期函数,初始化后调用,生命周期内只调用一次
7474
- // */
7475
- // awake () {
7476
- // // OVERRIDE
7477
- // }
7478
- /**
7479
- * 在每次设置 enabled 为 true 时触发
7480
- */
7481
- ItemBehaviour.prototype.onEnable = function () { };
7482
- /**
7483
- * 生命周期函数,在第一次 update 前调用,生命周期内只调用一次
7484
- */
7485
- ItemBehaviour.prototype.start = function () {
7486
- // OVERRIDE
7487
- };
7488
- /**
7489
- * 生命周期函数,每帧调用一次
7490
- */
7491
- ItemBehaviour.prototype.update = function (dt) {
7492
- // OVERRIDE
7493
- };
7494
- /**
7495
- * 生命周期函数,每帧调用一次,在 update 之后调用
7496
- */
7497
- ItemBehaviour.prototype.lateUpdate = function (dt) {
7498
- // OVERRIDE
7499
- };
7500
- ItemBehaviour.prototype.onAttached = function () {
7501
- this.item.itemBehaviours.push(this);
7502
- };
7503
- ItemBehaviour.prototype.dispose = function () {
7504
- if (this.item) {
7505
- removeItem(this.item.itemBehaviours, this);
7506
- }
7507
- _super.prototype.dispose.call(this);
7508
- };
7509
- ItemBehaviour.prototype.onBehaviourEnable = function () {
7510
- this.onEnable();
7511
- if (!this.started) {
7512
- this.start();
7513
- this.started = true;
7514
- }
7515
- };
7516
- return ItemBehaviour;
7517
- }(Behaviour));
7518
-
7519
- /**
7520
- * 所有渲染组件的基类
7521
- * @since 2.0.0
7522
- */
7523
- var RendererComponent = /** @class */ (function (_super) {
7524
- __extends(RendererComponent, _super);
7525
- function RendererComponent() {
7526
- var _this = _super !== null && _super.apply(this, arguments) || this;
7527
- _this.started = false;
7528
- _this.materials = [];
7529
- _this._enabled = true;
7530
- return _this;
7531
- }
7532
- Object.defineProperty(RendererComponent.prototype, "priority", {
7533
- get: function () {
7534
- return this._priority;
7535
- },
7536
- set: function (value) {
7537
- this._priority = value;
7538
- },
7539
- enumerable: false,
7540
- configurable: true
7541
- });
7542
- Object.defineProperty(RendererComponent.prototype, "enabled", {
7543
- get: function () {
7544
- return this._enabled;
7545
- },
7546
- set: function (value) {
7547
- this._enabled = value;
7548
- if (value) {
7549
- this.onEnable();
7550
- }
7551
- },
7552
- enumerable: false,
7553
- configurable: true
7554
- });
7555
- Object.defineProperty(RendererComponent.prototype, "isActiveAndEnabled", {
7556
- /**
7557
- * 组件是否可以更新,true 更新,false 不更新
7558
- */
7559
- get: function () {
7560
- return this.item.getVisible() && this.enabled;
7561
- },
7562
- enumerable: false,
7563
- configurable: true
7564
- });
7565
- Object.defineProperty(RendererComponent.prototype, "material", {
7566
- get: function () {
7567
- return this.materials[0];
7568
- },
7569
- set: function (material) {
7570
- if (this.materials.length === 0) {
7571
- this.materials.push(material);
7572
- }
7573
- else {
7574
- this.materials[0] = material;
7575
- }
7576
- },
7577
- enumerable: false,
7578
- configurable: true
7579
- });
7580
- RendererComponent.prototype.onEnable = function () { };
7581
- RendererComponent.prototype.start = function () { };
7582
- RendererComponent.prototype.update = function (dt) { };
7583
- RendererComponent.prototype.lateUpdate = function (dt) { };
7584
- RendererComponent.prototype.render = function (renderer) { };
7585
- RendererComponent.prototype.onAttached = function () {
7586
- this.item.rendererComponents.push(this);
7587
- };
7588
- RendererComponent.prototype.fromData = function (data) {
7589
- _super.prototype.fromData.call(this, data);
7590
- };
7591
- RendererComponent.prototype.toData = function () {
7592
- _super.prototype.toData.call(this);
7593
- };
7594
- RendererComponent.prototype.dispose = function () {
7595
- if (this.item) {
7596
- removeItem(this.item.rendererComponents, this);
7597
- }
7598
- _super.prototype.dispose.call(this);
7599
- };
7600
- __decorate([
7601
- serialize()
7602
- ], RendererComponent.prototype, "materials", void 0);
7603
- __decorate([
7604
- serialize()
7605
- ], RendererComponent.prototype, "_priority", void 0);
7606
- __decorate([
7607
- serialize()
7608
- ], RendererComponent.prototype, "_enabled", void 0);
7609
- return RendererComponent;
7610
- }(Component));
7611
-
7612
7343
  var ShaderType;
7613
7344
  (function (ShaderType) {
7614
7345
  ShaderType[ShaderType["vertex"] = 0] = "vertex";
@@ -8195,6 +7926,43 @@ function loadMipmapImage(pointer, bins) {
8195
7926
  });
8196
7927
  }
8197
7928
 
7929
+ /**
7930
+ * @since 2.0.0
7931
+ * @internal
7932
+ */
7933
+ var EffectsObject = /** @class */ (function () {
7934
+ function EffectsObject(engine) {
7935
+ this.engine = engine;
7936
+ this.guid = generateGUID();
7937
+ this.taggedProperties = {};
7938
+ this.engine.addInstance(this);
7939
+ }
7940
+ EffectsObject.prototype.getInstanceId = function () {
7941
+ return this.guid;
7942
+ };
7943
+ EffectsObject.prototype.setInstanceId = function (guid) {
7944
+ this.engine.removeInstance(this.guid);
7945
+ this.guid = guid;
7946
+ this.engine.addInstance(this);
7947
+ };
7948
+ EffectsObject.prototype.toData = function () { };
7949
+ /**
7950
+ * 反序列化函数
7951
+ *
7952
+ * @param data - 对象的序列化的数据
7953
+ */
7954
+ EffectsObject.prototype.fromData = function (data) {
7955
+ if (data.id) {
7956
+ this.setInstanceId(data.id);
7957
+ }
7958
+ };
7959
+ EffectsObject.prototype.dispose = function () { };
7960
+ __decorate([
7961
+ serialize()
7962
+ ], EffectsObject.prototype, "guid", void 0);
7963
+ return EffectsObject;
7964
+ }());
7965
+
8198
7966
  var seed$a = 1;
8199
7967
  /**
8200
7968
  * Texture 抽象类
@@ -9005,54 +8773,286 @@ var SemanticMap = /** @class */ (function () {
9005
8773
  SemanticMap.prototype.hasSemanticValue = function (name) {
9006
8774
  return name in this.semantics;
9007
8775
  };
9008
- SemanticMap.prototype.dispose = function () {
9009
- var _this = this;
9010
- Object.keys(this.semantics).forEach(function (name) {
9011
- delete _this.semantics[name];
9012
- });
8776
+ SemanticMap.prototype.dispose = function () {
8777
+ var _this = this;
8778
+ Object.keys(this.semantics).forEach(function (name) {
8779
+ delete _this.semantics[name];
8780
+ });
8781
+ };
8782
+ return SemanticMap;
8783
+ }());
8784
+
8785
+ var _a$5;
8786
+ var BYTES_TYPE_MAP = (_a$5 = {},
8787
+ _a$5[glContext.FLOAT] = Float32Array.BYTES_PER_ELEMENT,
8788
+ _a$5[glContext.INT] = Int32Array.BYTES_PER_ELEMENT,
8789
+ _a$5[glContext.SHORT] = Int16Array.BYTES_PER_ELEMENT,
8790
+ _a$5[glContext.BYTE] = Int8Array.BYTES_PER_ELEMENT,
8791
+ _a$5);
8792
+ /**
8793
+ * Geometry 抽象类
8794
+ */
8795
+ var Geometry = /** @class */ (function (_super) {
8796
+ __extends(Geometry, _super);
8797
+ function Geometry() {
8798
+ return _super !== null && _super.apply(this, arguments) || this;
8799
+ }
8800
+ /**
8801
+ * 初始化 GPU 资源
8802
+ * @override
8803
+ */
8804
+ Geometry.prototype.initialize = function () {
8805
+ // OVERRIDE
8806
+ };
8807
+ /**
8808
+ * 几何数据刷新
8809
+ */
8810
+ Geometry.prototype.flush = function () {
8811
+ // OVERRIDE
8812
+ };
8813
+ return Geometry;
8814
+ }(EffectsObject));
8815
+ function generateEmptyTypedArray(type) {
8816
+ if (type === glContext.INT) {
8817
+ return new Int32Array(0);
8818
+ }
8819
+ if (type === glContext.SHORT) {
8820
+ return new Int16Array(0);
8821
+ }
8822
+ return new Float32Array(0);
8823
+ }
8824
+
8825
+ /**
8826
+ * @since 2.0.0
8827
+ * @internal
8828
+ */
8829
+ var Component = /** @class */ (function (_super) {
8830
+ __extends(Component, _super);
8831
+ function Component() {
8832
+ return _super !== null && _super.apply(this, arguments) || this;
8833
+ }
8834
+ Object.defineProperty(Component.prototype, "transform", {
8835
+ /**
8836
+ * 附加到的 VFXItem 对象 Transform 组件
8837
+ */
8838
+ get: function () {
8839
+ return this.item.transform;
8840
+ },
8841
+ enumerable: false,
8842
+ configurable: true
8843
+ });
8844
+ Component.prototype.onAttached = function () { };
8845
+ Component.prototype.onDestroy = function () { };
8846
+ Component.prototype.fromData = function (data) {
8847
+ _super.prototype.fromData.call(this, data);
8848
+ if (data.item) {
8849
+ this.item = data.item;
8850
+ }
8851
+ };
8852
+ Component.prototype.dispose = function () {
8853
+ this.onDestroy();
8854
+ if (this.item) {
8855
+ removeItem(this.item.components, this);
8856
+ }
8857
+ };
8858
+ return Component;
8859
+ }(EffectsObject));
8860
+ /**
8861
+ * @since 2.0.0
8862
+ * @internal
8863
+ */
8864
+ var Behaviour = /** @class */ (function (_super) {
8865
+ __extends(Behaviour, _super);
8866
+ function Behaviour() {
8867
+ var _this = _super !== null && _super.apply(this, arguments) || this;
8868
+ _this._enabled = true;
8869
+ return _this;
8870
+ }
8871
+ Object.defineProperty(Behaviour.prototype, "isActiveAndEnabled", {
8872
+ /**
8873
+ * 组件是否可以更新,true 更新,false 不更新
8874
+ */
8875
+ get: function () {
8876
+ return this.item.getVisible() && this.enabled;
8877
+ },
8878
+ enumerable: false,
8879
+ configurable: true
8880
+ });
8881
+ Object.defineProperty(Behaviour.prototype, "enabled", {
8882
+ get: function () {
8883
+ return this._enabled;
8884
+ },
8885
+ set: function (value) {
8886
+ this._enabled = value;
8887
+ if (value) {
8888
+ this.onBehaviourEnable();
8889
+ }
8890
+ },
8891
+ enumerable: false,
8892
+ configurable: true
8893
+ });
8894
+ Behaviour.prototype.onBehaviourEnable = function () { };
8895
+ Behaviour.prototype.fromData = function (data) {
8896
+ _super.prototype.fromData.call(this, data);
8897
+ };
8898
+ Behaviour.prototype.toData = function () {
8899
+ _super.prototype.toData.call(this);
9013
8900
  };
9014
- return SemanticMap;
9015
- }());
9016
-
9017
- var _a$5;
9018
- var BYTES_TYPE_MAP = (_a$5 = {},
9019
- _a$5[glContext.FLOAT] = Float32Array.BYTES_PER_ELEMENT,
9020
- _a$5[glContext.INT] = Int32Array.BYTES_PER_ELEMENT,
9021
- _a$5[glContext.SHORT] = Int16Array.BYTES_PER_ELEMENT,
9022
- _a$5[glContext.BYTE] = Int8Array.BYTES_PER_ELEMENT,
9023
- _a$5);
8901
+ __decorate([
8902
+ serialize()
8903
+ ], Behaviour.prototype, "_enabled", void 0);
8904
+ return Behaviour;
8905
+ }(Component));
9024
8906
  /**
9025
- * Geometry 抽象类
8907
+ * @since 2.0.0
8908
+ * @internal
9026
8909
  */
9027
- var Geometry = /** @class */ (function (_super) {
9028
- __extends(Geometry, _super);
9029
- function Geometry() {
9030
- return _super !== null && _super.apply(this, arguments) || this;
8910
+ var ItemBehaviour = /** @class */ (function (_super) {
8911
+ __extends(ItemBehaviour, _super);
8912
+ function ItemBehaviour() {
8913
+ var _this = _super !== null && _super.apply(this, arguments) || this;
8914
+ _this.started = false;
8915
+ return _this;
9031
8916
  }
8917
+ // /**
8918
+ // * 生命周期函数,初始化后调用,生命周期内只调用一次
8919
+ // */
8920
+ // awake () {
8921
+ // // OVERRIDE
8922
+ // }
9032
8923
  /**
9033
- * 初始化 GPU 资源
9034
- * @override
8924
+ * 在每次设置 enabled 为 true 时触发
9035
8925
  */
9036
- Geometry.prototype.initialize = function () {
8926
+ ItemBehaviour.prototype.onEnable = function () { };
8927
+ /**
8928
+ * 生命周期函数,在第一次 update 前调用,生命周期内只调用一次
8929
+ */
8930
+ ItemBehaviour.prototype.start = function () {
9037
8931
  // OVERRIDE
9038
8932
  };
9039
8933
  /**
9040
- * 几何数据刷新
8934
+ * 生命周期函数,每帧调用一次
9041
8935
  */
9042
- Geometry.prototype.flush = function () {
8936
+ ItemBehaviour.prototype.update = function (dt) {
9043
8937
  // OVERRIDE
9044
8938
  };
9045
- return Geometry;
9046
- }(EffectsObject));
9047
- function generateEmptyTypedArray(type) {
9048
- if (type === glContext.INT) {
9049
- return new Int32Array(0);
9050
- }
9051
- if (type === glContext.SHORT) {
9052
- return new Int16Array(0);
8939
+ /**
8940
+ * 生命周期函数,每帧调用一次,在 update 之后调用
8941
+ */
8942
+ ItemBehaviour.prototype.lateUpdate = function (dt) {
8943
+ // OVERRIDE
8944
+ };
8945
+ ItemBehaviour.prototype.onAttached = function () {
8946
+ this.item.itemBehaviours.push(this);
8947
+ };
8948
+ ItemBehaviour.prototype.dispose = function () {
8949
+ if (this.item) {
8950
+ removeItem(this.item.itemBehaviours, this);
8951
+ }
8952
+ _super.prototype.dispose.call(this);
8953
+ };
8954
+ ItemBehaviour.prototype.onBehaviourEnable = function () {
8955
+ this.onEnable();
8956
+ if (!this.started) {
8957
+ this.start();
8958
+ this.started = true;
8959
+ }
8960
+ };
8961
+ return ItemBehaviour;
8962
+ }(Behaviour));
8963
+
8964
+ /**
8965
+ * 所有渲染组件的基类
8966
+ * @since 2.0.0
8967
+ */
8968
+ var RendererComponent = /** @class */ (function (_super) {
8969
+ __extends(RendererComponent, _super);
8970
+ function RendererComponent() {
8971
+ var _this = _super !== null && _super.apply(this, arguments) || this;
8972
+ _this.started = false;
8973
+ _this.materials = [];
8974
+ _this._enabled = true;
8975
+ return _this;
9053
8976
  }
9054
- return new Float32Array(0);
9055
- }
8977
+ Object.defineProperty(RendererComponent.prototype, "priority", {
8978
+ get: function () {
8979
+ return this._priority;
8980
+ },
8981
+ set: function (value) {
8982
+ this._priority = value;
8983
+ },
8984
+ enumerable: false,
8985
+ configurable: true
8986
+ });
8987
+ Object.defineProperty(RendererComponent.prototype, "enabled", {
8988
+ get: function () {
8989
+ return this._enabled;
8990
+ },
8991
+ set: function (value) {
8992
+ this._enabled = value;
8993
+ if (value) {
8994
+ this.onEnable();
8995
+ }
8996
+ },
8997
+ enumerable: false,
8998
+ configurable: true
8999
+ });
9000
+ Object.defineProperty(RendererComponent.prototype, "isActiveAndEnabled", {
9001
+ /**
9002
+ * 组件是否可以更新,true 更新,false 不更新
9003
+ */
9004
+ get: function () {
9005
+ return this.item.getVisible() && this.enabled;
9006
+ },
9007
+ enumerable: false,
9008
+ configurable: true
9009
+ });
9010
+ Object.defineProperty(RendererComponent.prototype, "material", {
9011
+ get: function () {
9012
+ return this.materials[0];
9013
+ },
9014
+ set: function (material) {
9015
+ if (this.materials.length === 0) {
9016
+ this.materials.push(material);
9017
+ }
9018
+ else {
9019
+ this.materials[0] = material;
9020
+ }
9021
+ },
9022
+ enumerable: false,
9023
+ configurable: true
9024
+ });
9025
+ RendererComponent.prototype.onEnable = function () { };
9026
+ RendererComponent.prototype.start = function () { };
9027
+ RendererComponent.prototype.update = function (dt) { };
9028
+ RendererComponent.prototype.lateUpdate = function (dt) { };
9029
+ RendererComponent.prototype.render = function (renderer) { };
9030
+ RendererComponent.prototype.onAttached = function () {
9031
+ this.item.rendererComponents.push(this);
9032
+ };
9033
+ RendererComponent.prototype.fromData = function (data) {
9034
+ _super.prototype.fromData.call(this, data);
9035
+ };
9036
+ RendererComponent.prototype.toData = function () {
9037
+ _super.prototype.toData.call(this);
9038
+ };
9039
+ RendererComponent.prototype.dispose = function () {
9040
+ if (this.item) {
9041
+ removeItem(this.item.rendererComponents, this);
9042
+ }
9043
+ _super.prototype.dispose.call(this);
9044
+ };
9045
+ __decorate([
9046
+ serialize()
9047
+ ], RendererComponent.prototype, "materials", void 0);
9048
+ __decorate([
9049
+ serialize()
9050
+ ], RendererComponent.prototype, "_priority", void 0);
9051
+ __decorate([
9052
+ serialize()
9053
+ ], RendererComponent.prototype, "_enabled", void 0);
9054
+ return RendererComponent;
9055
+ }(Component));
9056
9056
 
9057
9057
  var seed$8 = 1;
9058
9058
  /**
@@ -11289,7 +11289,7 @@ var SerializationHelper = /** @class */ (function () {
11289
11289
  };
11290
11290
  SerializationHelper.deserializeProperty = function (property, engine, level) {
11291
11291
  var e_11, _a, e_12, _b;
11292
- if (level > 10) {
11292
+ if (level > 14) {
11293
11293
  console.error('序列化数据的内嵌对象层数大于上限');
11294
11294
  return;
11295
11295
  }
@@ -11350,7 +11350,7 @@ var SerializationHelper = /** @class */ (function () {
11350
11350
  return __generator(this, function (_j) {
11351
11351
  switch (_j.label) {
11352
11352
  case 0:
11353
- if (level > 10) {
11353
+ if (level > 14) {
11354
11354
  console.error('序列化数据的内嵌对象层数大于上限');
11355
11355
  return [2 /*return*/];
11356
11356
  }
@@ -11441,7 +11441,7 @@ var SerializationHelper = /** @class */ (function () {
11441
11441
  };
11442
11442
  SerializationHelper.serializeObjectProperty = function (objectProperty, serializedData, level) {
11443
11443
  var e_15, _a;
11444
- if (level > 10) {
11444
+ if (level > 14) {
11445
11445
  console.error('序列化数据的内嵌对象层数大于上限');
11446
11446
  return;
11447
11447
  }
@@ -11486,7 +11486,7 @@ var SerializationHelper = /** @class */ (function () {
11486
11486
  }
11487
11487
  };
11488
11488
  SerializationHelper.serializeArrayProperty = function (arrayProperty, serializedData, level) {
11489
- if (level > 10) {
11489
+ if (level > 14) {
11490
11490
  console.error('序列化数据的内嵌对象层数大于上限');
11491
11491
  return;
11492
11492
  }
@@ -11652,24 +11652,24 @@ var Database = /** @class */ (function () {
11652
11652
  }());
11653
11653
  var DataType;
11654
11654
  (function (DataType) {
11655
- DataType[DataType["VFXItemData"] = 0] = "VFXItemData";
11656
- DataType[DataType["EffectComponent"] = 1] = "EffectComponent";
11657
- DataType[DataType["Material"] = 2] = "Material";
11658
- DataType[DataType["Shader"] = 3] = "Shader";
11659
- DataType[DataType["SpriteComponent"] = 4] = "SpriteComponent";
11660
- DataType[DataType["ParticleSystem"] = 5] = "ParticleSystem";
11661
- DataType[DataType["InteractComponent"] = 6] = "InteractComponent";
11662
- DataType[DataType["CameraController"] = 7] = "CameraController";
11663
- DataType[DataType["Geometry"] = 8] = "Geometry";
11664
- DataType[DataType["Texture"] = 9] = "Texture";
11665
- DataType[DataType["TextComponent"] = 10] = "TextComponent";
11655
+ DataType["VFXItemData"] = "VFXItemData";
11656
+ DataType["EffectComponent"] = "EffectComponent";
11657
+ DataType["Material"] = "Material";
11658
+ DataType["Shader"] = "Shader";
11659
+ DataType["SpriteComponent"] = "SpriteComponent";
11660
+ DataType["ParticleSystem"] = "ParticleSystem";
11661
+ DataType["InteractComponent"] = "InteractComponent";
11662
+ DataType["CameraController"] = "CameraController";
11663
+ DataType["Geometry"] = "Geometry";
11664
+ DataType["Texture"] = "Texture";
11665
+ DataType["TextComponent"] = "TextComponent";
11666
11666
  // FIXME: 先完成ECS的场景转换,后面移到spec中
11667
- DataType[DataType["MeshComponent"] = 10000] = "MeshComponent";
11668
- DataType[DataType["SkyboxComponent"] = 10001] = "SkyboxComponent";
11669
- DataType[DataType["LightComponent"] = 10002] = "LightComponent";
11670
- DataType[DataType["CameraComponent"] = 10003] = "CameraComponent";
11671
- DataType[DataType["ModelPluginComponent"] = 10004] = "ModelPluginComponent";
11672
- DataType[DataType["TreeComponent"] = 10005] = "TreeComponent";
11667
+ DataType["MeshComponent"] = "MeshComponent";
11668
+ DataType["SkyboxComponent"] = "SkyboxComponent";
11669
+ DataType["LightComponent"] = "LightComponent";
11670
+ DataType["CameraComponent"] = "CameraComponent";
11671
+ DataType["ModelPluginComponent"] = "ModelPluginComponent";
11672
+ DataType["TreeComponent"] = "TreeComponent";
11673
11673
  })(DataType || (DataType = {}));
11674
11674
 
11675
11675
  /**
@@ -13936,15 +13936,25 @@ var PlayableOutput = /** @class */ (function () {
13936
13936
  };
13937
13937
  return PlayableOutput;
13938
13938
  }());
13939
+ var PlayableAsset = /** @class */ (function () {
13940
+ function PlayableAsset() {
13941
+ }
13942
+ PlayableAsset.prototype.fromData = function (data) {
13943
+ };
13944
+ return PlayableAsset;
13945
+ }());
13939
13946
 
13940
13947
  /**
13941
13948
  * @since 2.0.0
13942
13949
  * @internal
13943
13950
  */
13944
- var Track = /** @class */ (function () {
13951
+ var Track = /** @class */ (function (_super) {
13952
+ __extends(Track, _super);
13945
13953
  function Track() {
13946
- this.clips = [];
13947
- this.clipSeed = 0;
13954
+ var _this = _super !== null && _super.apply(this, arguments) || this;
13955
+ _this.clips = [];
13956
+ _this.clipSeed = 0;
13957
+ return _this;
13948
13958
  }
13949
13959
  Track.prototype.createOutput = function () {
13950
13960
  var output = new PlayableOutput();
@@ -13956,7 +13966,7 @@ var Track = /** @class */ (function () {
13956
13966
  Track.prototype.createMixerPlayable = function () {
13957
13967
  return new Playable();
13958
13968
  };
13959
- Track.prototype.createPlayebleTree = function () {
13969
+ Track.prototype.createPlayable = function () {
13960
13970
  var e_1, _a;
13961
13971
  var defaultMixPlayable = this.createMixerPlayable();
13962
13972
  try {
@@ -14008,7 +14018,7 @@ var Track = /** @class */ (function () {
14008
14018
  this.clips.push(clip);
14009
14019
  };
14010
14020
  return Track;
14011
- }());
14021
+ }(PlayableAsset));
14012
14022
  /**
14013
14023
  * @since 2.0.0
14014
14024
  * @internal
@@ -14064,12 +14074,12 @@ var tempPos = new Vector3();
14064
14074
  * @since 2.0.0
14065
14075
  * @internal
14066
14076
  */
14067
- var AnimationClipPlayable = /** @class */ (function (_super) {
14068
- __extends(AnimationClipPlayable, _super);
14069
- function AnimationClipPlayable() {
14077
+ var TransformAnimationPlayable = /** @class */ (function (_super) {
14078
+ __extends(TransformAnimationPlayable, _super);
14079
+ function TransformAnimationPlayable() {
14070
14080
  return _super !== null && _super.apply(this, arguments) || this;
14071
14081
  }
14072
- AnimationClipPlayable.prototype.processFrame = function (dt) {
14082
+ TransformAnimationPlayable.prototype.processFrame = function (dt) {
14073
14083
  if (this.bindingItem.composition) {
14074
14084
  this.sampleAnimation();
14075
14085
  }
@@ -14077,7 +14087,7 @@ var AnimationClipPlayable = /** @class */ (function (_super) {
14077
14087
  /**
14078
14088
  * 应用时间轴K帧数据到对象
14079
14089
  */
14080
- AnimationClipPlayable.prototype.sampleAnimation = function () {
14090
+ TransformAnimationPlayable.prototype.sampleAnimation = function () {
14081
14091
  var _this = this;
14082
14092
  var duration = this.bindingItem.duration;
14083
14093
  var life = this.time / duration;
@@ -14122,7 +14132,7 @@ var AnimationClipPlayable = /** @class */ (function (_super) {
14122
14132
  // this.animationStream.setCurveValue('transform', 'position.z', pos.z);
14123
14133
  }
14124
14134
  };
14125
- AnimationClipPlayable.prototype.fromData = function (data) {
14135
+ TransformAnimationPlayable.prototype.fromData = function (data) {
14126
14136
  var _a;
14127
14137
  var scale = this.bindingItem.transform.scale;
14128
14138
  this.originalTransform = {
@@ -14193,30 +14203,45 @@ var AnimationClipPlayable = /** @class */ (function (_super) {
14193
14203
  this.velocity = this.direction.clone();
14194
14204
  this.velocity.multiply(this.startSpeed);
14195
14205
  };
14196
- return AnimationClipPlayable;
14206
+ return TransformAnimationPlayable;
14197
14207
  }(AnimationPlayable));
14208
+ var TransformAnimationPlayableAsset = /** @class */ (function (_super) {
14209
+ __extends(TransformAnimationPlayableAsset, _super);
14210
+ function TransformAnimationPlayableAsset() {
14211
+ return _super !== null && _super.apply(this, arguments) || this;
14212
+ }
14213
+ TransformAnimationPlayableAsset.prototype.createPlayable = function () {
14214
+ var transformAnimationPlayable = new TransformAnimationPlayable();
14215
+ transformAnimationPlayable.fromData(this.transformAnimationData);
14216
+ return transformAnimationPlayable;
14217
+ };
14218
+ TransformAnimationPlayableAsset.prototype.fromData = function (data) {
14219
+ this.transformAnimationData = data;
14220
+ };
14221
+ return TransformAnimationPlayableAsset;
14222
+ }(PlayableAsset));
14198
14223
  /**
14199
14224
  * @since 2.0.0
14200
14225
  * @internal
14201
14226
  */
14202
- var ActivationClipPlayable = /** @class */ (function (_super) {
14203
- __extends(ActivationClipPlayable, _super);
14204
- function ActivationClipPlayable() {
14227
+ var ActivationPlayable = /** @class */ (function (_super) {
14228
+ __extends(ActivationPlayable, _super);
14229
+ function ActivationPlayable() {
14205
14230
  return _super !== null && _super.apply(this, arguments) || this;
14206
14231
  }
14207
- ActivationClipPlayable.prototype.onGraphStart = function () {
14232
+ ActivationPlayable.prototype.onGraphStart = function () {
14208
14233
  this.bindingItem.transform.setValid(false);
14209
14234
  this.hideRendererComponents();
14210
14235
  };
14211
- ActivationClipPlayable.prototype.onPlayablePlay = function () {
14236
+ ActivationPlayable.prototype.onPlayablePlay = function () {
14212
14237
  this.bindingItem.transform.setValid(true);
14213
14238
  this.showRendererComponents();
14214
14239
  };
14215
- ActivationClipPlayable.prototype.onPlayableDestroy = function () {
14240
+ ActivationPlayable.prototype.onPlayableDestroy = function () {
14216
14241
  this.bindingItem.transform.setValid(false);
14217
14242
  this.hideRendererComponents();
14218
14243
  };
14219
- ActivationClipPlayable.prototype.hideRendererComponents = function () {
14244
+ ActivationPlayable.prototype.hideRendererComponents = function () {
14220
14245
  var e_1, _a;
14221
14246
  try {
14222
14247
  for (var _b = __values$1(this.bindingItem.rendererComponents), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14234,7 +14259,7 @@ var ActivationClipPlayable = /** @class */ (function (_super) {
14234
14259
  finally { if (e_1) throw e_1.error; }
14235
14260
  }
14236
14261
  };
14237
- ActivationClipPlayable.prototype.showRendererComponents = function () {
14262
+ ActivationPlayable.prototype.showRendererComponents = function () {
14238
14263
  var e_2, _a;
14239
14264
  try {
14240
14265
  for (var _b = __values$1(this.bindingItem.rendererComponents), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14252,7 +14277,7 @@ var ActivationClipPlayable = /** @class */ (function (_super) {
14252
14277
  finally { if (e_2) throw e_2.error; }
14253
14278
  }
14254
14279
  };
14255
- return ActivationClipPlayable;
14280
+ return ActivationPlayable;
14256
14281
  }(Playable));
14257
14282
 
14258
14283
  /**
@@ -14507,7 +14532,7 @@ var TimelineComponent = /** @class */ (function (_super) {
14507
14532
  try {
14508
14533
  for (var _b = __values$1(this.tracks), _c = _b.next(); !_c.done; _c = _b.next()) {
14509
14534
  var track = _c.value;
14510
- var trackMixPlayable = track.createPlayebleTree();
14535
+ var trackMixPlayable = track.createPlayable();
14511
14536
  var trackOutput = track.createOutput();
14512
14537
  graph.addOutput(trackOutput);
14513
14538
  trackOutput.setSourcePlayeble(trackMixPlayable);
@@ -14522,6 +14547,7 @@ var TimelineComponent = /** @class */ (function (_super) {
14522
14547
  }
14523
14548
  };
14524
14549
  TimelineComponent.prototype.fromData = function (data) {
14550
+ var e_13, _a, e_14, _b;
14525
14551
  _super.prototype.fromData.call(this, data);
14526
14552
  this.options = {
14527
14553
  start: this.item.start,
@@ -14532,7 +14558,47 @@ var TimelineComponent = /** @class */ (function (_super) {
14532
14558
  this.id = this.item.id;
14533
14559
  this.name = this.item.name;
14534
14560
  var activationTrack = this.createTrack(Track, 'ActivationTrack');
14535
- activationTrack.createClip(ActivationClipPlayable, 'ActivationTimelineClip');
14561
+ activationTrack.createClip(ActivationPlayable, 'ActivationTimelineClip');
14562
+ //@ts-expect-error
14563
+ if (data.tracks) {
14564
+ //@ts-expect-error
14565
+ var tracks = data.tracks;
14566
+ try {
14567
+ for (var tracks_1 = __values$1(tracks), tracks_1_1 = tracks_1.next(); !tracks_1_1.done; tracks_1_1 = tracks_1.next()) {
14568
+ var track = tracks_1_1.value;
14569
+ var newTrack = this.createTrack(Track);
14570
+ try {
14571
+ for (var _c = (e_14 = void 0, __values$1(track.clips)), _d = _c.next(); !_d.done; _d = _c.next()) {
14572
+ var clipAsset = _d.value;
14573
+ switch (clipAsset.dataType) {
14574
+ case 'TransformAnimationPlayableAsset':
14575
+ newTrack.name = 'AnimationTrack';
14576
+ newTrack.createClip(TransformAnimationPlayable, 'AnimationTimelineClip').playable.fromData(clipAsset.animationClip);
14577
+ break;
14578
+ case 'SpriteColorAnimationPlayableAsset':
14579
+ newTrack.name = 'SpriteColorTrack';
14580
+ newTrack.createClip(SpriteColorPlayable, 'SpriteColorClip').playable.fromData(clipAsset.animationClip);
14581
+ break;
14582
+ }
14583
+ }
14584
+ }
14585
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
14586
+ finally {
14587
+ try {
14588
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
14589
+ }
14590
+ finally { if (e_14) throw e_14.error; }
14591
+ }
14592
+ }
14593
+ }
14594
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
14595
+ finally {
14596
+ try {
14597
+ if (tracks_1_1 && !tracks_1_1.done && (_a = tracks_1.return)) _a.call(tracks_1);
14598
+ }
14599
+ finally { if (e_13) throw e_13.error; }
14600
+ }
14601
+ }
14536
14602
  };
14537
14603
  TimelineComponent.prototype.toData = function () {
14538
14604
  _super.prototype.toData.call(this);
@@ -14946,9 +15012,6 @@ var SpriteComponent = /** @class */ (function (_super) {
14946
15012
  this.material.setVector4('_Color', new Vector4().setFromArray(startColor));
14947
15013
  this.material.setVector4('_TexOffset', new Vector4().setFromArray([0, 0, 1, 1]));
14948
15014
  this.setItem();
14949
- // 添加K帧动画
14950
- var colorTrack = this.item.getComponent(TimelineComponent).createTrack(Track, 'SpriteColorTrack');
14951
- colorTrack.createClip(SpriteColorPlayable, 'SpriteColorClip').playable.fromData({ colorOverLifetime: data.colorOverLifetime, startColor: data.options.startColor });
14952
15015
  };
14953
15016
  SpriteComponent.prototype.toData = function () {
14954
15017
  _super.prototype.toData.call(this);
@@ -20605,10 +20668,6 @@ var VFXItem = /** @class */ (function (_super) {
20605
20668
  }
20606
20669
  var timelineComponent = this.getComponent(TimelineComponent);
20607
20670
  timelineComponent.fromData(data.content);
20608
- if (this.type !== ItemType$1.particle) {
20609
- var track = timelineComponent.createTrack(Track, 'AnimationTrack');
20610
- track.createClip(AnimationClipPlayable, 'AnimationTimelineClip').playable.fromData(data.content);
20611
- }
20612
20671
  if (duration <= 0) {
20613
20672
  throw Error("Item duration can't be less than 0, see ".concat(HELP_LINK['Item duration can\'t be less than 0']));
20614
20673
  }
@@ -22820,6 +22879,49 @@ function version3Migration(scene) {
22820
22879
  if (item.endBehavior === END_BEHAVIOR_PAUSE_AND_DESTROY$1 || item.endBehavior === END_BEHAVIOR_PAUSE$1) {
22821
22880
  item.endBehavior = END_BEHAVIOR_FREEZE$1;
22822
22881
  }
22882
+ // 动画数据转化 TODO: 动画数据移到 TimelineComponentData
22883
+ //@ts-expect-error
22884
+ item.content.tracks = [];
22885
+ //@ts-expect-error
22886
+ var tracks = item.content.tracks;
22887
+ if (item.type !== ItemType$1.particle) {
22888
+ tracks.push({
22889
+ clips: [
22890
+ {
22891
+ dataType: 'TransformAnimationPlayableAsset',
22892
+ animationClip: {
22893
+ //@ts-expect-error
22894
+ sizeOverLifetime: item.content.sizeOverLifetime,
22895
+ //@ts-expect-error
22896
+ rotationOverLifetime: item.content.rotationOverLifetime,
22897
+ //@ts-expect-error
22898
+ positionOverLifetime: item.content.positionOverLifetime,
22899
+ },
22900
+ },
22901
+ ],
22902
+ });
22903
+ }
22904
+ if (item.type === ItemType$1.sprite) {
22905
+ tracks.push({
22906
+ clips: [
22907
+ {
22908
+ dataType: 'SpriteColorAnimationPlayableAsset',
22909
+ animationClip: {
22910
+ //@ts-expect-error
22911
+ colorOverLifetime: item.content.colorOverLifetime,
22912
+ //@ts-expect-error
22913
+ startColor: item.content.options.startColor,
22914
+ },
22915
+ },
22916
+ ],
22917
+ });
22918
+ }
22919
+ // gizmo 的 target id 转换为新的 item guid
22920
+ //@ts-expect-error
22921
+ if (item.content.options.target) {
22922
+ //@ts-expect-error
22923
+ item.content.options.target = itemGuidMap[item.content.options.target];
22924
+ }
22823
22925
  // item 的 content 转为 component data 加入 JSONScene.components
22824
22926
  var uuid = v4().replace(/-/g, '');
22825
22927
  if (item.type === ItemType$1.sprite) {
@@ -27518,8 +27620,8 @@ Geometry.create = function (engine, options) {
27518
27620
  Mesh.create = function (engine, props) {
27519
27621
  return new ThreeMesh(engine, props);
27520
27622
  };
27521
- var version = "2.0.0-alpha.1";
27623
+ var version = "2.0.0-alpha.3";
27522
27624
  logger.info('THREEJS plugin version: ' + version);
27523
27625
 
27524
- export { AbstractPlugin, ActivationClipPlayable, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierSegments, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, Component, Composition, CompositionComponent, CompositionSourceManager, CurveValue, DEFAULT_FONTS, DataType, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, Engine, EventSystem, FILTER_NAME_NONE, FilterMode, Float16ArrayWrapper, FrameBuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractBehavior$1 as InteractBehavior, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, QCanvasViewer, QText, QTextWrapMode, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderBuffer, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderer, RendererComponent, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderType, SpriteColorPlayable, SpriteComponent, SpriteLoader, StaticValue, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextLoader, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTexture, Ticker, TimelineClip, TimelineComponent, Track, Transform, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, alphaFrame_frag as alphaFrameFrag, alphaMask_frag as alphaMaskFrag, assertExist, asserts, blend, bloomMix_frag as bloomMixVert, bloomThreshold_frag as bloomThresholdVert, calculateTranslation, cameraMove_frag as cameraMoveFrag, cameraMove_vert as cameraMoveVert, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, combineImageTemplate1, combineImageTemplate1Async, combineImageTemplate2, combineImageTemplate2Async, combineImageTemplateAsync, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, copy as copyFrag, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMarcos, createShape, createVFXItem, createValueGetter, deepClone, defaultGlobalVolume, defaultPlugins, delay_frag as delayFrag, deserializeMipmapTexture, distortion_frag as distortionFrag, distortion_vert as distortionVert, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAndroid, isArray, isFunction, isIOS, isObject, isScene, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isWebGL2, item_define as itemDefine, itemFrag, itemFrameFrag, itemVert, loadBinary, loadBlob, loadImage, loadVideo, loadWebPOptional, logger, index$1 as math, maxSpriteMeshItemCount, maxSpriteTextureCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap, particleVert, pluginLoaderMap, random, registerPlugin, removeItem, requestAsync, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxFragmentTextures, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version };
27626
+ export { AbstractPlugin, ActivationPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierSegments, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, Component, Composition, CompositionComponent, CompositionSourceManager, CurveValue, DEFAULT_FONTS, DataType, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, Engine, EventSystem, FILTER_NAME_NONE, FilterMode, Float16ArrayWrapper, FrameBuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractBehavior$1 as InteractBehavior, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, QCanvasViewer, QText, QTextWrapMode, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderBuffer, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderer, RendererComponent, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderType, SpriteColorPlayable, SpriteComponent, SpriteLoader, StaticValue, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextLoader, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTexture, Ticker, TimelineClip, TimelineComponent, Track, Transform, TransformAnimationPlayable, TransformAnimationPlayableAsset, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, alphaFrame_frag as alphaFrameFrag, alphaMask_frag as alphaMaskFrag, assertExist, asserts, blend, bloomMix_frag as bloomMixVert, bloomThreshold_frag as bloomThresholdVert, calculateTranslation, cameraMove_frag as cameraMoveFrag, cameraMove_vert as cameraMoveVert, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, combineImageTemplate1, combineImageTemplate1Async, combineImageTemplate2, combineImageTemplate2Async, combineImageTemplateAsync, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, copy as copyFrag, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMarcos, createShape, createVFXItem, createValueGetter, deepClone, defaultGlobalVolume, defaultPlugins, delay_frag as delayFrag, deserializeMipmapTexture, distortion_frag as distortionFrag, distortion_vert as distortionVert, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAndroid, isArray, isFunction, isIOS, isObject, isScene, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isWebGL2, item_define as itemDefine, itemFrag, itemFrameFrag, itemVert, loadBinary, loadBlob, loadImage, loadVideo, loadWebPOptional, logger, index$1 as math, maxSpriteMeshItemCount, maxSpriteTextureCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap, particleVert, pluginLoaderMap, random, registerPlugin, removeItem, requestAsync, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxFragmentTextures, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version };
27525
27627
  //# sourceMappingURL=index.mjs.map