@galacean/effects-threejs 2.0.0-alpha.15 → 2.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +280 -238
- 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 +276 -236
- package/dist/index.mjs.map +1 -1
- package/dist/material/three-material.d.ts +1 -1
- package/dist/three-texture.d.ts +5 -0
- 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.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.17
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -450,7 +450,6 @@ function isSimulatorCellPhone() {
|
|
|
450
450
|
}
|
|
451
451
|
function isAlipayMiniApp() {
|
|
452
452
|
var _my;
|
|
453
|
-
// @ts-expect-error
|
|
454
453
|
return typeof my !== "undefined" && ((_my = my) == null ? void 0 : _my.renderTarget) === "web";
|
|
455
454
|
}
|
|
456
455
|
|
|
@@ -706,8 +705,8 @@ function noop() {}
|
|
|
706
705
|
*
|
|
707
706
|
* @static
|
|
708
707
|
* @function isString
|
|
709
|
-
* @param
|
|
710
|
-
* @return
|
|
708
|
+
* @param obj - 要判断的对象
|
|
709
|
+
* @return
|
|
711
710
|
*/ function isString(obj) {
|
|
712
711
|
return typeof obj === "string";
|
|
713
712
|
}
|
|
@@ -716,8 +715,8 @@ function noop() {}
|
|
|
716
715
|
*
|
|
717
716
|
* @static
|
|
718
717
|
* @function isArray
|
|
719
|
-
* @param
|
|
720
|
-
* @return
|
|
718
|
+
* @param obj - 要判断的对象
|
|
719
|
+
* @return
|
|
721
720
|
*/ var isArray = Array.isArray || function(obj) {
|
|
722
721
|
return Object.prototype.toString.call(obj) === "[object Array]";
|
|
723
722
|
};
|
|
@@ -726,8 +725,8 @@ function noop() {}
|
|
|
726
725
|
*
|
|
727
726
|
* @static
|
|
728
727
|
* @function isFunction
|
|
729
|
-
* @param
|
|
730
|
-
* @return
|
|
728
|
+
* @param obj - 要判断的对象
|
|
729
|
+
* @return
|
|
731
730
|
*/ function isFunction(obj) {
|
|
732
731
|
return Object.prototype.toString.call(obj) === "[object Function]";
|
|
733
732
|
}
|
|
@@ -736,8 +735,8 @@ function noop() {}
|
|
|
736
735
|
*
|
|
737
736
|
* @static
|
|
738
737
|
* @function isObject
|
|
739
|
-
* @param
|
|
740
|
-
* @return
|
|
738
|
+
* @param obj - 要判断的对象
|
|
739
|
+
* @return
|
|
741
740
|
*/ function isObject(obj) {
|
|
742
741
|
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
743
742
|
}
|
|
@@ -746,25 +745,12 @@ function isCanvas(canvas) {
|
|
|
746
745
|
// 小程序 Canvas 无法使用 instanceof HTMLCanvasElement 判断
|
|
747
746
|
return typeof canvas === "object" && canvas !== null && ((_canvas_tagName = canvas.tagName) == null ? void 0 : _canvas_tagName.toUpperCase()) === "CANVAS";
|
|
748
747
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
}
|
|
756
|
-
var ret = {};
|
|
757
|
-
var kas = Object.keys(obj);
|
|
758
|
-
for(var i = 0; i < kas.length; i++){
|
|
759
|
-
var key = kas[i];
|
|
760
|
-
ret[key] = deepClone(obj[key]);
|
|
761
|
-
}
|
|
762
|
-
return ret;
|
|
763
|
-
}
|
|
764
|
-
return obj;
|
|
765
|
-
}
|
|
766
|
-
// TODO: 改名
|
|
767
|
-
function random(min, max) {
|
|
748
|
+
/**
|
|
749
|
+
* 生成一个位于 min 和 max 之间的随机数
|
|
750
|
+
* @param min
|
|
751
|
+
* @param max
|
|
752
|
+
* @returns
|
|
753
|
+
*/ function randomInRange(min, max) {
|
|
768
754
|
return min + Math.random() * (max - min);
|
|
769
755
|
}
|
|
770
756
|
function throwDestroyedError() {
|
|
@@ -4095,7 +4081,7 @@ var CameraClipMode;
|
|
|
4095
4081
|
* 蒙版形状切分
|
|
4096
4082
|
*/ ValueType[ValueType["SHAPE_SPLITS"] = 11] = "SHAPE_SPLITS";
|
|
4097
4083
|
/**
|
|
4098
|
-
|
|
4084
|
+
* 直线路径
|
|
4099
4085
|
*/ ValueType[ValueType["LINEAR_PATH"] = 12] = "LINEAR_PATH";
|
|
4100
4086
|
/**
|
|
4101
4087
|
* 多色
|
|
@@ -4271,7 +4257,7 @@ var TextAlignment;
|
|
|
4271
4257
|
(function(TextAlignment) {
|
|
4272
4258
|
/**
|
|
4273
4259
|
* text alignment starts from(x,y) to right direction
|
|
4274
|
-
* 从(x,y)开始第一个字符,向右边延伸
|
|
4260
|
+
* 从 (x,y) 开始第一个字符,向右边延伸
|
|
4275
4261
|
*/ TextAlignment[TextAlignment["left"] = 0] = "left";
|
|
4276
4262
|
/**
|
|
4277
4263
|
* (x,y) is middle position of text, where (left + right)/2 =(x,y)
|
|
@@ -4279,7 +4265,7 @@ var TextAlignment;
|
|
|
4279
4265
|
*/ TextAlignment[TextAlignment["middle"] = 1] = "middle";
|
|
4280
4266
|
/**
|
|
4281
4267
|
* text alignment ends with(x,y) from left direction
|
|
4282
|
-
* 从(x,y)结束最后一个字符,向左边延伸
|
|
4268
|
+
* 从 (x,y) 结束最后一个字符,向左边延伸
|
|
4283
4269
|
*/ TextAlignment[TextAlignment["right"] = 2] = "right";
|
|
4284
4270
|
})(TextAlignment || (TextAlignment = {}));
|
|
4285
4271
|
/**
|
|
@@ -4329,6 +4315,7 @@ var DataType;
|
|
|
4329
4315
|
DataType["TimelineAsset"] = "TimelineAsset";
|
|
4330
4316
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
4331
4317
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
4318
|
+
DataType["BinaryAsset"] = "BinaryAsset";
|
|
4332
4319
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
4333
4320
|
DataType["MeshComponent"] = "MeshComponent";
|
|
4334
4321
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
@@ -4337,6 +4324,7 @@ var DataType;
|
|
|
4337
4324
|
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
4338
4325
|
DataType["TreeComponent"] = "TreeComponent";
|
|
4339
4326
|
DataType["AnimationComponent"] = "AnimationComponent";
|
|
4327
|
+
DataType["SpineComponent"] = "SpineComponent";
|
|
4340
4328
|
// Non-EffectObject
|
|
4341
4329
|
DataType["TimelineClip"] = "TimelineClip";
|
|
4342
4330
|
})(DataType || (DataType = {}));
|
|
@@ -4424,11 +4412,11 @@ var VertexBufferSemantic;
|
|
|
4424
4412
|
VertexBufferSemantic["TangentBS3"] = "TANGENT_BS3";
|
|
4425
4413
|
})(VertexBufferSemantic || (VertexBufferSemantic = {}));
|
|
4426
4414
|
|
|
4427
|
-
var BuiltinObjectGUID =
|
|
4415
|
+
var BuiltinObjectGUID = {
|
|
4416
|
+
WhiteTexture: "whitetexture00000000000000000000",
|
|
4417
|
+
PBRShader: "pbr00000000000000000000000000000",
|
|
4418
|
+
UnlitShader: "unlit000000000000000000000000000"
|
|
4428
4419
|
};
|
|
4429
|
-
BuiltinObjectGUID.WhiteTexture = "whitetexture00000000000000000000";
|
|
4430
|
-
BuiltinObjectGUID.PBRShader = "pbr00000000000000000000000000000";
|
|
4431
|
-
BuiltinObjectGUID.UnlitShader = "unlit000000000000000000000000000";
|
|
4432
4420
|
|
|
4433
4421
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
4434
4422
|
__proto__: null,
|
|
@@ -4484,15 +4472,20 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
4484
4472
|
BuiltinObjectGUID: BuiltinObjectGUID
|
|
4485
4473
|
});
|
|
4486
4474
|
|
|
4487
|
-
var effectsClassStore = {};
|
|
4488
4475
|
var decoratorInitialStore = {};
|
|
4489
4476
|
var mergedStore = {};
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4477
|
+
var effectsClassStore = {};
|
|
4478
|
+
function effectsClass(className) {
|
|
4479
|
+
return function(target, context) {
|
|
4480
|
+
if (effectsClassStore[className]) {
|
|
4481
|
+
console.warn("Class " + className + " 重复注册");
|
|
4482
|
+
}
|
|
4483
|
+
// TODO: three修改json dataType, 这边重复注册直接 return
|
|
4484
|
+
effectsClassStore[className] = target;
|
|
4485
|
+
};
|
|
4486
|
+
}
|
|
4487
|
+
function serialize(type, sourceName) {
|
|
4488
|
+
return generateSerializableMember(type, sourceName); // value member
|
|
4496
4489
|
}
|
|
4497
4490
|
function getMergedStore(target) {
|
|
4498
4491
|
var classKey = target.constructor.name;
|
|
@@ -4517,18 +4510,6 @@ function getMergedStore(target) {
|
|
|
4517
4510
|
}
|
|
4518
4511
|
return store;
|
|
4519
4512
|
}
|
|
4520
|
-
function serialize(type, sourceName) {
|
|
4521
|
-
return generateSerializableMember(type, sourceName); // value member
|
|
4522
|
-
}
|
|
4523
|
-
function effectsClass(className) {
|
|
4524
|
-
return function(target, context) {
|
|
4525
|
-
if (effectsClassStore[className]) {
|
|
4526
|
-
console.warn("Class " + className + " 重复注册");
|
|
4527
|
-
}
|
|
4528
|
-
//TODO: three修改json dataType, 这边重复注册直接 return
|
|
4529
|
-
effectsClassStore[className] = target;
|
|
4530
|
-
};
|
|
4531
|
-
}
|
|
4532
4513
|
function generateSerializableMember(type, sourceName) {
|
|
4533
4514
|
return function(target, propertyKey) {
|
|
4534
4515
|
var classStore = getDirectStore(target);
|
|
@@ -4540,6 +4521,13 @@ function generateSerializableMember(type, sourceName) {
|
|
|
4540
4521
|
}
|
|
4541
4522
|
};
|
|
4542
4523
|
}
|
|
4524
|
+
function getDirectStore(target) {
|
|
4525
|
+
var classKey = target.constructor.name;
|
|
4526
|
+
if (!decoratorInitialStore[classKey]) {
|
|
4527
|
+
decoratorInitialStore[classKey] = {};
|
|
4528
|
+
}
|
|
4529
|
+
return decoratorInitialStore[classKey];
|
|
4530
|
+
}
|
|
4543
4531
|
|
|
4544
4532
|
/**
|
|
4545
4533
|
* @since 2.0.0
|
|
@@ -4571,6 +4559,9 @@ function generateSerializableMember(type, sourceName) {
|
|
|
4571
4559
|
}
|
|
4572
4560
|
};
|
|
4573
4561
|
_proto.dispose = function dispose() {};
|
|
4562
|
+
EffectsObject.is = function is(obj) {
|
|
4563
|
+
return _instanceof1(obj, EffectsObject) && "guid" in obj;
|
|
4564
|
+
};
|
|
4574
4565
|
return EffectsObject;
|
|
4575
4566
|
}();
|
|
4576
4567
|
__decorate([
|
|
@@ -4723,6 +4714,7 @@ __decorate([
|
|
|
4723
4714
|
_this = Component.apply(this, arguments) || this;
|
|
4724
4715
|
_this.started = false;
|
|
4725
4716
|
_this.materials = [];
|
|
4717
|
+
_this._priority = 0;
|
|
4726
4718
|
_this._enabled = true;
|
|
4727
4719
|
return _this;
|
|
4728
4720
|
}
|
|
@@ -9979,7 +9971,7 @@ var RandomValue = /*#__PURE__*/ function(ValueGetter) {
|
|
|
9979
9971
|
this.max = props[1];
|
|
9980
9972
|
};
|
|
9981
9973
|
_proto.getValue = function getValue(time) {
|
|
9982
|
-
return
|
|
9974
|
+
return randomInRange(this.min, this.max);
|
|
9983
9975
|
};
|
|
9984
9976
|
_proto.toUniform = function toUniform() {
|
|
9985
9977
|
return new Float32Array([
|
|
@@ -13689,13 +13681,16 @@ var SpriteColorPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
13689
13681
|
}
|
|
13690
13682
|
var _proto = SpriteColorPlayable.prototype;
|
|
13691
13683
|
_proto.processFrame = function processFrame(context) {
|
|
13692
|
-
var
|
|
13684
|
+
var boundObject = context.output.getUserData();
|
|
13685
|
+
if (!_instanceof1(boundObject, VFXItem)) {
|
|
13686
|
+
return;
|
|
13687
|
+
}
|
|
13693
13688
|
if (!this.spriteMaterial) {
|
|
13694
|
-
this.spriteMaterial =
|
|
13689
|
+
this.spriteMaterial = boundObject.getComponent(SpriteComponent).material;
|
|
13695
13690
|
}
|
|
13696
13691
|
var colorInc = vecFill(tempColor, 1);
|
|
13697
13692
|
var colorChanged;
|
|
13698
|
-
var life = this.time /
|
|
13693
|
+
var life = this.time / boundObject.duration;
|
|
13699
13694
|
var opacityOverLifetime = this.opacityOverLifetime;
|
|
13700
13695
|
var colorOverLifetime = this.colorOverLifetime;
|
|
13701
13696
|
if (colorOverLifetime) {
|
|
@@ -13825,7 +13820,6 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13825
13820
|
renderer.drawGeometry(geo, material);
|
|
13826
13821
|
};
|
|
13827
13822
|
_proto.start = function start() {
|
|
13828
|
-
this.priority = this.item.listIndex;
|
|
13829
13823
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
13830
13824
|
};
|
|
13831
13825
|
_proto.update = function update(dt) {
|
|
@@ -14713,7 +14707,7 @@ var Cone = /*#__PURE__*/ function() {
|
|
|
14713
14707
|
// dir + [0,0,1]
|
|
14714
14708
|
dir.z += 1;
|
|
14715
14709
|
return {
|
|
14716
|
-
position: position.multiply(
|
|
14710
|
+
position: position.multiply(randomInRange(0, 1)),
|
|
14717
14711
|
direction: dir.normalize()
|
|
14718
14712
|
};
|
|
14719
14713
|
};
|
|
@@ -14721,7 +14715,7 @@ var Cone = /*#__PURE__*/ function() {
|
|
|
14721
14715
|
}();
|
|
14722
14716
|
function getArcAngle(arc, arcMode, opt) {
|
|
14723
14717
|
if (arcMode === ShapeArcMode.RANDOM) {
|
|
14724
|
-
arc =
|
|
14718
|
+
arc = randomInRange(0, arc);
|
|
14725
14719
|
} else if (arcMode === ShapeArcMode.UNIDIRECTIONAL_CYCLE) {
|
|
14726
14720
|
var d = opt.index % (opt.total + 1);
|
|
14727
14721
|
arc = arc / opt.total * d;
|
|
@@ -14761,8 +14755,8 @@ var Rectangle = /*#__PURE__*/ function() {
|
|
|
14761
14755
|
}
|
|
14762
14756
|
var _proto = Rectangle.prototype;
|
|
14763
14757
|
_proto.generate = function generate(opt) {
|
|
14764
|
-
var x =
|
|
14765
|
-
var y =
|
|
14758
|
+
var x = randomInRange(-this._d, this._d);
|
|
14759
|
+
var y = randomInRange(-this._h, this._h);
|
|
14766
14760
|
return {
|
|
14767
14761
|
direction: new Vector3(0, 0, 1),
|
|
14768
14762
|
position: new Vector3(x, y, 0)
|
|
@@ -14812,7 +14806,7 @@ var Edge = /*#__PURE__*/ function() {
|
|
|
14812
14806
|
}
|
|
14813
14807
|
var _proto = Edge.prototype;
|
|
14814
14808
|
_proto.generate = function generate(options) {
|
|
14815
|
-
var x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) :
|
|
14809
|
+
var x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) : randomInRange(0, 1);
|
|
14816
14810
|
return {
|
|
14817
14811
|
direction: new Vector3(0, 1, 0),
|
|
14818
14812
|
position: new Vector3(this._d * (x - 0.5), 0, 0)
|
|
@@ -14833,7 +14827,7 @@ var Donut = /*#__PURE__*/ function() {
|
|
|
14833
14827
|
_proto.generate = function generate(opt) {
|
|
14834
14828
|
var dradius = this.donutRadius;
|
|
14835
14829
|
var center = this.radius - dradius;
|
|
14836
|
-
var angle =
|
|
14830
|
+
var angle = randomInRange(0, Math.PI * 2);
|
|
14837
14831
|
var arc = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
|
|
14838
14832
|
var rot = tempMat4$2.setFromRotationZ(arc);
|
|
14839
14833
|
var direction = new Vector3(Math.cos(angle), Math.sin(angle), 0);
|
|
@@ -14856,7 +14850,7 @@ var Sphere = /*#__PURE__*/ function() {
|
|
|
14856
14850
|
}
|
|
14857
14851
|
var _proto = Sphere.prototype;
|
|
14858
14852
|
_proto.getHorizontalAngle = function getHorizontalAngle() {
|
|
14859
|
-
return
|
|
14853
|
+
return randomInRange(-90, 90);
|
|
14860
14854
|
};
|
|
14861
14855
|
_proto.generate = function generate(opt) {
|
|
14862
14856
|
var rz = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
|
|
@@ -14879,7 +14873,7 @@ var Hemisphere = /*#__PURE__*/ function(Sphere) {
|
|
|
14879
14873
|
}
|
|
14880
14874
|
var _proto = Hemisphere.prototype;
|
|
14881
14875
|
_proto.getHorizontalAngle = function getHorizontalAngle() {
|
|
14882
|
-
return
|
|
14876
|
+
return randomInRange(0, 90);
|
|
14883
14877
|
};
|
|
14884
14878
|
return Hemisphere;
|
|
14885
14879
|
}(Sphere);
|
|
@@ -16229,7 +16223,7 @@ function getTrailMeshShader(trails, particleMaxCount, name, env, gpuCapability)
|
|
|
16229
16223
|
}
|
|
16230
16224
|
var _proto = ParticleSystemRenderer.prototype;
|
|
16231
16225
|
_proto.start = function start() {
|
|
16232
|
-
this._priority = this.item.
|
|
16226
|
+
this._priority = this.item.renderOrder;
|
|
16233
16227
|
this.particleMesh.gravityModifier.scaleXCoord(this.item.duration);
|
|
16234
16228
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.meshes), _step; !(_step = _iterator()).done;){
|
|
16235
16229
|
var mesh = _step.value;
|
|
@@ -16917,11 +16911,9 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16917
16911
|
this.props = props;
|
|
16918
16912
|
this.destroyed = false;
|
|
16919
16913
|
var cachePrefix = "";
|
|
16920
|
-
var options = props.options;
|
|
16921
|
-
var
|
|
16922
|
-
var
|
|
16923
|
-
var gravityModifier = positionOverLifetime.gravityOverLifetime;
|
|
16924
|
-
var gravity = ensureVec3(positionOverLifetime.gravity);
|
|
16914
|
+
var options = props.options, _props_positionOverLifetime = props.positionOverLifetime, positionOverLifetime = _props_positionOverLifetime === void 0 ? {} : _props_positionOverLifetime, shape = props.shape;
|
|
16915
|
+
var gravityModifier = positionOverLifetime == null ? void 0 : positionOverLifetime.gravityOverLifetime;
|
|
16916
|
+
var gravity = ensureVec3(positionOverLifetime == null ? void 0 : positionOverLifetime.gravity);
|
|
16925
16917
|
var _textureSheetAnimation = props.textureSheetAnimation;
|
|
16926
16918
|
var textureSheetAnimation = _textureSheetAnimation ? {
|
|
16927
16919
|
animationDelay: createValueGetter(_textureSheetAnimation.animationDelay || 0),
|
|
@@ -16932,7 +16924,7 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16932
16924
|
row: _textureSheetAnimation.row,
|
|
16933
16925
|
total: _textureSheetAnimation.total || _textureSheetAnimation.col * _textureSheetAnimation.row
|
|
16934
16926
|
} : undefined;
|
|
16935
|
-
var startTurbulence = !!(shape && shape.turbulenceX || shape.turbulenceY || shape.turbulenceZ);
|
|
16927
|
+
var startTurbulence = !!(shape && shape.turbulenceX || (shape == null ? void 0 : shape.turbulenceY) || (shape == null ? void 0 : shape.turbulenceZ));
|
|
16936
16928
|
var turbulence;
|
|
16937
16929
|
if (startTurbulence) {
|
|
16938
16930
|
var _shape_turbulenceX, _shape_turbulenceY, _shape_turbulenceZ;
|
|
@@ -16965,7 +16957,7 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16965
16957
|
}
|
|
16966
16958
|
}
|
|
16967
16959
|
var forceTarget;
|
|
16968
|
-
if (positionOverLifetime.forceTarget) {
|
|
16960
|
+
if (positionOverLifetime == null ? void 0 : positionOverLifetime.forceTarget) {
|
|
16969
16961
|
forceTarget = {
|
|
16970
16962
|
target: positionOverLifetime.target || [
|
|
16971
16963
|
0,
|
|
@@ -17279,13 +17271,13 @@ function randomArrItem(arr, keepArr) {
|
|
|
17279
17271
|
}
|
|
17280
17272
|
var _proto = ParticleBehaviourPlayable.prototype;
|
|
17281
17273
|
_proto.start = function start(context) {
|
|
17282
|
-
var
|
|
17283
|
-
if (this.particleSystem) {
|
|
17274
|
+
var boundObject = context.output.getUserData();
|
|
17275
|
+
if (this.particleSystem || !_instanceof1(boundObject, VFXItem)) {
|
|
17284
17276
|
return;
|
|
17285
17277
|
}
|
|
17286
|
-
this.particleSystem =
|
|
17278
|
+
this.particleSystem = boundObject.getComponent(ParticleSystem);
|
|
17287
17279
|
if (this.particleSystem) {
|
|
17288
|
-
this.particleSystem.name =
|
|
17280
|
+
this.particleSystem.name = boundObject.name;
|
|
17289
17281
|
this.particleSystem.start();
|
|
17290
17282
|
this.particleSystem.initEmitterTransform();
|
|
17291
17283
|
}
|
|
@@ -18443,10 +18435,13 @@ var tempPos = new Vector3();
|
|
|
18443
18435
|
};
|
|
18444
18436
|
_proto.processFrame = function processFrame(context) {
|
|
18445
18437
|
if (!this.binding) {
|
|
18446
|
-
|
|
18447
|
-
|
|
18438
|
+
var boundObject = context.output.getUserData();
|
|
18439
|
+
if (_instanceof1(boundObject, VFXItem)) {
|
|
18440
|
+
this.binding = boundObject;
|
|
18441
|
+
this.start();
|
|
18442
|
+
}
|
|
18448
18443
|
}
|
|
18449
|
-
if (this.binding.composition) {
|
|
18444
|
+
if (this.binding && this.binding.composition) {
|
|
18450
18445
|
this.sampleAnimation();
|
|
18451
18446
|
}
|
|
18452
18447
|
};
|
|
@@ -18655,14 +18650,40 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18655
18650
|
}
|
|
18656
18651
|
var _proto = AnimationClipPlayable.prototype;
|
|
18657
18652
|
_proto.processFrame = function processFrame(context) {
|
|
18658
|
-
var
|
|
18659
|
-
if (
|
|
18660
|
-
|
|
18653
|
+
var boundObject = context.output.getUserData();
|
|
18654
|
+
if (!_instanceof1(boundObject, VFXItem)) {
|
|
18655
|
+
return;
|
|
18656
|
+
}
|
|
18657
|
+
if (boundObject.composition) {
|
|
18658
|
+
this.clip.sampleAnimation(boundObject, this.time);
|
|
18661
18659
|
}
|
|
18662
18660
|
};
|
|
18663
18661
|
return AnimationClipPlayable;
|
|
18664
18662
|
}(Playable);
|
|
18665
18663
|
|
|
18664
|
+
/**
|
|
18665
|
+
* @since 2.0.0
|
|
18666
|
+
* @internal
|
|
18667
|
+
*/ var TimelineClip = /*#__PURE__*/ function() {
|
|
18668
|
+
function TimelineClip() {
|
|
18669
|
+
this.start = 0;
|
|
18670
|
+
this.duration = 0;
|
|
18671
|
+
}
|
|
18672
|
+
var _proto = TimelineClip.prototype;
|
|
18673
|
+
_proto.toLocalTime = function toLocalTime(time) {
|
|
18674
|
+
var localTime = time - this.start;
|
|
18675
|
+
var duration = this.duration;
|
|
18676
|
+
if (localTime - duration > 0.001) {
|
|
18677
|
+
if (this.endBehaviour === ItemEndBehavior.loop) {
|
|
18678
|
+
localTime = localTime % duration;
|
|
18679
|
+
} else if (this.endBehaviour === ItemEndBehavior.freeze) {
|
|
18680
|
+
localTime = Math.min(duration, localTime);
|
|
18681
|
+
}
|
|
18682
|
+
}
|
|
18683
|
+
return localTime;
|
|
18684
|
+
};
|
|
18685
|
+
return TimelineClip;
|
|
18686
|
+
}();
|
|
18666
18687
|
var TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
18667
18688
|
_inherits(TrackAsset, PlayableAsset);
|
|
18668
18689
|
function TrackAsset() {
|
|
@@ -18751,7 +18772,7 @@ var TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
18751
18772
|
return TrackAsset;
|
|
18752
18773
|
}(PlayableAsset);
|
|
18753
18774
|
__decorate([
|
|
18754
|
-
serialize(
|
|
18775
|
+
serialize(TimelineClip)
|
|
18755
18776
|
], TrackAsset.prototype, "clips", void 0);
|
|
18756
18777
|
__decorate([
|
|
18757
18778
|
serialize()
|
|
@@ -18764,29 +18785,6 @@ var TrackType;
|
|
|
18764
18785
|
TrackType[TrackType["MasterTrack"] = 0] = "MasterTrack";
|
|
18765
18786
|
TrackType[TrackType["ObjectTrack"] = 1] = "ObjectTrack";
|
|
18766
18787
|
})(TrackType || (TrackType = {}));
|
|
18767
|
-
var TimelineClip = /*#__PURE__*/ function() {
|
|
18768
|
-
function TimelineClip() {
|
|
18769
|
-
this.start = 0;
|
|
18770
|
-
this.duration = 0;
|
|
18771
|
-
}
|
|
18772
|
-
var _proto = TimelineClip.prototype;
|
|
18773
|
-
_proto.toLocalTime = function toLocalTime(time) {
|
|
18774
|
-
var localTime = time - this.start;
|
|
18775
|
-
var duration = this.duration;
|
|
18776
|
-
if (localTime - duration > 0.001) {
|
|
18777
|
-
if (this.endBehaviour === ItemEndBehavior.loop) {
|
|
18778
|
-
localTime = localTime % duration;
|
|
18779
|
-
} else if (this.endBehaviour === ItemEndBehavior.freeze) {
|
|
18780
|
-
localTime = Math.min(duration, localTime);
|
|
18781
|
-
}
|
|
18782
|
-
}
|
|
18783
|
-
return localTime;
|
|
18784
|
-
};
|
|
18785
|
-
return TimelineClip;
|
|
18786
|
-
}();
|
|
18787
|
-
TimelineClip = __decorate([
|
|
18788
|
-
effectsClass("TimelineClip")
|
|
18789
|
-
], TimelineClip);
|
|
18790
18788
|
var RuntimeClip = /*#__PURE__*/ function() {
|
|
18791
18789
|
function RuntimeClip(clip, clipPlayable, parentMixer, track) {
|
|
18792
18790
|
this.clip = clip;
|
|
@@ -18873,10 +18871,6 @@ var ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
|
|
|
18873
18871
|
particleClip.endBehaviour = boundItem.endBehavior;
|
|
18874
18872
|
}
|
|
18875
18873
|
};
|
|
18876
|
-
_proto.fromData = function fromData(data) {
|
|
18877
|
-
TrackAsset1.prototype.fromData.call(this, data);
|
|
18878
|
-
this.data = data;
|
|
18879
|
-
};
|
|
18880
18874
|
return ObjectBindingTrack;
|
|
18881
18875
|
}(TrackAsset);
|
|
18882
18876
|
ObjectBindingTrack = __decorate([
|
|
@@ -18901,13 +18895,11 @@ var ActivationMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18901
18895
|
}
|
|
18902
18896
|
var _proto = ActivationMixerPlayable.prototype;
|
|
18903
18897
|
_proto.processFrame = function processFrame(context) {
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
}
|
|
18907
|
-
if (!this.bindingItem) {
|
|
18898
|
+
var boundObject = context.output.getUserData();
|
|
18899
|
+
if (!_instanceof1(boundObject, VFXItem)) {
|
|
18908
18900
|
return;
|
|
18909
18901
|
}
|
|
18910
|
-
var
|
|
18902
|
+
var boundItem = boundObject;
|
|
18911
18903
|
var hasInput = false;
|
|
18912
18904
|
for(var i = 0; i < this.getInputCount(); i++){
|
|
18913
18905
|
if (this.getInputWeight(i) > 0) {
|
|
@@ -18916,11 +18908,11 @@ var ActivationMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18916
18908
|
}
|
|
18917
18909
|
}
|
|
18918
18910
|
if (hasInput) {
|
|
18919
|
-
|
|
18920
|
-
this.showRendererComponents(
|
|
18911
|
+
boundItem.transform.setValid(true);
|
|
18912
|
+
this.showRendererComponents(boundItem);
|
|
18921
18913
|
} else {
|
|
18922
|
-
|
|
18923
|
-
this.hideRendererComponents(
|
|
18914
|
+
boundItem.transform.setValid(false);
|
|
18915
|
+
this.hideRendererComponents(boundItem);
|
|
18924
18916
|
}
|
|
18925
18917
|
};
|
|
18926
18918
|
_proto.hideRendererComponents = function hideRendererComponents(item) {
|
|
@@ -19118,7 +19110,6 @@ function compareTracks(a, b) {
|
|
|
19118
19110
|
this.startTime = startTime;
|
|
19119
19111
|
this.resolveBindings();
|
|
19120
19112
|
this.timelinePlayable = this.timelineAsset.createPlayable(this.graph);
|
|
19121
|
-
this.timelinePlayable.play();
|
|
19122
19113
|
// 重播不销毁元素
|
|
19123
19114
|
if (this.item.endBehavior !== ItemEndBehavior.destroy) {
|
|
19124
19115
|
this.setReusable(true);
|
|
@@ -19347,7 +19338,9 @@ var SubCompositionClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
19347
19338
|
var _proto = SubCompositionClipPlayable.prototype;
|
|
19348
19339
|
_proto.processFrame = function processFrame(context) {
|
|
19349
19340
|
var boundObject = context.output.getUserData();
|
|
19350
|
-
boundObject
|
|
19341
|
+
if (_instanceof1(boundObject, CompositionComponent)) {
|
|
19342
|
+
boundObject.time = this.getTime();
|
|
19343
|
+
}
|
|
19351
19344
|
};
|
|
19352
19345
|
return SubCompositionClipPlayable;
|
|
19353
19346
|
}(Playable);
|
|
@@ -19535,7 +19528,6 @@ var CanvasPool = /*#__PURE__*/ function() {
|
|
|
19535
19528
|
return this.elements.shift();
|
|
19536
19529
|
}
|
|
19537
19530
|
if (getConfig(TEMPLATE_USE_OFFSCREEN_CANVAS)) {
|
|
19538
|
-
// @ts-expect-error
|
|
19539
19531
|
return window._createOffscreenCanvas(10, 10);
|
|
19540
19532
|
} else {
|
|
19541
19533
|
// in hongmeng system, create too many canvas will case render error
|
|
@@ -20104,6 +20096,7 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20104
20096
|
/**
|
|
20105
20097
|
* 元素动画的速度
|
|
20106
20098
|
*/ _this.speed = 1;
|
|
20099
|
+
_this.listIndex = 0;
|
|
20107
20100
|
_this.name = "VFXItem";
|
|
20108
20101
|
_this.transform.name = _this.name;
|
|
20109
20102
|
_this.transform.engine = engine;
|
|
@@ -20374,7 +20367,6 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20374
20367
|
this.parentId = parentId;
|
|
20375
20368
|
this.duration = duration;
|
|
20376
20369
|
this.endBehavior = endBehavior;
|
|
20377
|
-
this.listIndex = listIndex;
|
|
20378
20370
|
//@ts-expect-error
|
|
20379
20371
|
this.oldId = data.oldId;
|
|
20380
20372
|
if (!data.content) {
|
|
@@ -20385,18 +20377,12 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20385
20377
|
if (duration <= 0) {
|
|
20386
20378
|
throw Error("Item duration can't be less than 0, see " + HELP_LINK["Item duration can't be less than 0"]);
|
|
20387
20379
|
}
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
var newComponent = component;
|
|
20392
|
-
this.components.push(newComponent);
|
|
20393
|
-
if (_instanceof1(newComponent, RendererComponent)) {
|
|
20394
|
-
this.rendererComponents.push(newComponent);
|
|
20395
|
-
} else if (_instanceof1(newComponent, ItemBehaviour)) {
|
|
20396
|
-
this.itemBehaviours.push(newComponent);
|
|
20397
|
-
}
|
|
20398
|
-
}
|
|
20380
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
|
|
20381
|
+
var component = _step.value;
|
|
20382
|
+
component.onAttached();
|
|
20399
20383
|
}
|
|
20384
|
+
// renderOrder 在 component 初始化后设置。确保能拿到 rendererComponent。
|
|
20385
|
+
this.renderOrder = listIndex;
|
|
20400
20386
|
};
|
|
20401
20387
|
_proto.toData = function toData() {
|
|
20402
20388
|
var _this_parent;
|
|
@@ -20506,10 +20492,30 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20506
20492
|
var _this_composition_reusable;
|
|
20507
20493
|
return (_this_composition_reusable = (_this_composition = this.composition) == null ? void 0 : _this_composition.reusable) != null ? _this_composition_reusable : false;
|
|
20508
20494
|
}
|
|
20495
|
+
},
|
|
20496
|
+
{
|
|
20497
|
+
key: "renderOrder",
|
|
20498
|
+
get: /**
|
|
20499
|
+
* 元素在合成中的索引
|
|
20500
|
+
*/ function get() {
|
|
20501
|
+
return this.listIndex;
|
|
20502
|
+
},
|
|
20503
|
+
set: function set(value) {
|
|
20504
|
+
if (this.listIndex !== value) {
|
|
20505
|
+
this.listIndex = value;
|
|
20506
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.rendererComponents), _step; !(_step = _iterator()).done;){
|
|
20507
|
+
var rendererComponent = _step.value;
|
|
20508
|
+
rendererComponent.priority = value;
|
|
20509
|
+
}
|
|
20510
|
+
}
|
|
20511
|
+
}
|
|
20509
20512
|
}
|
|
20510
20513
|
]);
|
|
20511
20514
|
return VFXItem;
|
|
20512
20515
|
}(EffectsObject);
|
|
20516
|
+
__decorate([
|
|
20517
|
+
serialize()
|
|
20518
|
+
], VFXItem.prototype, "components", void 0);
|
|
20513
20519
|
VFXItem = __decorate([
|
|
20514
20520
|
effectsClass(DataType.VFXItemData)
|
|
20515
20521
|
], VFXItem);
|
|
@@ -20739,22 +20745,22 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20739
20745
|
if (value === undefined) {
|
|
20740
20746
|
value = effectsObject[key];
|
|
20741
20747
|
}
|
|
20742
|
-
if (
|
|
20743
|
-
|
|
20744
|
-
} else if (
|
|
20748
|
+
if (EffectsObject.is(value)) {
|
|
20749
|
+
SerializationHelper.collectSerializableObject(value, res);
|
|
20750
|
+
} else if (isArray(value)) {
|
|
20745
20751
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(value), _step1; !(_step1 = _iterator1()).done;){
|
|
20746
20752
|
var arrayValue = _step1.value;
|
|
20747
|
-
if (
|
|
20748
|
-
|
|
20753
|
+
if (EffectsObject.is(arrayValue)) {
|
|
20754
|
+
SerializationHelper.collectSerializableObject(arrayValue, res);
|
|
20749
20755
|
}
|
|
20750
20756
|
}
|
|
20751
|
-
} else if (
|
|
20757
|
+
} else if (isObject(value)) {
|
|
20752
20758
|
// 非 EffectsObject 对象只递归一层
|
|
20753
20759
|
for(var _iterator2 = _create_for_of_iterator_helper_loose(Object.keys(value)), _step2; !(_step2 = _iterator2()).done;){
|
|
20754
20760
|
var objectKey = _step2.value;
|
|
20755
20761
|
var objectValue = value[objectKey];
|
|
20756
|
-
if (
|
|
20757
|
-
|
|
20762
|
+
if (EffectsObject.is(objectValue)) {
|
|
20763
|
+
SerializationHelper.collectSerializableObject(objectValue, res);
|
|
20758
20764
|
}
|
|
20759
20765
|
}
|
|
20760
20766
|
}
|
|
@@ -20791,17 +20797,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20791
20797
|
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(value)) {
|
|
20792
20798
|
// TODO json 数据避免传 typedArray
|
|
20793
20799
|
serializedData[key] = value;
|
|
20794
|
-
} else if (
|
|
20800
|
+
} else if (isArray(value)) {
|
|
20795
20801
|
if (!serializedData[key]) {
|
|
20796
20802
|
serializedData[key] = [];
|
|
20797
20803
|
}
|
|
20798
20804
|
SerializationHelper.serializeArrayProperty(value, serializedData[key], 0);
|
|
20799
|
-
} else if (
|
|
20805
|
+
} else if (EffectsObject.is(value)) {
|
|
20800
20806
|
// TODO 处理 EffectsObject 递归序列化
|
|
20801
20807
|
serializedData[key] = {
|
|
20802
20808
|
id: value.getInstanceId()
|
|
20803
20809
|
};
|
|
20804
|
-
} else if (
|
|
20810
|
+
} else if (isObject(value)) {
|
|
20805
20811
|
if (!serializedData[key]) {
|
|
20806
20812
|
serializedData[key] = {};
|
|
20807
20813
|
}
|
|
@@ -20815,17 +20821,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20815
20821
|
if (typeof value1 === "number" || typeof value1 === "string" || typeof value1 === "boolean" || SerializationHelper.checkTypedArray(value1)) {
|
|
20816
20822
|
// TODO json 数据避免传 typedArray
|
|
20817
20823
|
serializedData[key1] = value1;
|
|
20818
|
-
} else if (
|
|
20824
|
+
} else if (isArray(value1)) {
|
|
20819
20825
|
if (!serializedData[key1]) {
|
|
20820
20826
|
serializedData[key1] = [];
|
|
20821
20827
|
}
|
|
20822
20828
|
SerializationHelper.serializeArrayProperty(value1, serializedData[key1], 0);
|
|
20823
|
-
} else if (
|
|
20829
|
+
} else if (EffectsObject.is(value1)) {
|
|
20824
20830
|
// TODO 处理 EffectsObject 递归序列化
|
|
20825
20831
|
serializedData[key1] = {
|
|
20826
20832
|
id: value1.getInstanceId()
|
|
20827
20833
|
};
|
|
20828
|
-
} else if (
|
|
20834
|
+
} else if (isObject(value1)) {
|
|
20829
20835
|
if (!serializedData[key1]) {
|
|
20830
20836
|
serializedData[key1] = {};
|
|
20831
20837
|
}
|
|
@@ -20938,13 +20944,13 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20938
20944
|
SerializationHelper.checkTypedArray = function checkTypedArray(obj) {
|
|
20939
20945
|
return _instanceof1(obj, Int8Array) || _instanceof1(obj, Uint8Array) || _instanceof1(obj, Uint8ClampedArray) || _instanceof1(obj, Int16Array) || _instanceof1(obj, Uint16Array) || _instanceof1(obj, Int32Array) || _instanceof1(obj, Uint32Array) || _instanceof1(obj, Float32Array) || _instanceof1(obj, Float64Array) || _instanceof1(obj, ArrayBuffer);
|
|
20940
20946
|
};
|
|
20947
|
+
// check value is { id: 7e69662e964e4892ae8933f24562395b }
|
|
20941
20948
|
SerializationHelper.checkDataPath = function checkDataPath(value) {
|
|
20942
|
-
|
|
20943
|
-
return _instanceof1(value, Object) && Object.keys(value).length === 1 && value.id && value.id.length === 32;
|
|
20949
|
+
return !!(isObject(value) && Object.keys(value).length === 1 && "id" in value && isString(value.id) && value.id.length === 32);
|
|
20944
20950
|
};
|
|
20945
20951
|
// TODO 测试函数,2.0 上线后移除
|
|
20946
20952
|
SerializationHelper.checkGLTFNode = function checkGLTFNode(value) {
|
|
20947
|
-
return
|
|
20953
|
+
return isObject(value) && value.nodeIndex !== undefined && value.isJoint !== undefined;
|
|
20948
20954
|
};
|
|
20949
20955
|
SerializationHelper.checkImageSource = function checkImageSource(value) {
|
|
20950
20956
|
return isCanvas(value) || _instanceof1(value, HTMLImageElement);
|
|
@@ -20954,9 +20960,8 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20954
20960
|
console.error("序列化数据的内嵌对象层数大于上限");
|
|
20955
20961
|
return;
|
|
20956
20962
|
}
|
|
20957
|
-
|
|
20958
|
-
|
|
20959
|
-
} else if (_instanceof1(property, Array)) {
|
|
20963
|
+
// 加载并链接 DataPath 字段表示的 EffectsObject 引用。Class 对象 copy [key, value] 会丢失对象信息,因此只递归数组对象和普通 js Object 结构对象。
|
|
20964
|
+
if (isArray(property)) {
|
|
20960
20965
|
var res = [];
|
|
20961
20966
|
for(var _iterator = _create_for_of_iterator_helper_loose(property), _step; !(_step = _iterator()).done;){
|
|
20962
20967
|
var value = _step.value;
|
|
@@ -20966,27 +20971,25 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20966
20971
|
// TODO json 数据避免传 typedArray
|
|
20967
20972
|
} else if (SerializationHelper.checkDataPath(property)) {
|
|
20968
20973
|
return engine.assetLoader.loadGUID(property.id);
|
|
20969
|
-
} else if (
|
|
20970
|
-
return property;
|
|
20971
|
-
} else if (_instanceof1(property, Object)) {
|
|
20974
|
+
} else if (isObject(property) && property.constructor === Object) {
|
|
20972
20975
|
var res1;
|
|
20973
20976
|
if (type) {
|
|
20974
|
-
|
|
20975
|
-
res1 = new classConstructor();
|
|
20977
|
+
res1 = new type();
|
|
20976
20978
|
} else {
|
|
20977
20979
|
res1 = {};
|
|
20978
20980
|
}
|
|
20979
20981
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property)), _step1; !(_step1 = _iterator1()).done;){
|
|
20980
20982
|
var key = _step1.value;
|
|
20981
|
-
// @ts-expect-error
|
|
20982
20983
|
res1[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
|
|
20983
20984
|
}
|
|
20984
20985
|
return res1;
|
|
20986
|
+
} else {
|
|
20987
|
+
return property;
|
|
20985
20988
|
}
|
|
20986
20989
|
};
|
|
20987
20990
|
SerializationHelper.deserializePropertyAsync = function deserializePropertyAsync(property, engine, level, type) {
|
|
20988
20991
|
return _async_to_generator(function() {
|
|
20989
|
-
var res, _iterator, _step, value, _, res1, res2,
|
|
20992
|
+
var res, _iterator, _step, value, _, res1, res2, _iterator1, _step1, key;
|
|
20990
20993
|
return __generator(this, function(_state) {
|
|
20991
20994
|
switch(_state.label){
|
|
20992
20995
|
case 0:
|
|
@@ -20996,26 +20999,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20996
20999
|
2
|
|
20997
21000
|
];
|
|
20998
21001
|
}
|
|
20999
|
-
if (!(
|
|
21002
|
+
if (!isArray(property)) return [
|
|
21000
21003
|
3,
|
|
21001
|
-
|
|
21002
|
-
];
|
|
21003
|
-
return [
|
|
21004
|
-
2,
|
|
21005
|
-
property
|
|
21006
|
-
];
|
|
21007
|
-
case 1:
|
|
21008
|
-
if (!_instanceof1(property, Array)) return [
|
|
21009
|
-
3,
|
|
21010
|
-
6
|
|
21004
|
+
5
|
|
21011
21005
|
];
|
|
21012
21006
|
res = [];
|
|
21013
21007
|
_iterator = _create_for_of_iterator_helper_loose(property);
|
|
21014
|
-
_state.label =
|
|
21015
|
-
case
|
|
21008
|
+
_state.label = 1;
|
|
21009
|
+
case 1:
|
|
21016
21010
|
if (!!(_step = _iterator()).done) return [
|
|
21017
21011
|
3,
|
|
21018
|
-
|
|
21012
|
+
4
|
|
21019
21013
|
];
|
|
21020
21014
|
value = _step.value;
|
|
21021
21015
|
_ = res.push;
|
|
@@ -21023,61 +21017,58 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21023
21017
|
4,
|
|
21024
21018
|
SerializationHelper.deserializePropertyAsync(value, engine, level + 1, type)
|
|
21025
21019
|
];
|
|
21026
|
-
case
|
|
21020
|
+
case 2:
|
|
21027
21021
|
_.apply(res, [
|
|
21028
21022
|
_state.sent()
|
|
21029
21023
|
]);
|
|
21030
|
-
_state.label =
|
|
21031
|
-
case
|
|
21024
|
+
_state.label = 3;
|
|
21025
|
+
case 3:
|
|
21032
21026
|
return [
|
|
21033
21027
|
3,
|
|
21034
|
-
|
|
21028
|
+
1
|
|
21035
21029
|
];
|
|
21036
|
-
case
|
|
21030
|
+
case 4:
|
|
21037
21031
|
return [
|
|
21038
21032
|
2,
|
|
21039
21033
|
res
|
|
21040
21034
|
];
|
|
21041
|
-
case
|
|
21035
|
+
case 5:
|
|
21042
21036
|
if (!SerializationHelper.checkDataPath(property)) return [
|
|
21043
21037
|
3,
|
|
21044
|
-
|
|
21038
|
+
7
|
|
21045
21039
|
];
|
|
21046
21040
|
return [
|
|
21047
21041
|
4,
|
|
21048
21042
|
engine.assetLoader.loadGUIDAsync(property.id)
|
|
21049
21043
|
];
|
|
21050
|
-
case
|
|
21044
|
+
case 6:
|
|
21051
21045
|
res1 = _state.sent();
|
|
21052
21046
|
return [
|
|
21053
21047
|
2,
|
|
21054
21048
|
res1
|
|
21055
21049
|
];
|
|
21056
|
-
case
|
|
21057
|
-
if (
|
|
21058
|
-
return [
|
|
21059
|
-
2,
|
|
21060
|
-
property
|
|
21061
|
-
];
|
|
21062
|
-
} else if (_instanceof1(property, Object)) {
|
|
21050
|
+
case 7:
|
|
21051
|
+
if (isObject(property) && property.constructor === Object) {
|
|
21063
21052
|
if (type) {
|
|
21064
|
-
|
|
21065
|
-
res2 = new classConstructor();
|
|
21053
|
+
res2 = new type();
|
|
21066
21054
|
} else {
|
|
21067
21055
|
res2 = {};
|
|
21068
21056
|
}
|
|
21069
21057
|
for(_iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property)); !(_step1 = _iterator1()).done;){
|
|
21070
21058
|
key = _step1.value;
|
|
21071
|
-
// @ts-expect-error
|
|
21072
21059
|
res2[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
|
|
21073
21060
|
}
|
|
21074
21061
|
return [
|
|
21075
21062
|
2,
|
|
21076
21063
|
res2
|
|
21077
21064
|
];
|
|
21065
|
+
} else {
|
|
21066
|
+
return [
|
|
21067
|
+
2,
|
|
21068
|
+
property
|
|
21069
|
+
];
|
|
21078
21070
|
}
|
|
21079
|
-
|
|
21080
|
-
case 9:
|
|
21071
|
+
case 8:
|
|
21081
21072
|
return [
|
|
21082
21073
|
2
|
|
21083
21074
|
];
|
|
@@ -21099,17 +21090,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21099
21090
|
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(objectProperty)) {
|
|
21100
21091
|
// TODO json 数据避免传 typedArray
|
|
21101
21092
|
serializedData[key] = value;
|
|
21102
|
-
} else if (
|
|
21093
|
+
} else if (isArray(value)) {
|
|
21103
21094
|
if (!serializedData[key]) {
|
|
21104
21095
|
serializedData[key] = [];
|
|
21105
21096
|
}
|
|
21106
21097
|
SerializationHelper.serializeArrayProperty(value, serializedData[key], level + 1);
|
|
21107
|
-
} else if (
|
|
21098
|
+
} else if (EffectsObject.is(value)) {
|
|
21108
21099
|
// TODO 处理 EffectsObject 递归序列化
|
|
21109
21100
|
serializedData[key] = {
|
|
21110
21101
|
id: value.getInstanceId()
|
|
21111
21102
|
};
|
|
21112
|
-
} else if (
|
|
21103
|
+
} else if (isObject(value)) {
|
|
21113
21104
|
if (!serializedData[key]) {
|
|
21114
21105
|
serializedData[key] = {};
|
|
21115
21106
|
}
|
|
@@ -21130,17 +21121,17 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21130
21121
|
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(arrayProperty)) {
|
|
21131
21122
|
// TODO json 数据避免传 typedArray
|
|
21132
21123
|
serializedData[i] = value;
|
|
21133
|
-
} else if (
|
|
21124
|
+
} else if (isArray(value)) {
|
|
21134
21125
|
if (!serializedData[i]) {
|
|
21135
21126
|
serializedData[i] = [];
|
|
21136
21127
|
}
|
|
21137
|
-
|
|
21138
|
-
} else if (
|
|
21128
|
+
SerializationHelper.serializeArrayProperty(value, serializedData[i], level + 1);
|
|
21129
|
+
} else if (EffectsObject.is(value)) {
|
|
21139
21130
|
// TODO 处理 EffectsObject 递归序列化
|
|
21140
21131
|
serializedData[i] = {
|
|
21141
21132
|
id: value.getInstanceId()
|
|
21142
21133
|
};
|
|
21143
|
-
} else if (
|
|
21134
|
+
} else if (isObject(value)) {
|
|
21144
21135
|
if (!serializedData[i]) {
|
|
21145
21136
|
serializedData[i] = {};
|
|
21146
21137
|
}
|
|
@@ -22180,8 +22171,6 @@ function getStandardCameraContent(model) {
|
|
|
22180
22171
|
// 生成时间轴数据
|
|
22181
22172
|
convertTimelineAsset(compositionData, guidToItemMap, result);
|
|
22182
22173
|
};
|
|
22183
|
-
var // 更正 spine 数据中的 images 属性
|
|
22184
|
-
_json_spines;
|
|
22185
22174
|
var // 兼容老版本数据中不存在textures的情况
|
|
22186
22175
|
_result;
|
|
22187
22176
|
var result = _extends({}, json, {
|
|
@@ -22191,7 +22180,8 @@ function getStandardCameraContent(model) {
|
|
|
22191
22180
|
materials: [],
|
|
22192
22181
|
shaders: [],
|
|
22193
22182
|
geometries: [],
|
|
22194
|
-
animations: []
|
|
22183
|
+
animations: [],
|
|
22184
|
+
miscs: []
|
|
22195
22185
|
});
|
|
22196
22186
|
// image数据添加 guid
|
|
22197
22187
|
for(var _iterator = _create_for_of_iterator_helper_loose(result.images), _step; !(_step = _iterator()).done;){
|
|
@@ -22221,17 +22211,10 @@ function getStandardCameraContent(model) {
|
|
|
22221
22211
|
});
|
|
22222
22212
|
}
|
|
22223
22213
|
}
|
|
22224
|
-
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
var textureId = (_json_textures_spine_images_i = json.textures[spine.images[i]]) == null ? void 0 : _json_textures_spine_images_i.id;
|
|
22229
|
-
//@ts-expect-error
|
|
22230
|
-
spine.images[i] = {
|
|
22231
|
-
id: textureId
|
|
22232
|
-
};
|
|
22233
|
-
}
|
|
22234
|
-
});
|
|
22214
|
+
// 处理老版本数据中 bins 没有 id 的情况
|
|
22215
|
+
if (json.bins) {
|
|
22216
|
+
convertBinaryAsset(json.bins, result);
|
|
22217
|
+
}
|
|
22235
22218
|
var itemOldIdToGuidMap = {};
|
|
22236
22219
|
var guidToItemMap = {};
|
|
22237
22220
|
// 更正Composition.endBehavior
|
|
@@ -22395,6 +22378,10 @@ function getStandardCameraContent(model) {
|
|
|
22395
22378
|
//@ts-expect-error
|
|
22396
22379
|
item.type = "orientation-transformer";
|
|
22397
22380
|
}
|
|
22381
|
+
// Spine 元素转为 guid 索引
|
|
22382
|
+
if (item.type === ItemType.spine && json.spines && json.spines.length !== 0) {
|
|
22383
|
+
convertSpineData(json.spines[item.content.options.spine], item.content, result);
|
|
22384
|
+
}
|
|
22398
22385
|
// item 的 content 转为 component data 加入 JSONScene.components
|
|
22399
22386
|
if (item.type === ItemType.sprite || item.type === ItemType.particle || item.type === ItemType.mesh || item.type === ItemType.skybox || item.type === ItemType.light || item.type === "camera" || item.type === ItemType.tree || item.type === ItemType.interact || item.type === ItemType.camera || item.type === ItemType.text || item.type === ItemType.spine || item.type === "editor-gizmo" || item.type === "orientation-transformer") {
|
|
22400
22387
|
item.components = [];
|
|
@@ -22642,22 +22629,54 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22642
22629
|
id: timelineAssetData.id
|
|
22643
22630
|
};
|
|
22644
22631
|
composition.sceneBindings = sceneBindings;
|
|
22645
|
-
|
|
22646
|
-
jsonScene.animations = [];
|
|
22647
|
-
}
|
|
22648
|
-
// @ts-expect-error
|
|
22649
|
-
jsonScene.animations.push(timelineAssetData);
|
|
22632
|
+
jsonScene.miscs.push(timelineAssetData);
|
|
22650
22633
|
for(var _iterator2 = _create_for_of_iterator_helper_loose(trackDatas), _step2; !(_step2 = _iterator2()).done;){
|
|
22651
22634
|
var trackData1 = _step2.value;
|
|
22652
22635
|
//@ts-expect-error
|
|
22653
|
-
jsonScene.
|
|
22636
|
+
jsonScene.miscs.push(trackData1);
|
|
22654
22637
|
}
|
|
22655
22638
|
for(var _iterator3 = _create_for_of_iterator_helper_loose(playableAssetDatas), _step3; !(_step3 = _iterator3()).done;){
|
|
22656
22639
|
var playableAsset = _step3.value;
|
|
22657
22640
|
//@ts-expect-error
|
|
22658
|
-
jsonScene.
|
|
22641
|
+
jsonScene.miscs.push(playableAsset);
|
|
22659
22642
|
}
|
|
22660
22643
|
}
|
|
22644
|
+
function convertBinaryAsset(bins, jsonScene) {
|
|
22645
|
+
//@ts-expect-error
|
|
22646
|
+
jsonScene.bins = bins.map(function(bin) {
|
|
22647
|
+
return {
|
|
22648
|
+
url: bin.url,
|
|
22649
|
+
"dataType": "BinaryAsset",
|
|
22650
|
+
id: generateGUID()
|
|
22651
|
+
};
|
|
22652
|
+
});
|
|
22653
|
+
}
|
|
22654
|
+
function convertSpineData(resource, content, jsonScene) {
|
|
22655
|
+
//@ts-expect-error
|
|
22656
|
+
content.resource = {
|
|
22657
|
+
"atlas": {
|
|
22658
|
+
"bins": {
|
|
22659
|
+
//@ts-expect-error
|
|
22660
|
+
"id": jsonScene.bins[resource.atlas[1][0]].id
|
|
22661
|
+
},
|
|
22662
|
+
"source": resource.atlas[1].slice(1)
|
|
22663
|
+
},
|
|
22664
|
+
"skeleton": {
|
|
22665
|
+
"bins": {
|
|
22666
|
+
//@ts-expect-error
|
|
22667
|
+
"id": jsonScene.bins[resource.skeleton[1][0]].id
|
|
22668
|
+
},
|
|
22669
|
+
"source": resource.skeleton[1].slice(1)
|
|
22670
|
+
},
|
|
22671
|
+
"skeletonType": resource.skeletonType,
|
|
22672
|
+
"images": resource.images.map(function(i) {
|
|
22673
|
+
return {
|
|
22674
|
+
//@ts-expect-error
|
|
22675
|
+
id: jsonScene.textures[i].id
|
|
22676
|
+
};
|
|
22677
|
+
})
|
|
22678
|
+
};
|
|
22679
|
+
}
|
|
22661
22680
|
|
|
22662
22681
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
22663
22682
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
@@ -22971,7 +22990,17 @@ function getStandardItem(item, opt) {
|
|
|
22971
22990
|
}
|
|
22972
22991
|
|
|
22973
22992
|
var _obj$1;
|
|
22974
|
-
|
|
22993
|
+
/**
|
|
22994
|
+
* 机型和渲染等级对应表
|
|
22995
|
+
*
|
|
22996
|
+
* 机型:B-低端机、A-中端机、S-高端机
|
|
22997
|
+
* 渲染等级:B-低、A-中、S-高、A+-中高、B+-全部
|
|
22998
|
+
*
|
|
22999
|
+
* - S(高端机):高、全部、中高
|
|
23000
|
+
* - A(中端机):中、全部、中高
|
|
23001
|
+
* - B(低端机):低、全部
|
|
23002
|
+
* - undefined(全部机型)
|
|
23003
|
+
*/ var renderLevelPassSet = (_obj$1 = {}, _obj$1[RenderLevel.S] = [
|
|
22975
23004
|
RenderLevel.S,
|
|
22976
23005
|
RenderLevel.BPlus,
|
|
22977
23006
|
RenderLevel.APlus
|
|
@@ -23393,7 +23422,7 @@ var seed$1 = 1;
|
|
|
23393
23422
|
return [
|
|
23394
23423
|
4,
|
|
23395
23424
|
new Promise(function(resolve) {
|
|
23396
|
-
shaderLibrary.compileAllShaders(function() {
|
|
23425
|
+
shaderLibrary == null ? void 0 : shaderLibrary.compileAllShaders(function() {
|
|
23397
23426
|
resolve(null);
|
|
23398
23427
|
});
|
|
23399
23428
|
})
|
|
@@ -24375,7 +24404,7 @@ var listOrder = 0;
|
|
|
24375
24404
|
scene.textures = undefined;
|
|
24376
24405
|
scene.consumed = true;
|
|
24377
24406
|
}
|
|
24378
|
-
var _this_compositionSourceManager = this.compositionSourceManager, sourceContent = _this_compositionSourceManager.sourceContent, pluginSystem = _this_compositionSourceManager.pluginSystem, imgUsage = _this_compositionSourceManager.imgUsage, totalTime = _this_compositionSourceManager.totalTime,
|
|
24407
|
+
var _this_compositionSourceManager = this.compositionSourceManager, sourceContent = _this_compositionSourceManager.sourceContent, pluginSystem = _this_compositionSourceManager.pluginSystem, imgUsage = _this_compositionSourceManager.imgUsage, totalTime = _this_compositionSourceManager.totalTime, refCompositionProps = _this_compositionSourceManager.refCompositionProps;
|
|
24379
24408
|
assertExist(sourceContent);
|
|
24380
24409
|
this.renderer = renderer;
|
|
24381
24410
|
this.refCompositionProps = refCompositionProps;
|
|
@@ -24401,7 +24430,6 @@ var listOrder = 0;
|
|
|
24401
24430
|
};
|
|
24402
24431
|
this.reusable = reusable;
|
|
24403
24432
|
this.speed = speed;
|
|
24404
|
-
this.renderLevel = renderLevel;
|
|
24405
24433
|
this.autoRefTex = !this.keepResource && imageUsage && this.rootItem.endBehavior !== ItemEndBehavior.loop;
|
|
24406
24434
|
this.name = sourceContent.name;
|
|
24407
24435
|
this.pluginSystem = pluginSystem;
|
|
@@ -25208,7 +25236,7 @@ var listOrder = 0;
|
|
|
25208
25236
|
};
|
|
25209
25237
|
_proto.addPackageDatas = function addPackageDatas(scene) {
|
|
25210
25238
|
var jsonScene = scene.jsonScene, _scene_textureOptions = scene.textureOptions, textureOptions = _scene_textureOptions === void 0 ? [] : _scene_textureOptions;
|
|
25211
|
-
var _jsonScene_items = jsonScene.items, items = _jsonScene_items === void 0 ? [] : _jsonScene_items, _jsonScene_materials = jsonScene.materials, materials = _jsonScene_materials === void 0 ? [] : _jsonScene_materials, _jsonScene_shaders = jsonScene.shaders, shaders = _jsonScene_shaders === void 0 ? [] : _jsonScene_shaders, _jsonScene_geometries = jsonScene.geometries, geometries = _jsonScene_geometries === void 0 ? [] : _jsonScene_geometries, _jsonScene_components = jsonScene.components, components = _jsonScene_components === void 0 ? [] : _jsonScene_components, _jsonScene_animations = jsonScene.animations, animations = _jsonScene_animations === void 0 ? [] : _jsonScene_animations, _jsonScene_bins = jsonScene.bins, bins = _jsonScene_bins === void 0 ? [] : _jsonScene_bins;
|
|
25239
|
+
var _jsonScene_items = jsonScene.items, items = _jsonScene_items === void 0 ? [] : _jsonScene_items, _jsonScene_materials = jsonScene.materials, materials = _jsonScene_materials === void 0 ? [] : _jsonScene_materials, _jsonScene_shaders = jsonScene.shaders, shaders = _jsonScene_shaders === void 0 ? [] : _jsonScene_shaders, _jsonScene_geometries = jsonScene.geometries, geometries = _jsonScene_geometries === void 0 ? [] : _jsonScene_geometries, _jsonScene_components = jsonScene.components, components = _jsonScene_components === void 0 ? [] : _jsonScene_components, _jsonScene_animations = jsonScene.animations, animations = _jsonScene_animations === void 0 ? [] : _jsonScene_animations, _jsonScene_bins = jsonScene.bins, bins = _jsonScene_bins === void 0 ? [] : _jsonScene_bins, _jsonScene_miscs = jsonScene.miscs, miscs = _jsonScene_miscs === void 0 ? [] : _jsonScene_miscs;
|
|
25212
25240
|
for(var _iterator = _create_for_of_iterator_helper_loose(items), _step; !(_step = _iterator()).done;){
|
|
25213
25241
|
var vfxItemData = _step.value;
|
|
25214
25242
|
this.addEffectsObjectData(vfxItemData);
|
|
@@ -25233,6 +25261,10 @@ var listOrder = 0;
|
|
|
25233
25261
|
var animationData = _step5.value;
|
|
25234
25262
|
this.addEffectsObjectData(animationData);
|
|
25235
25263
|
}
|
|
25264
|
+
for(var _iterator6 = _create_for_of_iterator_helper_loose(miscs), _step6; !(_step6 = _iterator6()).done;){
|
|
25265
|
+
var miscData = _step6.value;
|
|
25266
|
+
this.addEffectsObjectData(miscData);
|
|
25267
|
+
}
|
|
25236
25268
|
for(var i = 0; i < bins.length; i++){
|
|
25237
25269
|
var binaryData = bins[i];
|
|
25238
25270
|
var binaryBuffer = scene.bins[i];
|
|
@@ -25244,8 +25276,8 @@ var listOrder = 0;
|
|
|
25244
25276
|
this.addEffectsObjectData(binaryData);
|
|
25245
25277
|
}
|
|
25246
25278
|
}
|
|
25247
|
-
for(var
|
|
25248
|
-
var textureData =
|
|
25279
|
+
for(var _iterator7 = _create_for_of_iterator_helper_loose(textureOptions), _step7; !(_step7 = _iterator7()).done;){
|
|
25280
|
+
var textureData = _step7.value;
|
|
25249
25281
|
this.addEffectsObjectData(textureData);
|
|
25250
25282
|
}
|
|
25251
25283
|
};
|
|
@@ -26613,6 +26645,14 @@ var seed = 1;
|
|
|
26613
26645
|
*/ _proto.dispose = function dispose() {
|
|
26614
26646
|
this.texture.dispose();
|
|
26615
26647
|
};
|
|
26648
|
+
/**
|
|
26649
|
+
* 通过图层设置创建贴图
|
|
26650
|
+
* @param data - 图层设置
|
|
26651
|
+
*/ _proto.fromData = function fromData(data) {
|
|
26652
|
+
Texture.prototype.fromData.call(this, data);
|
|
26653
|
+
this.texture = this.createTextureByType(data);
|
|
26654
|
+
this.texture.needsUpdate = true;
|
|
26655
|
+
};
|
|
26616
26656
|
_proto.createTextureByType = function createTextureByType(options) {
|
|
26617
26657
|
var assembleOptions = this.assembleOptions(options);
|
|
26618
26658
|
// TODO renderer.getMaxAnisotropy() 查询最大各向异性
|
|
@@ -27133,8 +27173,8 @@ setMaxSpriteMeshItemCount(8);
|
|
|
27133
27173
|
*/ Mesh.create = function(engine, props) {
|
|
27134
27174
|
return new ThreeMesh(engine, props);
|
|
27135
27175
|
};
|
|
27136
|
-
var version = "2.0.0-alpha.
|
|
27176
|
+
var version = "2.0.0-alpha.17";
|
|
27137
27177
|
logger.info("THREEJS plugin version: " + version);
|
|
27138
27178
|
|
|
27139
|
-
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, Engine, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, 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, 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, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextLoader, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMarcos, createShape, createVFXItem, createValueGetter, decimalEqual,
|
|
27179
|
+
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, Engine, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, 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, 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, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMarcos, createShape, createVFXItem, 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, getDefaultTemplateCanvasPool, 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, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, itemFrag, itemFrameFrag, itemVert, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, maxSpriteTextureCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxFragmentTextures, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
27140
27180
|
//# sourceMappingURL=index.mjs.map
|