@galacean/effects-threejs 2.0.3 → 2.1.0-alpha.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.
- package/dist/index.js +354 -233
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +354 -234
- package/dist/index.mjs.map +1 -1
- package/dist/three-mesh.d.ts +1 -1
- package/dist/three-sprite-component.d.ts +1 -1
- package/dist/three-text-component.d.ts +16 -1
- package/package.json +2 -2
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.
|
|
6
|
+
* Version: v2.1.0-alpha.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -4605,87 +4605,109 @@ function getDirectStore(target) {
|
|
|
4605
4605
|
*/ var Component = /*#__PURE__*/ function(EffectsObject) {
|
|
4606
4606
|
_inherits(Component, EffectsObject);
|
|
4607
4607
|
function Component() {
|
|
4608
|
-
return EffectsObject.apply(this, arguments);
|
|
4609
|
-
}
|
|
4610
|
-
var _proto = Component.prototype;
|
|
4611
|
-
_proto.onAttached = function onAttached() {};
|
|
4612
|
-
_proto.onDestroy = function onDestroy() {};
|
|
4613
|
-
_proto.fromData = function fromData(data) {
|
|
4614
|
-
EffectsObject.prototype.fromData.call(this, data);
|
|
4615
|
-
if (data.item) {
|
|
4616
|
-
this.item = data.item;
|
|
4617
|
-
}
|
|
4618
|
-
};
|
|
4619
|
-
_proto.dispose = function dispose() {
|
|
4620
|
-
this.onDestroy();
|
|
4621
|
-
if (this.item) {
|
|
4622
|
-
removeItem(this.item.components, this);
|
|
4623
|
-
}
|
|
4624
|
-
};
|
|
4625
|
-
_create_class(Component, [
|
|
4626
|
-
{
|
|
4627
|
-
key: "transform",
|
|
4628
|
-
get: /**
|
|
4629
|
-
* 附加到的 VFXItem 对象 Transform 组件
|
|
4630
|
-
*/ function get() {
|
|
4631
|
-
return this.item.transform;
|
|
4632
|
-
}
|
|
4633
|
-
}
|
|
4634
|
-
]);
|
|
4635
|
-
return Component;
|
|
4636
|
-
}(EffectsObject);
|
|
4637
|
-
/**
|
|
4638
|
-
* @since 2.0.0
|
|
4639
|
-
*/ var Behaviour = /*#__PURE__*/ function(Component) {
|
|
4640
|
-
_inherits(Behaviour, Component);
|
|
4641
|
-
function Behaviour() {
|
|
4642
4608
|
var _this;
|
|
4643
|
-
_this =
|
|
4609
|
+
_this = EffectsObject.apply(this, arguments) || this;
|
|
4644
4610
|
_this.isAwakeCalled = false;
|
|
4645
4611
|
_this.isStartCalled = false;
|
|
4612
|
+
_this.isEnableCalled = false;
|
|
4646
4613
|
_this._enabled = true;
|
|
4647
4614
|
return _this;
|
|
4648
4615
|
}
|
|
4649
|
-
var _proto =
|
|
4616
|
+
var _proto = Component.prototype;
|
|
4650
4617
|
/**
|
|
4651
4618
|
* 生命周期函数,初始化后调用,生命周期内只调用一次
|
|
4652
|
-
*/ _proto.
|
|
4619
|
+
*/ _proto.onAwake = function onAwake() {
|
|
4653
4620
|
// OVERRIDE
|
|
4654
4621
|
};
|
|
4655
4622
|
/**
|
|
4656
|
-
*
|
|
4623
|
+
* 在 enabled 变为 true 时触发
|
|
4657
4624
|
*/ _proto.onEnable = function onEnable() {
|
|
4658
4625
|
// OVERRIDE
|
|
4659
4626
|
};
|
|
4660
4627
|
/**
|
|
4628
|
+
* 在 enabled 变为 false 时触发
|
|
4629
|
+
*/ _proto.onDisable = function onDisable() {
|
|
4630
|
+
// OVERRIDE
|
|
4631
|
+
};
|
|
4632
|
+
/**
|
|
4661
4633
|
* 生命周期函数,在第一次 update 前调用,生命周期内只调用一次
|
|
4662
|
-
*/ _proto.
|
|
4634
|
+
*/ _proto.onStart = function onStart() {
|
|
4663
4635
|
// OVERRIDE
|
|
4664
4636
|
};
|
|
4665
4637
|
/**
|
|
4666
4638
|
* 生命周期函数,每帧调用一次
|
|
4667
|
-
*/ _proto.
|
|
4639
|
+
*/ _proto.onUpdate = function onUpdate(dt) {
|
|
4668
4640
|
// OVERRIDE
|
|
4669
4641
|
};
|
|
4670
4642
|
/**
|
|
4671
4643
|
* 生命周期函数,每帧调用一次,在 update 之后调用
|
|
4672
|
-
*/ _proto.
|
|
4644
|
+
*/ _proto.onLateUpdate = function onLateUpdate(dt) {
|
|
4645
|
+
// OVERRIDE
|
|
4646
|
+
};
|
|
4647
|
+
/**
|
|
4648
|
+
* 生命周期函数,在组件销毁时调用
|
|
4649
|
+
*/ _proto.onDestroy = function onDestroy() {
|
|
4673
4650
|
// OVERRIDE
|
|
4674
4651
|
};
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
this.
|
|
4652
|
+
/**
|
|
4653
|
+
* @internal
|
|
4654
|
+
*/ _proto.enable = function enable() {
|
|
4655
|
+
if (this.item.composition) {
|
|
4656
|
+
this.item.composition.sceneTicking.addComponent(this);
|
|
4657
|
+
this.isEnableCalled = true;
|
|
4658
|
+
}
|
|
4659
|
+
this.onEnable();
|
|
4660
|
+
};
|
|
4661
|
+
/**
|
|
4662
|
+
* @internal
|
|
4663
|
+
*/ _proto.disable = function disable() {
|
|
4664
|
+
this.onDisable();
|
|
4665
|
+
if (this.item.composition) {
|
|
4666
|
+
this.isEnableCalled = false;
|
|
4667
|
+
this.item.composition.sceneTicking.removeComponent(this);
|
|
4668
|
+
}
|
|
4669
|
+
};
|
|
4670
|
+
_proto.setVFXItem = function setVFXItem(item) {
|
|
4671
|
+
this.item = item;
|
|
4672
|
+
if (item.isDuringPlay) {
|
|
4673
|
+
if (!this.isAwakeCalled) {
|
|
4674
|
+
this.onAwake();
|
|
4675
|
+
this.isAwakeCalled = true;
|
|
4676
|
+
}
|
|
4677
|
+
if (item.getVisible() && this.enabled) {
|
|
4678
|
+
this.start();
|
|
4679
|
+
this.enable();
|
|
4680
|
+
}
|
|
4681
|
+
}
|
|
4682
|
+
};
|
|
4683
|
+
_proto.fromData = function fromData(data) {
|
|
4684
|
+
EffectsObject.prototype.fromData.call(this, data);
|
|
4685
|
+
if (data.item) {
|
|
4686
|
+
this.item = data.item;
|
|
4680
4687
|
}
|
|
4681
4688
|
};
|
|
4682
4689
|
_proto.dispose = function dispose() {
|
|
4690
|
+
this.onDestroy();
|
|
4683
4691
|
if (this.item) {
|
|
4684
|
-
removeItem(this.item.
|
|
4692
|
+
removeItem(this.item.components, this);
|
|
4685
4693
|
}
|
|
4686
|
-
Component.prototype.dispose.call(this);
|
|
4687
4694
|
};
|
|
4688
|
-
|
|
4695
|
+
_proto.start = function start() {
|
|
4696
|
+
if (this.isStartCalled) {
|
|
4697
|
+
return;
|
|
4698
|
+
}
|
|
4699
|
+
this.isStartCalled = true;
|
|
4700
|
+
this.onStart();
|
|
4701
|
+
};
|
|
4702
|
+
_create_class(Component, [
|
|
4703
|
+
{
|
|
4704
|
+
key: "transform",
|
|
4705
|
+
get: /**
|
|
4706
|
+
* 附加到的 VFXItem 对象 Transform 组件
|
|
4707
|
+
*/ function get() {
|
|
4708
|
+
return this.item.transform;
|
|
4709
|
+
}
|
|
4710
|
+
},
|
|
4689
4711
|
{
|
|
4690
4712
|
key: "isActiveAndEnabled",
|
|
4691
4713
|
get: /**
|
|
@@ -4700,24 +4722,46 @@ function getDirectStore(target) {
|
|
|
4700
4722
|
return this._enabled;
|
|
4701
4723
|
},
|
|
4702
4724
|
set: function set(value) {
|
|
4703
|
-
this.
|
|
4704
|
-
|
|
4705
|
-
if (
|
|
4706
|
-
this.
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4725
|
+
if (this.enabled !== value) {
|
|
4726
|
+
this._enabled = value;
|
|
4727
|
+
if (value) {
|
|
4728
|
+
if (this.isActiveAndEnabled) {
|
|
4729
|
+
this.enable();
|
|
4730
|
+
if (!this.isStartCalled) {
|
|
4731
|
+
this.onStart();
|
|
4732
|
+
this.isStartCalled = true;
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
} else {
|
|
4736
|
+
if (this.isEnableCalled) {
|
|
4737
|
+
this.disable();
|
|
4738
|
+
}
|
|
4711
4739
|
}
|
|
4712
4740
|
}
|
|
4713
4741
|
}
|
|
4714
4742
|
}
|
|
4715
4743
|
]);
|
|
4716
|
-
return
|
|
4717
|
-
}(
|
|
4744
|
+
return Component;
|
|
4745
|
+
}(EffectsObject);
|
|
4718
4746
|
__decorate([
|
|
4719
4747
|
serialize()
|
|
4720
|
-
],
|
|
4748
|
+
], Component.prototype, "_enabled", void 0);
|
|
4749
|
+
/**
|
|
4750
|
+
* @since 2.0.0
|
|
4751
|
+
*/ var Behaviour = /*#__PURE__*/ function(Component) {
|
|
4752
|
+
_inherits(Behaviour, Component);
|
|
4753
|
+
function Behaviour() {
|
|
4754
|
+
return Component.apply(this, arguments);
|
|
4755
|
+
}
|
|
4756
|
+
var _proto = Behaviour.prototype;
|
|
4757
|
+
_proto.setVFXItem = function setVFXItem(item) {
|
|
4758
|
+
Component.prototype.setVFXItem.call(this, item);
|
|
4759
|
+
};
|
|
4760
|
+
_proto.dispose = function dispose() {
|
|
4761
|
+
Component.prototype.dispose.call(this);
|
|
4762
|
+
};
|
|
4763
|
+
return Behaviour;
|
|
4764
|
+
}(Component);
|
|
4721
4765
|
|
|
4722
4766
|
/**
|
|
4723
4767
|
* 所有渲染组件的基类
|
|
@@ -4727,19 +4771,14 @@ __decorate([
|
|
|
4727
4771
|
function RendererComponent() {
|
|
4728
4772
|
var _this;
|
|
4729
4773
|
_this = Component.apply(this, arguments) || this;
|
|
4730
|
-
_this.isStartCalled = false;
|
|
4731
4774
|
_this.materials = [];
|
|
4732
4775
|
_this._priority = 0;
|
|
4733
|
-
_this._enabled = true;
|
|
4734
4776
|
return _this;
|
|
4735
4777
|
}
|
|
4736
4778
|
var _proto = RendererComponent.prototype;
|
|
4737
|
-
_proto.onEnable = function onEnable() {};
|
|
4738
|
-
_proto.start = function start() {};
|
|
4739
|
-
_proto.update = function update(dt) {};
|
|
4740
|
-
_proto.lateUpdate = function lateUpdate(dt) {};
|
|
4741
4779
|
_proto.render = function render(renderer) {};
|
|
4742
|
-
_proto.
|
|
4780
|
+
_proto.setVFXItem = function setVFXItem(item) {
|
|
4781
|
+
Component.prototype.setVFXItem.call(this, item);
|
|
4743
4782
|
this.item.rendererComponents.push(this);
|
|
4744
4783
|
};
|
|
4745
4784
|
_proto.fromData = function fromData(data) {
|
|
@@ -4764,26 +4803,6 @@ __decorate([
|
|
|
4764
4803
|
this._priority = value;
|
|
4765
4804
|
}
|
|
4766
4805
|
},
|
|
4767
|
-
{
|
|
4768
|
-
key: "enabled",
|
|
4769
|
-
get: function get() {
|
|
4770
|
-
return this._enabled;
|
|
4771
|
-
},
|
|
4772
|
-
set: function set(value) {
|
|
4773
|
-
this._enabled = value;
|
|
4774
|
-
if (value) {
|
|
4775
|
-
this.onEnable();
|
|
4776
|
-
}
|
|
4777
|
-
}
|
|
4778
|
-
},
|
|
4779
|
-
{
|
|
4780
|
-
key: "isActiveAndEnabled",
|
|
4781
|
-
get: /**
|
|
4782
|
-
* 组件是否可以更新,true 更新,false 不更新
|
|
4783
|
-
*/ function get() {
|
|
4784
|
-
return this.item.getVisible() && this.enabled;
|
|
4785
|
-
}
|
|
4786
|
-
},
|
|
4787
4806
|
{
|
|
4788
4807
|
key: "material",
|
|
4789
4808
|
get: function get() {
|
|
@@ -4806,9 +4825,6 @@ __decorate([
|
|
|
4806
4825
|
__decorate([
|
|
4807
4826
|
serialize()
|
|
4808
4827
|
], RendererComponent.prototype, "_priority", void 0);
|
|
4809
|
-
__decorate([
|
|
4810
|
-
serialize()
|
|
4811
|
-
], RendererComponent.prototype, "_enabled", void 0);
|
|
4812
4828
|
|
|
4813
4829
|
/**
|
|
4814
4830
|
* 抽象插件类
|
|
@@ -4852,7 +4868,7 @@ var CameraController = /*#__PURE__*/ function(Behaviour) {
|
|
|
4852
4868
|
return _this;
|
|
4853
4869
|
}
|
|
4854
4870
|
var _proto = CameraController.prototype;
|
|
4855
|
-
_proto.
|
|
4871
|
+
_proto.onUpdate = function onUpdate() {
|
|
4856
4872
|
if (this.item.composition && this.item.transform.getValid()) {
|
|
4857
4873
|
var camera = this.item.composition.camera;
|
|
4858
4874
|
camera.near = this.options.near;
|
|
@@ -8084,7 +8100,7 @@ function _loadVideo() {
|
|
|
8084
8100
|
}, true);
|
|
8085
8101
|
}
|
|
8086
8102
|
video.addEventListener("error", function(e) {
|
|
8087
|
-
reject(
|
|
8103
|
+
reject("Load video fail.");
|
|
8088
8104
|
});
|
|
8089
8105
|
})
|
|
8090
8106
|
];
|
|
@@ -13250,7 +13266,7 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13250
13266
|
return _this;
|
|
13251
13267
|
}
|
|
13252
13268
|
var _proto = InteractComponent.prototype;
|
|
13253
|
-
_proto.
|
|
13269
|
+
_proto.onStart = function onStart() {
|
|
13254
13270
|
var _this = this;
|
|
13255
13271
|
var options = this.item.props.content.options;
|
|
13256
13272
|
var env = this.item.engine.renderer.env;
|
|
@@ -13286,8 +13302,11 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13286
13302
|
}
|
|
13287
13303
|
};
|
|
13288
13304
|
};
|
|
13289
|
-
_proto.
|
|
13305
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
13290
13306
|
var _this_previewContent;
|
|
13307
|
+
if (!this.isActiveAndEnabled) {
|
|
13308
|
+
return;
|
|
13309
|
+
}
|
|
13291
13310
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
13292
13311
|
if (!this.hasBeenAddedToComposition && this.item.composition) {
|
|
13293
13312
|
var options = this.item.props.content.options;
|
|
@@ -13558,7 +13577,6 @@ function _assert_this_initialized(self) {
|
|
|
13558
13577
|
/**
|
|
13559
13578
|
* 动画图,负责更新所有的动画节点
|
|
13560
13579
|
* @since 2.0.0
|
|
13561
|
-
* @internal
|
|
13562
13580
|
*/ var PlayableGraph = /*#__PURE__*/ function() {
|
|
13563
13581
|
function PlayableGraph() {
|
|
13564
13582
|
this.playableOutputs = [];
|
|
@@ -13618,7 +13636,6 @@ function _assert_this_initialized(self) {
|
|
|
13618
13636
|
/**
|
|
13619
13637
|
* 动画图可播放节点对象
|
|
13620
13638
|
* @since 2.0.0
|
|
13621
|
-
* @internal
|
|
13622
13639
|
*/ var Playable = /*#__PURE__*/ function() {
|
|
13623
13640
|
function Playable(graph, inputCount) {
|
|
13624
13641
|
if (inputCount === void 0) inputCount = 0;
|
|
@@ -13632,6 +13649,9 @@ function _assert_this_initialized(self) {
|
|
|
13632
13649
|
this.outputs = [];
|
|
13633
13650
|
this.playState = 0;
|
|
13634
13651
|
this.traversalMode = 0;
|
|
13652
|
+
/**
|
|
13653
|
+
* 当前本地播放的时间
|
|
13654
|
+
*/ this.time = 0;
|
|
13635
13655
|
graph.addPlayable(this);
|
|
13636
13656
|
this.inputs = new Array(inputCount);
|
|
13637
13657
|
this.inputOuputPorts = new Array(inputCount);
|
|
@@ -13816,7 +13836,6 @@ function _assert_this_initialized(self) {
|
|
|
13816
13836
|
/**
|
|
13817
13837
|
* 动画图输出节点对象,将动画数据采样到绑定的元素属性上
|
|
13818
13838
|
* @since 2.0.0
|
|
13819
|
-
* @internal
|
|
13820
13839
|
*/ var PlayableOutput = /*#__PURE__*/ function() {
|
|
13821
13840
|
function PlayableOutput() {
|
|
13822
13841
|
this.sourceOutputPort = 0;
|
|
@@ -14078,10 +14097,10 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14078
14097
|
this.material.setVector2("_Size", this.transform.size);
|
|
14079
14098
|
renderer.drawGeometry(geo, material);
|
|
14080
14099
|
};
|
|
14081
|
-
_proto.
|
|
14100
|
+
_proto.onStart = function onStart() {
|
|
14082
14101
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
14083
14102
|
};
|
|
14084
|
-
_proto.
|
|
14103
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
14085
14104
|
if (!this.isManualTimeSet) {
|
|
14086
14105
|
this.frameAnimationTime += dt / 1000;
|
|
14087
14106
|
this.isManualTimeSet = false;
|
|
@@ -16504,15 +16523,15 @@ function getTrailMeshShader(trails, particleMaxCount, name, gpuCapability, env)
|
|
|
16504
16523
|
return _this;
|
|
16505
16524
|
}
|
|
16506
16525
|
var _proto = ParticleSystemRenderer.prototype;
|
|
16507
|
-
_proto.
|
|
16526
|
+
_proto.onStart = function onStart() {
|
|
16508
16527
|
this._priority = this.item.renderOrder;
|
|
16509
16528
|
this.particleMesh.gravityModifier.scaleXCoord(this.item.duration);
|
|
16510
16529
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.meshes), _step; !(_step = _iterator()).done;){
|
|
16511
16530
|
var mesh = _step.value;
|
|
16512
|
-
mesh.
|
|
16531
|
+
mesh.onStart();
|
|
16513
16532
|
}
|
|
16514
16533
|
};
|
|
16515
|
-
_proto.
|
|
16534
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
16516
16535
|
var time = this.particleMesh.time;
|
|
16517
16536
|
this.particleMesh.mesh.material.setVector4("uParams", new Vector4(time, this.item.duration, 0, 0));
|
|
16518
16537
|
};
|
|
@@ -16736,7 +16755,7 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16736
16755
|
_proto.getTextures = function getTextures() {
|
|
16737
16756
|
return this.renderer.getTextures();
|
|
16738
16757
|
};
|
|
16739
|
-
_proto.
|
|
16758
|
+
_proto.startEmit = function startEmit() {
|
|
16740
16759
|
if (!this.started || this.ended) {
|
|
16741
16760
|
this.reset();
|
|
16742
16761
|
this.started = true;
|
|
@@ -16762,7 +16781,7 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16762
16781
|
this.frozen = false;
|
|
16763
16782
|
this.ended = false;
|
|
16764
16783
|
};
|
|
16765
|
-
_proto.
|
|
16784
|
+
_proto.update = function update(delta) {
|
|
16766
16785
|
var _this = this;
|
|
16767
16786
|
if (this.started && !this.frozen) {
|
|
16768
16787
|
var now = this.lastUpdate + delta / 1000;
|
|
@@ -17545,7 +17564,6 @@ function randomArrItem(arr, keepArr) {
|
|
|
17545
17564
|
|
|
17546
17565
|
/**
|
|
17547
17566
|
* @since 2.0.0
|
|
17548
|
-
* @internal
|
|
17549
17567
|
*/ var ParticleBehaviourPlayable = /*#__PURE__*/ function(Playable) {
|
|
17550
17568
|
_inherits(ParticleBehaviourPlayable, Playable);
|
|
17551
17569
|
function ParticleBehaviourPlayable() {
|
|
@@ -17563,7 +17581,7 @@ function randomArrItem(arr, keepArr) {
|
|
|
17563
17581
|
this.particleSystem = boundObject.getComponent(ParticleSystem);
|
|
17564
17582
|
if (this.particleSystem) {
|
|
17565
17583
|
this.particleSystem.name = boundObject.name;
|
|
17566
|
-
this.particleSystem.
|
|
17584
|
+
this.particleSystem.startEmit();
|
|
17567
17585
|
this.particleSystem.initEmitterTransform();
|
|
17568
17586
|
}
|
|
17569
17587
|
};
|
|
@@ -17583,7 +17601,7 @@ function randomArrItem(arr, keepArr) {
|
|
|
17583
17601
|
if (Math.abs(this.time - this.lastTime) < 0.001) {
|
|
17584
17602
|
deltaTime = 0;
|
|
17585
17603
|
}
|
|
17586
|
-
particleSystem.
|
|
17604
|
+
particleSystem.update(deltaTime);
|
|
17587
17605
|
}
|
|
17588
17606
|
this.lastTime = this.time;
|
|
17589
17607
|
};
|
|
@@ -18605,7 +18623,6 @@ var tempSize = new Vector3(1, 1, 1);
|
|
|
18605
18623
|
var tempPos = new Vector3();
|
|
18606
18624
|
/**
|
|
18607
18625
|
* @since 2.0.0
|
|
18608
|
-
* @internal
|
|
18609
18626
|
*/ var TransformAnimationPlayable = /*#__PURE__*/ function(AnimationPlayable) {
|
|
18610
18627
|
_inherits(TransformAnimationPlayable, AnimationPlayable);
|
|
18611
18628
|
function TransformAnimationPlayable() {
|
|
@@ -18767,7 +18784,6 @@ TransformPlayableAsset = __decorate([
|
|
|
18767
18784
|
], TransformPlayableAsset);
|
|
18768
18785
|
/**
|
|
18769
18786
|
* @since 2.0.0
|
|
18770
|
-
* @internal
|
|
18771
18787
|
*/ var ActivationPlayable = /*#__PURE__*/ function(Playable) {
|
|
18772
18788
|
_inherits(ActivationPlayable, Playable);
|
|
18773
18789
|
function ActivationPlayable() {
|
|
@@ -18918,7 +18934,6 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18918
18934
|
|
|
18919
18935
|
/**
|
|
18920
18936
|
* @since 2.0.0
|
|
18921
|
-
* @internal
|
|
18922
18937
|
*/ var TimelineClip = /*#__PURE__*/ function() {
|
|
18923
18938
|
function TimelineClip() {
|
|
18924
18939
|
this.start = 0;
|
|
@@ -19316,25 +19331,15 @@ var TrackSortWrapper = function TrackSortWrapper(track, originalIndex) {
|
|
|
19316
19331
|
this.track = track;
|
|
19317
19332
|
this.originalIndex = originalIndex;
|
|
19318
19333
|
};
|
|
19319
|
-
function isAncestor(ancestorCandidate, descendantCandidate) {
|
|
19320
|
-
var current = descendantCandidate.parent;
|
|
19321
|
-
while(current){
|
|
19322
|
-
if (current === ancestorCandidate) {
|
|
19323
|
-
return true;
|
|
19324
|
-
}
|
|
19325
|
-
current = current.parent;
|
|
19326
|
-
}
|
|
19327
|
-
return false;
|
|
19328
|
-
}
|
|
19329
19334
|
function compareTracks(a, b) {
|
|
19330
19335
|
var bindingA = a.track.binding;
|
|
19331
19336
|
var bindingB = b.track.binding;
|
|
19332
19337
|
if (!_instanceof1(bindingA, VFXItem) || !_instanceof1(bindingB, VFXItem)) {
|
|
19333
19338
|
return a.originalIndex - b.originalIndex;
|
|
19334
19339
|
}
|
|
19335
|
-
if (isAncestor(bindingA, bindingB)) {
|
|
19340
|
+
if (VFXItem.isAncestor(bindingA, bindingB)) {
|
|
19336
19341
|
return -1;
|
|
19337
|
-
} else if (isAncestor(bindingB, bindingA)) {
|
|
19342
|
+
} else if (VFXItem.isAncestor(bindingB, bindingA)) {
|
|
19338
19343
|
return 1;
|
|
19339
19344
|
} else {
|
|
19340
19345
|
return a.originalIndex - b.originalIndex; // 非父子关系的元素保持原始顺序
|
|
@@ -19358,7 +19363,7 @@ function compareTracks(a, b) {
|
|
|
19358
19363
|
return _this;
|
|
19359
19364
|
}
|
|
19360
19365
|
var _proto = CompositionComponent.prototype;
|
|
19361
|
-
_proto.
|
|
19366
|
+
_proto.onStart = function onStart() {
|
|
19362
19367
|
var _this_item_props = this.item.props, _this_item_props_startTime = _this_item_props.startTime, startTime = _this_item_props_startTime === void 0 ? 0 : _this_item_props_startTime;
|
|
19363
19368
|
this.startTime = startTime;
|
|
19364
19369
|
this.resolveBindings();
|
|
@@ -19386,7 +19391,7 @@ function compareTracks(a, b) {
|
|
|
19386
19391
|
_proto.getReusable = function getReusable() {
|
|
19387
19392
|
return this.reusable;
|
|
19388
19393
|
};
|
|
19389
|
-
_proto.
|
|
19394
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
19390
19395
|
var time = this.time;
|
|
19391
19396
|
this.timelinePlayable.setTime(time);
|
|
19392
19397
|
this.graph.evaluate(dt);
|
|
@@ -19422,7 +19427,9 @@ function compareTracks(a, b) {
|
|
|
19422
19427
|
props.content = itemData.content;
|
|
19423
19428
|
item = assetLoader.loadGUID(itemData.id);
|
|
19424
19429
|
item.composition = this.item.composition;
|
|
19425
|
-
var compositionComponent =
|
|
19430
|
+
var compositionComponent = new CompositionComponent(this.engine);
|
|
19431
|
+
compositionComponent.item = item;
|
|
19432
|
+
item.components.push(compositionComponent);
|
|
19426
19433
|
compositionComponent.data = props;
|
|
19427
19434
|
compositionComponent.refId = refId;
|
|
19428
19435
|
item.transform.parentTransform = this.transform;
|
|
@@ -19833,8 +19840,8 @@ var TextComponent = /*#__PURE__*/ function(SpriteComponent) {
|
|
|
19833
19840
|
return _this;
|
|
19834
19841
|
}
|
|
19835
19842
|
var _proto = TextComponent.prototype;
|
|
19836
|
-
_proto.
|
|
19837
|
-
SpriteComponent.prototype.
|
|
19843
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
19844
|
+
SpriteComponent.prototype.onUpdate.call(this, dt);
|
|
19838
19845
|
this.updateTexture();
|
|
19839
19846
|
};
|
|
19840
19847
|
_proto.fromData = function fromData(data) {
|
|
@@ -20249,7 +20256,7 @@ var EffectComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
20249
20256
|
return _this;
|
|
20250
20257
|
}
|
|
20251
20258
|
var _proto = EffectComponent.prototype;
|
|
20252
|
-
_proto.
|
|
20259
|
+
_proto.onStart = function onStart() {
|
|
20253
20260
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
20254
20261
|
};
|
|
20255
20262
|
_proto.render = function render(renderer) {
|
|
@@ -20376,7 +20383,7 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
20376
20383
|
return _this;
|
|
20377
20384
|
}
|
|
20378
20385
|
var _proto = PostProcessVolume.prototype;
|
|
20379
|
-
_proto.
|
|
20386
|
+
_proto.onStart = function onStart() {
|
|
20380
20387
|
var composition = this.item.composition;
|
|
20381
20388
|
if (composition) {
|
|
20382
20389
|
composition.globalVolume = this;
|
|
@@ -20518,8 +20525,8 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20518
20525
|
*/ _this.ended = false;
|
|
20519
20526
|
_this.reusable = false;
|
|
20520
20527
|
_this.type = ItemType.base;
|
|
20528
|
+
_this.isDuringPlay = false;
|
|
20521
20529
|
_this.components = [];
|
|
20522
|
-
_this.itemBehaviours = [];
|
|
20523
20530
|
_this.rendererComponents = [];
|
|
20524
20531
|
/**
|
|
20525
20532
|
* 元素可见性,该值的改变会触发 `handleVisibleChanged` 回调
|
|
@@ -20529,6 +20536,7 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20529
20536
|
* 元素动画的速度
|
|
20530
20537
|
*/ _this.speed = 1;
|
|
20531
20538
|
_this.listIndex = 0;
|
|
20539
|
+
_this.isEnabled = false;
|
|
20532
20540
|
_this.eventProcessor = new EventEmitter();
|
|
20533
20541
|
_this.name = "VFXItem";
|
|
20534
20542
|
_this.transform.name = _this.name;
|
|
@@ -20601,8 +20609,7 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20601
20609
|
*/ _proto.addComponent = function addComponent(classConstructor) {
|
|
20602
20610
|
var newComponent = new classConstructor(this.engine);
|
|
20603
20611
|
this.components.push(newComponent);
|
|
20604
|
-
newComponent.
|
|
20605
|
-
newComponent.onAttached();
|
|
20612
|
+
newComponent.setVFXItem(this);
|
|
20606
20613
|
return newComponent;
|
|
20607
20614
|
};
|
|
20608
20615
|
/**
|
|
@@ -20635,21 +20642,22 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20635
20642
|
return res;
|
|
20636
20643
|
};
|
|
20637
20644
|
_proto.setParent = function setParent(vfxItem) {
|
|
20638
|
-
if (vfxItem === this) {
|
|
20645
|
+
if (vfxItem === this && !vfxItem) {
|
|
20639
20646
|
return;
|
|
20640
20647
|
}
|
|
20641
20648
|
if (this.parent) {
|
|
20642
20649
|
removeItem(this.parent.children, this);
|
|
20643
20650
|
}
|
|
20644
20651
|
this.parent = vfxItem;
|
|
20645
|
-
if (
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20652
|
+
if (!VFXItem.isCamera(this)) {
|
|
20653
|
+
this.transform.parentTransform = vfxItem.transform;
|
|
20654
|
+
}
|
|
20655
|
+
vfxItem.children.push(this);
|
|
20656
|
+
if (!this.composition) {
|
|
20657
|
+
this.composition = vfxItem.composition;
|
|
20658
|
+
}
|
|
20659
|
+
if (!this.isDuringPlay && vfxItem.isDuringPlay) {
|
|
20660
|
+
this.beginPlay();
|
|
20653
20661
|
}
|
|
20654
20662
|
};
|
|
20655
20663
|
/**
|
|
@@ -20680,6 +20688,7 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20680
20688
|
*/ _proto.setVisible = function setVisible(visible) {
|
|
20681
20689
|
if (this.visible !== visible) {
|
|
20682
20690
|
this.visible = !!visible;
|
|
20691
|
+
this.onActiveChanged();
|
|
20683
20692
|
}
|
|
20684
20693
|
};
|
|
20685
20694
|
/**
|
|
@@ -20804,6 +20813,57 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20804
20813
|
}
|
|
20805
20814
|
return undefined;
|
|
20806
20815
|
};
|
|
20816
|
+
/**
|
|
20817
|
+
* @internal
|
|
20818
|
+
*/ _proto.beginPlay = function beginPlay() {
|
|
20819
|
+
this.isDuringPlay = true;
|
|
20820
|
+
if (this.composition && this.visible && !this.isEnabled) {
|
|
20821
|
+
this.onEnable();
|
|
20822
|
+
}
|
|
20823
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.children), _step; !(_step = _iterator()).done;){
|
|
20824
|
+
var child = _step.value;
|
|
20825
|
+
if (!child.isDuringPlay) {
|
|
20826
|
+
child.beginPlay();
|
|
20827
|
+
}
|
|
20828
|
+
}
|
|
20829
|
+
};
|
|
20830
|
+
/**
|
|
20831
|
+
* @internal
|
|
20832
|
+
*/ _proto.onActiveChanged = function onActiveChanged() {
|
|
20833
|
+
if (!this.isEnabled) {
|
|
20834
|
+
this.onEnable();
|
|
20835
|
+
} else {
|
|
20836
|
+
this.onDisable();
|
|
20837
|
+
}
|
|
20838
|
+
};
|
|
20839
|
+
/**
|
|
20840
|
+
* @internal
|
|
20841
|
+
*/ _proto.onEnable = function onEnable() {
|
|
20842
|
+
this.isEnabled = true;
|
|
20843
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
|
|
20844
|
+
var component = _step.value;
|
|
20845
|
+
if (component.enabled && !component.isStartCalled) {
|
|
20846
|
+
component.onStart();
|
|
20847
|
+
}
|
|
20848
|
+
}
|
|
20849
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.components), _step1; !(_step1 = _iterator1()).done;){
|
|
20850
|
+
var component1 = _step1.value;
|
|
20851
|
+
if (component1.enabled && !component1.isEnableCalled) {
|
|
20852
|
+
component1.enable();
|
|
20853
|
+
}
|
|
20854
|
+
}
|
|
20855
|
+
};
|
|
20856
|
+
/**
|
|
20857
|
+
* @internal
|
|
20858
|
+
*/ _proto.onDisable = function onDisable() {
|
|
20859
|
+
this.isEnabled = false;
|
|
20860
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
|
|
20861
|
+
var component = _step.value;
|
|
20862
|
+
if (component.enabled && component.isEnableCalled) {
|
|
20863
|
+
component.disable();
|
|
20864
|
+
}
|
|
20865
|
+
}
|
|
20866
|
+
};
|
|
20807
20867
|
_proto.fromData = function fromData(data) {
|
|
20808
20868
|
EffectsObject.prototype.fromData.call(this, data);
|
|
20809
20869
|
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;
|
|
@@ -20853,14 +20913,10 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20853
20913
|
if (duration <= 0) {
|
|
20854
20914
|
throw new Error("Item duration can't be less than 0, see " + HELP_LINK["Item duration can't be less than 0"] + ".");
|
|
20855
20915
|
}
|
|
20856
|
-
this.itemBehaviours.length = 0;
|
|
20857
20916
|
this.rendererComponents.length = 0;
|
|
20858
20917
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
|
|
20859
20918
|
var component = _step.value;
|
|
20860
20919
|
component.item = this;
|
|
20861
|
-
if (_instanceof1(component, Behaviour)) {
|
|
20862
|
-
this.itemBehaviours.push(component);
|
|
20863
|
-
}
|
|
20864
20920
|
if (_instanceof1(component, RendererComponent)) {
|
|
20865
20921
|
this.rendererComponents.push(component);
|
|
20866
20922
|
}
|
|
@@ -20965,6 +21021,16 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20965
21021
|
VFXItem.isExtraCamera = function isExtraCamera(item) {
|
|
20966
21022
|
return item.id === "extra-camera" && item.name === "extra-camera";
|
|
20967
21023
|
};
|
|
21024
|
+
VFXItem.isAncestor = function isAncestor(ancestorCandidate, descendantCandidate) {
|
|
21025
|
+
var current = descendantCandidate.parent;
|
|
21026
|
+
while(current){
|
|
21027
|
+
if (current === ancestorCandidate) {
|
|
21028
|
+
return true;
|
|
21029
|
+
}
|
|
21030
|
+
current = current.parent;
|
|
21031
|
+
}
|
|
21032
|
+
return false;
|
|
21033
|
+
};
|
|
20968
21034
|
_create_class(VFXItem, [
|
|
20969
21035
|
{
|
|
20970
21036
|
key: "content",
|
|
@@ -24102,7 +24168,7 @@ var seed$1 = 1;
|
|
|
24102
24168
|
];
|
|
24103
24169
|
case 6:
|
|
24104
24170
|
e = _state.sent();
|
|
24105
|
-
throw new Error("Failed to load. Check the template or if the URL is " + (isVideo ? "video" : "image") + " type, URL: " + url + ", Error: " + e.message + ".");
|
|
24171
|
+
throw new Error("Failed to load. Check the template or if the URL is " + (isVideo ? "video" : "image") + " type, URL: " + url + ", Error: " + (e.message || e) + ".");
|
|
24106
24172
|
case 7:
|
|
24107
24173
|
return [
|
|
24108
24174
|
3,
|
|
@@ -24837,6 +24903,109 @@ var listOrder = 0;
|
|
|
24837
24903
|
return CompositionSourceManager;
|
|
24838
24904
|
}();
|
|
24839
24905
|
|
|
24906
|
+
var SceneTicking = /*#__PURE__*/ function() {
|
|
24907
|
+
function SceneTicking() {
|
|
24908
|
+
this.update = new UpdateTickData();
|
|
24909
|
+
this.lateUpdate = new LateUpdateTickData();
|
|
24910
|
+
}
|
|
24911
|
+
var _proto = SceneTicking.prototype;
|
|
24912
|
+
_proto.addComponent = function addComponent(obj) {
|
|
24913
|
+
if (obj.onUpdate !== Component.prototype.onUpdate) {
|
|
24914
|
+
this.update.addComponent(obj);
|
|
24915
|
+
}
|
|
24916
|
+
if (obj.onLateUpdate !== Component.prototype.onLateUpdate) {
|
|
24917
|
+
this.lateUpdate.addComponent(obj);
|
|
24918
|
+
}
|
|
24919
|
+
};
|
|
24920
|
+
_proto.removeComponent = function removeComponent(obj) {
|
|
24921
|
+
if (obj.onUpdate !== Component.prototype.onUpdate) {
|
|
24922
|
+
this.update.removeComponent(obj);
|
|
24923
|
+
}
|
|
24924
|
+
if (obj.onLateUpdate !== Component.prototype.onLateUpdate) {
|
|
24925
|
+
this.lateUpdate.removeComponent(obj);
|
|
24926
|
+
}
|
|
24927
|
+
};
|
|
24928
|
+
_proto.clear = function clear() {
|
|
24929
|
+
this.update.clear();
|
|
24930
|
+
this.lateUpdate.clear();
|
|
24931
|
+
};
|
|
24932
|
+
return SceneTicking;
|
|
24933
|
+
}();
|
|
24934
|
+
var TickData = /*#__PURE__*/ function() {
|
|
24935
|
+
function TickData() {
|
|
24936
|
+
this.components = [];
|
|
24937
|
+
this.ticks = [];
|
|
24938
|
+
}
|
|
24939
|
+
var _proto = TickData.prototype;
|
|
24940
|
+
_proto.tick = function tick(dt) {
|
|
24941
|
+
this.tickComponents(this.components, dt);
|
|
24942
|
+
for(var i = 0; i < this.ticks.length; i++){
|
|
24943
|
+
this.ticks[i](dt);
|
|
24944
|
+
}
|
|
24945
|
+
};
|
|
24946
|
+
_proto.tickComponents = function tickComponents(components, dt) {
|
|
24947
|
+
// To be implemented in derived classes
|
|
24948
|
+
};
|
|
24949
|
+
_proto.addComponent = function addComponent(component) {
|
|
24950
|
+
if (!this.components.includes(component)) {
|
|
24951
|
+
this.components.push(component);
|
|
24952
|
+
}
|
|
24953
|
+
};
|
|
24954
|
+
_proto.removeComponent = function removeComponent(component) {
|
|
24955
|
+
var index = this.components.indexOf(component);
|
|
24956
|
+
if (index > -1) {
|
|
24957
|
+
this.components.splice(index, 1);
|
|
24958
|
+
}
|
|
24959
|
+
};
|
|
24960
|
+
_proto.addTick = function addTick(method, callee) {
|
|
24961
|
+
var tick = method.bind(callee);
|
|
24962
|
+
if (!this.ticks.includes(tick)) {
|
|
24963
|
+
this.ticks.push(tick);
|
|
24964
|
+
}
|
|
24965
|
+
};
|
|
24966
|
+
_proto.clear = function clear() {
|
|
24967
|
+
this.components = [];
|
|
24968
|
+
};
|
|
24969
|
+
return TickData;
|
|
24970
|
+
}();
|
|
24971
|
+
var UpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
24972
|
+
_inherits(UpdateTickData, TickData);
|
|
24973
|
+
function UpdateTickData() {
|
|
24974
|
+
return TickData.apply(this, arguments);
|
|
24975
|
+
}
|
|
24976
|
+
var _proto = UpdateTickData.prototype;
|
|
24977
|
+
_proto.tickComponents = function tickComponents(components, dt) {
|
|
24978
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(components), _step; !(_step = _iterator()).done;){
|
|
24979
|
+
var component = _step.value;
|
|
24980
|
+
component.onUpdate(dt);
|
|
24981
|
+
}
|
|
24982
|
+
};
|
|
24983
|
+
return UpdateTickData;
|
|
24984
|
+
}(TickData);
|
|
24985
|
+
var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
24986
|
+
_inherits(LateUpdateTickData, TickData);
|
|
24987
|
+
function LateUpdateTickData() {
|
|
24988
|
+
return TickData.apply(this, arguments);
|
|
24989
|
+
}
|
|
24990
|
+
var _proto = LateUpdateTickData.prototype;
|
|
24991
|
+
_proto.tickComponents = function tickComponents(components, dt) {
|
|
24992
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(components), _step; !(_step = _iterator()).done;){
|
|
24993
|
+
var component = _step.value;
|
|
24994
|
+
component.onLateUpdate(dt);
|
|
24995
|
+
}
|
|
24996
|
+
};
|
|
24997
|
+
return LateUpdateTickData;
|
|
24998
|
+
} // function compareComponents (a: Component, b: Component): number {
|
|
24999
|
+
// const itemA = a.item;
|
|
25000
|
+
// const itemB = b.item;
|
|
25001
|
+
// if (VFXItem.isAncestor(itemA, itemB)) {
|
|
25002
|
+
// return -1;
|
|
25003
|
+
// } else {
|
|
25004
|
+
// return 1;
|
|
25005
|
+
// }
|
|
25006
|
+
// }
|
|
25007
|
+
(TickData);
|
|
25008
|
+
|
|
24840
25009
|
/**
|
|
24841
25010
|
* 合成抽象类:核心对象,通常一个场景只包含一个合成,可能会有多个合成。
|
|
24842
25011
|
* 合成中包含了相关的 Item 元素,支持对 Item 元素的创建、更新和销毁。
|
|
@@ -24846,6 +25015,7 @@ var listOrder = 0;
|
|
|
24846
25015
|
function Composition(props, scene) {
|
|
24847
25016
|
var _this;
|
|
24848
25017
|
_this = EventEmitter.call(this) || this;
|
|
25018
|
+
_this.sceneTicking = new SceneTicking();
|
|
24849
25019
|
/**
|
|
24850
25020
|
* 动画播放速度
|
|
24851
25021
|
*/ _this.speed = 1;
|
|
@@ -24883,9 +25053,12 @@ var listOrder = 0;
|
|
|
24883
25053
|
_this.rootItem = new VFXItem(_this.getEngine(), sourceContent);
|
|
24884
25054
|
_this.rootItem.name = "rootItem";
|
|
24885
25055
|
_this.rootItem.composition = _assert_this_initialized(_this);
|
|
24886
|
-
|
|
25056
|
+
// Spawn rootCompositionComponent
|
|
25057
|
+
_this.rootComposition = new CompositionComponent(_this.getEngine());
|
|
24887
25058
|
_this.rootComposition.startTime = sourceContent.startTime;
|
|
24888
25059
|
_this.rootComposition.data = sourceContent;
|
|
25060
|
+
_this.rootComposition.item = _this.rootItem;
|
|
25061
|
+
_this.rootItem.components.push(_this.rootComposition);
|
|
24889
25062
|
var imageUsage = !reusable && imgUsage;
|
|
24890
25063
|
_this.width = width;
|
|
24891
25064
|
_this.height = height;
|
|
@@ -24919,7 +25092,6 @@ var listOrder = 0;
|
|
|
24919
25092
|
_this.rendererOptions = null;
|
|
24920
25093
|
_this.rootComposition.createContent();
|
|
24921
25094
|
_this.buildItemTree(_this.rootItem);
|
|
24922
|
-
_this.callAwake(_this.rootItem);
|
|
24923
25095
|
_this.rootItem.onEnd = function() {
|
|
24924
25096
|
window.setTimeout(function() {
|
|
24925
25097
|
_this.emit("end", {
|
|
@@ -24931,6 +25103,16 @@ var listOrder = 0;
|
|
|
24931
25103
|
return _this;
|
|
24932
25104
|
}
|
|
24933
25105
|
var _proto = Composition.prototype;
|
|
25106
|
+
_proto.initializeSceneTicking = function initializeSceneTicking(item) {
|
|
25107
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(item.components), _step; !(_step = _iterator()).done;){
|
|
25108
|
+
var component = _step.value;
|
|
25109
|
+
this.sceneTicking.addComponent(component);
|
|
25110
|
+
}
|
|
25111
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.children), _step1; !(_step1 = _iterator1()).done;){
|
|
25112
|
+
var child = _step1.value;
|
|
25113
|
+
this.initializeSceneTicking(child);
|
|
25114
|
+
}
|
|
25115
|
+
};
|
|
24934
25116
|
/**
|
|
24935
25117
|
* 获取合成的时长
|
|
24936
25118
|
*/ _proto.getDuration = function getDuration() {
|
|
@@ -25033,7 +25215,7 @@ var listOrder = 0;
|
|
|
25033
25215
|
this.resume();
|
|
25034
25216
|
}
|
|
25035
25217
|
if (!this.rootComposition.isStartCalled) {
|
|
25036
|
-
this.rootComposition.
|
|
25218
|
+
this.rootComposition.onStart();
|
|
25037
25219
|
this.rootComposition.isStartCalled = true;
|
|
25038
25220
|
}
|
|
25039
25221
|
this.forwardTime(time + this.startTime);
|
|
@@ -25110,9 +25292,12 @@ var listOrder = 0;
|
|
|
25110
25292
|
// 更新 model-tree-plugin
|
|
25111
25293
|
this.updatePluginLoaders(deltaTime);
|
|
25112
25294
|
// scene VFXItem components lifetime function.
|
|
25113
|
-
|
|
25114
|
-
|
|
25115
|
-
|
|
25295
|
+
if (!this.rootItem.isDuringPlay) {
|
|
25296
|
+
this.callAwake(this.rootItem);
|
|
25297
|
+
this.rootItem.beginPlay();
|
|
25298
|
+
}
|
|
25299
|
+
this.sceneTicking.update.tick(time);
|
|
25300
|
+
this.sceneTicking.lateUpdate.tick(time);
|
|
25116
25301
|
this.updateCamera();
|
|
25117
25302
|
this.prepareRender();
|
|
25118
25303
|
if (this.shouldDispose()) {
|
|
@@ -25165,11 +25350,11 @@ var listOrder = 0;
|
|
|
25165
25350
|
return t;
|
|
25166
25351
|
};
|
|
25167
25352
|
_proto.callAwake = function callAwake(item) {
|
|
25168
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.
|
|
25169
|
-
var
|
|
25170
|
-
if (!
|
|
25171
|
-
|
|
25172
|
-
|
|
25353
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(item.components), _step; !(_step = _iterator()).done;){
|
|
25354
|
+
var component = _step.value;
|
|
25355
|
+
if (!component.isAwakeCalled) {
|
|
25356
|
+
component.onAwake();
|
|
25357
|
+
component.isAwakeCalled = true;
|
|
25173
25358
|
}
|
|
25174
25359
|
}
|
|
25175
25360
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.children), _step1; !(_step1 = _iterator1()).done;){
|
|
@@ -25177,72 +25362,6 @@ var listOrder = 0;
|
|
|
25177
25362
|
this.callAwake(child);
|
|
25178
25363
|
}
|
|
25179
25364
|
};
|
|
25180
|
-
_proto.callStart = function callStart(item) {
|
|
25181
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.itemBehaviours), _step; !(_step = _iterator()).done;){
|
|
25182
|
-
var itemBehaviour = _step.value;
|
|
25183
|
-
if (itemBehaviour.isActiveAndEnabled && !itemBehaviour.isStartCalled) {
|
|
25184
|
-
itemBehaviour.start();
|
|
25185
|
-
itemBehaviour.isStartCalled = true;
|
|
25186
|
-
}
|
|
25187
|
-
}
|
|
25188
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.rendererComponents), _step1; !(_step1 = _iterator1()).done;){
|
|
25189
|
-
var rendererComponent = _step1.value;
|
|
25190
|
-
if (rendererComponent.isActiveAndEnabled && !rendererComponent.isStartCalled) {
|
|
25191
|
-
rendererComponent.start();
|
|
25192
|
-
rendererComponent.isStartCalled = true;
|
|
25193
|
-
}
|
|
25194
|
-
}
|
|
25195
|
-
for(var _iterator2 = _create_for_of_iterator_helper_loose(item.children), _step2; !(_step2 = _iterator2()).done;){
|
|
25196
|
-
var child = _step2.value;
|
|
25197
|
-
this.callStart(child);
|
|
25198
|
-
}
|
|
25199
|
-
};
|
|
25200
|
-
_proto.callUpdate = function callUpdate(item, dt) {
|
|
25201
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.itemBehaviours), _step; !(_step = _iterator()).done;){
|
|
25202
|
-
var itemBehaviour = _step.value;
|
|
25203
|
-
if (itemBehaviour.isActiveAndEnabled && itemBehaviour.isStartCalled) {
|
|
25204
|
-
itemBehaviour.update(dt);
|
|
25205
|
-
}
|
|
25206
|
-
}
|
|
25207
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.rendererComponents), _step1; !(_step1 = _iterator1()).done;){
|
|
25208
|
-
var rendererComponent = _step1.value;
|
|
25209
|
-
if (rendererComponent.isActiveAndEnabled && rendererComponent.isStartCalled) {
|
|
25210
|
-
rendererComponent.update(dt);
|
|
25211
|
-
}
|
|
25212
|
-
}
|
|
25213
|
-
for(var _iterator2 = _create_for_of_iterator_helper_loose(item.children), _step2; !(_step2 = _iterator2()).done;){
|
|
25214
|
-
var child = _step2.value;
|
|
25215
|
-
if (VFXItem.isComposition(child)) {
|
|
25216
|
-
if (child.ended && child.endBehavior === EndBehavior.restart) {
|
|
25217
|
-
child.ended = false;
|
|
25218
|
-
// TODO K帧动画在元素重建后需要 tick ,否则会导致元素位置和 k 帧第一帧位置不一致
|
|
25219
|
-
this.callUpdate(child, 0);
|
|
25220
|
-
} else {
|
|
25221
|
-
this.callUpdate(child, dt);
|
|
25222
|
-
}
|
|
25223
|
-
} else {
|
|
25224
|
-
this.callUpdate(child, dt);
|
|
25225
|
-
}
|
|
25226
|
-
}
|
|
25227
|
-
};
|
|
25228
|
-
_proto.callLateUpdate = function callLateUpdate(item, dt) {
|
|
25229
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.itemBehaviours), _step; !(_step = _iterator()).done;){
|
|
25230
|
-
var itemBehaviour = _step.value;
|
|
25231
|
-
if (itemBehaviour.isActiveAndEnabled && itemBehaviour.isStartCalled) {
|
|
25232
|
-
itemBehaviour.lateUpdate(dt);
|
|
25233
|
-
}
|
|
25234
|
-
}
|
|
25235
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.rendererComponents), _step1; !(_step1 = _iterator1()).done;){
|
|
25236
|
-
var rendererComponent = _step1.value;
|
|
25237
|
-
if (rendererComponent.isActiveAndEnabled && rendererComponent.isStartCalled) {
|
|
25238
|
-
rendererComponent.lateUpdate(dt);
|
|
25239
|
-
}
|
|
25240
|
-
}
|
|
25241
|
-
for(var _iterator2 = _create_for_of_iterator_helper_loose(item.children), _step2; !(_step2 = _iterator2()).done;){
|
|
25242
|
-
var child = _step2.value;
|
|
25243
|
-
this.callLateUpdate(child, dt);
|
|
25244
|
-
}
|
|
25245
|
-
};
|
|
25246
25365
|
/**
|
|
25247
25366
|
* 构建父子树,同时保存到 itemCacheMap 中便于查找
|
|
25248
25367
|
*/ _proto.buildItemTree = function buildItemTree(compVFXItem) {
|
|
@@ -27524,11 +27643,12 @@ var FBGeometryDataT = /*#__PURE__*/ function() {
|
|
|
27524
27643
|
return Engine;
|
|
27525
27644
|
}();
|
|
27526
27645
|
|
|
27646
|
+
var DEFAULT_FPS = 60;
|
|
27527
27647
|
/**
|
|
27528
27648
|
* 定时器类
|
|
27529
27649
|
*/ var Ticker = /*#__PURE__*/ function() {
|
|
27530
27650
|
function Ticker(fps) {
|
|
27531
|
-
if (fps === void 0) fps =
|
|
27651
|
+
if (fps === void 0) fps = DEFAULT_FPS;
|
|
27532
27652
|
this.paused = true;
|
|
27533
27653
|
this.lastTime = 0;
|
|
27534
27654
|
// deltaTime
|
|
@@ -27663,7 +27783,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
27663
27783
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
27664
27784
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
27665
27785
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
27666
|
-
var version$1 = "2.0.
|
|
27786
|
+
var version$1 = "2.1.0-alpha.0";
|
|
27667
27787
|
logger.info("Core version: " + version$1 + ".");
|
|
27668
27788
|
|
|
27669
27789
|
var _obj;
|
|
@@ -28596,8 +28716,8 @@ var seed = 1;
|
|
|
28596
28716
|
this.material = mtl;
|
|
28597
28717
|
this.mesh.material = mtl.material;
|
|
28598
28718
|
};
|
|
28599
|
-
_proto.
|
|
28600
|
-
Mesh.prototype.
|
|
28719
|
+
_proto.onStart = function onStart() {
|
|
28720
|
+
Mesh.prototype.onStart.call(this);
|
|
28601
28721
|
this.engine.threeGroup.add(this.mesh);
|
|
28602
28722
|
};
|
|
28603
28723
|
/**
|
|
@@ -29204,8 +29324,8 @@ var ThreeSpriteComponent = /*#__PURE__*/ function(SpriteComponent) {
|
|
|
29204
29324
|
}
|
|
29205
29325
|
}
|
|
29206
29326
|
};
|
|
29207
|
-
_proto.
|
|
29208
|
-
SpriteComponent.prototype.
|
|
29327
|
+
_proto.onStart = function onStart() {
|
|
29328
|
+
SpriteComponent.prototype.onStart.call(this);
|
|
29209
29329
|
this.engine.threeGroup.add(this.threeMesh);
|
|
29210
29330
|
};
|
|
29211
29331
|
_proto.render = function render(renderer) {
|
|
@@ -29276,8 +29396,8 @@ var ThreeTextComponent = /*#__PURE__*/ function(ThreeSpriteComponent) {
|
|
|
29276
29396
|
return _this;
|
|
29277
29397
|
}
|
|
29278
29398
|
var _proto = ThreeTextComponent.prototype;
|
|
29279
|
-
_proto.
|
|
29280
|
-
ThreeSpriteComponent.prototype.
|
|
29399
|
+
_proto.onUpdate = function onUpdate(dt) {
|
|
29400
|
+
ThreeSpriteComponent.prototype.onUpdate.call(this, dt);
|
|
29281
29401
|
this.updateTexture(false);
|
|
29282
29402
|
};
|
|
29283
29403
|
_proto.fromData = function fromData(data) {
|
|
@@ -29344,8 +29464,8 @@ setMaxSpriteMeshItemCount(8);
|
|
|
29344
29464
|
*/ Mesh.create = function(engine, props) {
|
|
29345
29465
|
return new ThreeMesh(engine, props);
|
|
29346
29466
|
};
|
|
29347
|
-
var version = "2.0.
|
|
29467
|
+
var version = "2.1.0-alpha.0";
|
|
29348
29468
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
29349
29469
|
|
|
29350
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, 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, DEFAULT_FONTS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventEmitter, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, PostProcessVolume, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderbuffer, Renderer, RendererComponent, RuntimeClip, 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, ShaderFactory, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|
|
29470
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, 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, DEFAULT_FONTS, DEFAULT_FPS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventEmitter, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, PostProcessVolume, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderbuffer, Renderer, RendererComponent, RuntimeClip, 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, ShaderFactory, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|
|
29351
29471
|
//# sourceMappingURL=index.mjs.map
|