@galacean/effects-core 2.0.0-alpha.16 → 2.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/comp-vfx-item.d.ts +1 -1
- package/dist/components/component.d.ts +2 -2
- package/dist/components/effect-component.d.ts +1 -1
- package/dist/components/renderer-component.d.ts +1 -1
- package/dist/decorators.d.ts +4 -3
- package/dist/effects-object.d.ts +1 -0
- package/dist/fallback/migration.d.ts +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +177 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +175 -171
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/calculate-item.d.ts +0 -3
- package/dist/plugins/index.d.ts +1 -2
- package/dist/plugins/interact/interact-item.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -1
- package/dist/plugins/text/index.d.ts +4 -0
- package/dist/plugins/timeline/track.d.ts +14 -14
- package/dist/serialization-helper.d.ts +6 -5
- package/dist/shape/shape.d.ts +1 -1
- package/dist/transform.d.ts +3 -3
- package/dist/utils/index.d.ts +18 -13
- package/dist/vfx-item.d.ts +1 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.0.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.17
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -324,7 +324,6 @@ function isSimulatorCellPhone() {
|
|
|
324
324
|
}
|
|
325
325
|
function isAlipayMiniApp() {
|
|
326
326
|
var _my;
|
|
327
|
-
// @ts-expect-error
|
|
328
327
|
return typeof my !== 'undefined' && ((_my = my) == null ? void 0 : _my.renderTarget) === 'web';
|
|
329
328
|
}
|
|
330
329
|
|
|
@@ -558,8 +557,8 @@ function noop() {}
|
|
|
558
557
|
*
|
|
559
558
|
* @static
|
|
560
559
|
* @function isString
|
|
561
|
-
* @param
|
|
562
|
-
* @return
|
|
560
|
+
* @param obj - 要判断的对象
|
|
561
|
+
* @return
|
|
563
562
|
*/ function isString(obj) {
|
|
564
563
|
return typeof obj === 'string';
|
|
565
564
|
}
|
|
@@ -568,8 +567,8 @@ function noop() {}
|
|
|
568
567
|
*
|
|
569
568
|
* @static
|
|
570
569
|
* @function isArray
|
|
571
|
-
* @param
|
|
572
|
-
* @return
|
|
570
|
+
* @param obj - 要判断的对象
|
|
571
|
+
* @return
|
|
573
572
|
*/ const isArray = Array.isArray || function(obj) {
|
|
574
573
|
return Object.prototype.toString.call(obj) === '[object Array]';
|
|
575
574
|
};
|
|
@@ -578,8 +577,8 @@ function noop() {}
|
|
|
578
577
|
*
|
|
579
578
|
* @static
|
|
580
579
|
* @function isFunction
|
|
581
|
-
* @param
|
|
582
|
-
* @return
|
|
580
|
+
* @param obj - 要判断的对象
|
|
581
|
+
* @return
|
|
583
582
|
*/ function isFunction(obj) {
|
|
584
583
|
return Object.prototype.toString.call(obj) === '[object Function]';
|
|
585
584
|
}
|
|
@@ -588,8 +587,8 @@ function noop() {}
|
|
|
588
587
|
*
|
|
589
588
|
* @static
|
|
590
589
|
* @function isObject
|
|
591
|
-
* @param
|
|
592
|
-
* @return
|
|
590
|
+
* @param obj - 要判断的对象
|
|
591
|
+
* @return
|
|
593
592
|
*/ function isObject(obj) {
|
|
594
593
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
595
594
|
}
|
|
@@ -598,25 +597,12 @@ function isCanvas(canvas) {
|
|
|
598
597
|
// 小程序 Canvas 无法使用 instanceof HTMLCanvasElement 判断
|
|
599
598
|
return typeof canvas === 'object' && canvas !== null && ((_canvas_tagName = canvas.tagName) == null ? void 0 : _canvas_tagName.toUpperCase()) === 'CANVAS';
|
|
600
599
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
608
|
-
const ret = {};
|
|
609
|
-
const kas = Object.keys(obj);
|
|
610
|
-
for(let i = 0; i < kas.length; i++){
|
|
611
|
-
const key = kas[i];
|
|
612
|
-
ret[key] = deepClone(obj[key]);
|
|
613
|
-
}
|
|
614
|
-
return ret;
|
|
615
|
-
}
|
|
616
|
-
return obj;
|
|
617
|
-
}
|
|
618
|
-
// TODO: 改名
|
|
619
|
-
function random(min, max) {
|
|
600
|
+
/**
|
|
601
|
+
* 生成一个位于 min 和 max 之间的随机数
|
|
602
|
+
* @param min
|
|
603
|
+
* @param max
|
|
604
|
+
* @returns
|
|
605
|
+
*/ function randomInRange(min, max) {
|
|
620
606
|
return min + Math.random() * (max - min);
|
|
621
607
|
}
|
|
622
608
|
function throwDestroyedError() {
|
|
@@ -3856,7 +3842,7 @@ var CameraClipMode;
|
|
|
3856
3842
|
* 蒙版形状切分
|
|
3857
3843
|
*/ ValueType[ValueType["SHAPE_SPLITS"] = 11] = "SHAPE_SPLITS";
|
|
3858
3844
|
/**
|
|
3859
|
-
|
|
3845
|
+
* 直线路径
|
|
3860
3846
|
*/ ValueType[ValueType["LINEAR_PATH"] = 12] = "LINEAR_PATH";
|
|
3861
3847
|
/**
|
|
3862
3848
|
* 多色
|
|
@@ -4032,7 +4018,7 @@ var TextAlignment;
|
|
|
4032
4018
|
(function(TextAlignment) {
|
|
4033
4019
|
/**
|
|
4034
4020
|
* text alignment starts from(x,y) to right direction
|
|
4035
|
-
* 从(x,y)开始第一个字符,向右边延伸
|
|
4021
|
+
* 从 (x,y) 开始第一个字符,向右边延伸
|
|
4036
4022
|
*/ TextAlignment[TextAlignment["left"] = 0] = "left";
|
|
4037
4023
|
/**
|
|
4038
4024
|
* (x,y) is middle position of text, where (left + right)/2 =(x,y)
|
|
@@ -4040,7 +4026,7 @@ var TextAlignment;
|
|
|
4040
4026
|
*/ TextAlignment[TextAlignment["middle"] = 1] = "middle";
|
|
4041
4027
|
/**
|
|
4042
4028
|
* text alignment ends with(x,y) from left direction
|
|
4043
|
-
* 从(x,y)结束最后一个字符,向左边延伸
|
|
4029
|
+
* 从 (x,y) 结束最后一个字符,向左边延伸
|
|
4044
4030
|
*/ TextAlignment[TextAlignment["right"] = 2] = "right";
|
|
4045
4031
|
})(TextAlignment || (TextAlignment = {}));
|
|
4046
4032
|
/**
|
|
@@ -4090,6 +4076,7 @@ var DataType;
|
|
|
4090
4076
|
DataType["TimelineAsset"] = "TimelineAsset";
|
|
4091
4077
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
4092
4078
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
4079
|
+
DataType["BinaryAsset"] = "BinaryAsset";
|
|
4093
4080
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
4094
4081
|
DataType["MeshComponent"] = "MeshComponent";
|
|
4095
4082
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
@@ -4098,6 +4085,7 @@ var DataType;
|
|
|
4098
4085
|
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
4099
4086
|
DataType["TreeComponent"] = "TreeComponent";
|
|
4100
4087
|
DataType["AnimationComponent"] = "AnimationComponent";
|
|
4088
|
+
DataType["SpineComponent"] = "SpineComponent";
|
|
4101
4089
|
// Non-EffectObject
|
|
4102
4090
|
DataType["TimelineClip"] = "TimelineClip";
|
|
4103
4091
|
})(DataType || (DataType = {}));
|
|
@@ -4185,11 +4173,11 @@ var VertexBufferSemantic;
|
|
|
4185
4173
|
VertexBufferSemantic["TangentBS3"] = "TANGENT_BS3";
|
|
4186
4174
|
})(VertexBufferSemantic || (VertexBufferSemantic = {}));
|
|
4187
4175
|
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4176
|
+
const BuiltinObjectGUID = {
|
|
4177
|
+
WhiteTexture: 'whitetexture00000000000000000000',
|
|
4178
|
+
PBRShader: 'pbr00000000000000000000000000000',
|
|
4179
|
+
UnlitShader: 'unlit000000000000000000000000000'
|
|
4180
|
+
};
|
|
4193
4181
|
|
|
4194
4182
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
4195
4183
|
__proto__: null,
|
|
@@ -4245,15 +4233,20 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
4245
4233
|
BuiltinObjectGUID: BuiltinObjectGUID
|
|
4246
4234
|
});
|
|
4247
4235
|
|
|
4248
|
-
const effectsClassStore = {};
|
|
4249
4236
|
const decoratorInitialStore = {};
|
|
4250
4237
|
const mergedStore = {};
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4238
|
+
const effectsClassStore = {};
|
|
4239
|
+
function effectsClass(className) {
|
|
4240
|
+
return (target, context)=>{
|
|
4241
|
+
if (effectsClassStore[className]) {
|
|
4242
|
+
console.warn(`Class ${className} 重复注册`);
|
|
4243
|
+
}
|
|
4244
|
+
// TODO: three修改json dataType, 这边重复注册直接 return
|
|
4245
|
+
effectsClassStore[className] = target;
|
|
4246
|
+
};
|
|
4247
|
+
}
|
|
4248
|
+
function serialize(type, sourceName) {
|
|
4249
|
+
return generateSerializableMember(type, sourceName); // value member
|
|
4257
4250
|
}
|
|
4258
4251
|
function getMergedStore(target) {
|
|
4259
4252
|
const classKey = target.constructor.name;
|
|
@@ -4278,34 +4271,32 @@ function getMergedStore(target) {
|
|
|
4278
4271
|
}
|
|
4279
4272
|
return store;
|
|
4280
4273
|
}
|
|
4281
|
-
function serialize(type, sourceName) {
|
|
4282
|
-
return generateSerializableMember(type, sourceName); // value member
|
|
4283
|
-
}
|
|
4284
|
-
function effectsClass(className) {
|
|
4285
|
-
return (target, context)=>{
|
|
4286
|
-
if (effectsClassStore[className]) {
|
|
4287
|
-
console.warn('Class ' + className + ' 重复注册');
|
|
4288
|
-
}
|
|
4289
|
-
//TODO: three修改json dataType, 这边重复注册直接 return
|
|
4290
|
-
effectsClassStore[className] = target;
|
|
4291
|
-
};
|
|
4292
|
-
}
|
|
4293
4274
|
function generateSerializableMember(type, sourceName) {
|
|
4294
4275
|
return (target, propertyKey)=>{
|
|
4295
4276
|
const classStore = getDirectStore(target);
|
|
4296
4277
|
if (!classStore[propertyKey]) {
|
|
4297
4278
|
classStore[propertyKey] = {
|
|
4298
|
-
type
|
|
4299
|
-
sourceName
|
|
4279
|
+
type,
|
|
4280
|
+
sourceName
|
|
4300
4281
|
};
|
|
4301
4282
|
}
|
|
4302
4283
|
};
|
|
4303
4284
|
}
|
|
4285
|
+
function getDirectStore(target) {
|
|
4286
|
+
const classKey = target.constructor.name;
|
|
4287
|
+
if (!decoratorInitialStore[classKey]) {
|
|
4288
|
+
decoratorInitialStore[classKey] = {};
|
|
4289
|
+
}
|
|
4290
|
+
return decoratorInitialStore[classKey];
|
|
4291
|
+
}
|
|
4304
4292
|
|
|
4305
4293
|
/**
|
|
4306
4294
|
* @since 2.0.0
|
|
4307
4295
|
* @internal
|
|
4308
4296
|
*/ class EffectsObject {
|
|
4297
|
+
static is(obj) {
|
|
4298
|
+
return obj instanceof EffectsObject && 'guid' in obj;
|
|
4299
|
+
}
|
|
4309
4300
|
getInstanceId() {
|
|
4310
4301
|
return this.guid;
|
|
4311
4302
|
}
|
|
@@ -4501,6 +4492,7 @@ __decorate([
|
|
|
4501
4492
|
super(...args);
|
|
4502
4493
|
this.started = false;
|
|
4503
4494
|
this.materials = [];
|
|
4495
|
+
this._priority = 0;
|
|
4504
4496
|
this._enabled = true;
|
|
4505
4497
|
}
|
|
4506
4498
|
}
|
|
@@ -9209,7 +9201,7 @@ class RandomValue extends ValueGetter {
|
|
|
9209
9201
|
this.max = props[1];
|
|
9210
9202
|
}
|
|
9211
9203
|
getValue(time) {
|
|
9212
|
-
return
|
|
9204
|
+
return randomInRange(this.min, this.max);
|
|
9213
9205
|
}
|
|
9214
9206
|
toUniform() {
|
|
9215
9207
|
return new Float32Array([
|
|
@@ -13779,7 +13771,7 @@ class Cone {
|
|
|
13779
13771
|
// dir + [0,0,1]
|
|
13780
13772
|
dir.z += 1;
|
|
13781
13773
|
return {
|
|
13782
|
-
position: position.multiply(
|
|
13774
|
+
position: position.multiply(randomInRange(0, 1)),
|
|
13783
13775
|
direction: dir.normalize()
|
|
13784
13776
|
};
|
|
13785
13777
|
}
|
|
@@ -13791,7 +13783,7 @@ class Cone {
|
|
|
13791
13783
|
}
|
|
13792
13784
|
function getArcAngle(arc, arcMode, opt) {
|
|
13793
13785
|
if (arcMode === ShapeArcMode.RANDOM) {
|
|
13794
|
-
arc =
|
|
13786
|
+
arc = randomInRange(0, arc);
|
|
13795
13787
|
} else if (arcMode === ShapeArcMode.UNIDIRECTIONAL_CYCLE) {
|
|
13796
13788
|
const d = opt.index % (opt.total + 1);
|
|
13797
13789
|
arc = arc / opt.total * d;
|
|
@@ -13823,8 +13815,8 @@ class Circle {
|
|
|
13823
13815
|
}
|
|
13824
13816
|
class Rectangle {
|
|
13825
13817
|
generate(opt) {
|
|
13826
|
-
const x =
|
|
13827
|
-
const y =
|
|
13818
|
+
const x = randomInRange(-this._d, this._d);
|
|
13819
|
+
const y = randomInRange(-this._h, this._h);
|
|
13828
13820
|
return {
|
|
13829
13821
|
direction: new Vector3(0, 0, 1),
|
|
13830
13822
|
position: new Vector3(x, y, 0)
|
|
@@ -13869,7 +13861,7 @@ class RectangleEdge {
|
|
|
13869
13861
|
}
|
|
13870
13862
|
class Edge {
|
|
13871
13863
|
generate(options) {
|
|
13872
|
-
const x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) :
|
|
13864
|
+
const x = this.arcMode === ShapeArcMode.UNIFORM_BURST ? options.burstIndex % options.burstCount / (options.burstCount - 1) : randomInRange(0, 1);
|
|
13873
13865
|
return {
|
|
13874
13866
|
direction: new Vector3(0, 1, 0),
|
|
13875
13867
|
position: new Vector3(this._d * (x - 0.5), 0, 0)
|
|
@@ -13887,7 +13879,7 @@ class Donut {
|
|
|
13887
13879
|
generate(opt) {
|
|
13888
13880
|
const dradius = this.donutRadius;
|
|
13889
13881
|
const center = this.radius - dradius;
|
|
13890
|
-
const angle =
|
|
13882
|
+
const angle = randomInRange(0, Math.PI * 2);
|
|
13891
13883
|
const arc = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
|
|
13892
13884
|
const rot = tempMat4$2.setFromRotationZ(arc);
|
|
13893
13885
|
const direction = new Vector3(Math.cos(angle), Math.sin(angle), 0);
|
|
@@ -13907,7 +13899,7 @@ class Donut {
|
|
|
13907
13899
|
const tempMat4$1 = new Matrix4();
|
|
13908
13900
|
class Sphere {
|
|
13909
13901
|
getHorizontalAngle() {
|
|
13910
|
-
return
|
|
13902
|
+
return randomInRange(-90, 90);
|
|
13911
13903
|
}
|
|
13912
13904
|
generate(opt) {
|
|
13913
13905
|
const rz = getArcAngle(this.arc, this.arcMode, opt) * DEG2RAD;
|
|
@@ -13929,7 +13921,7 @@ class Sphere {
|
|
|
13929
13921
|
}
|
|
13930
13922
|
class Hemisphere extends Sphere {
|
|
13931
13923
|
getHorizontalAngle() {
|
|
13932
|
-
return
|
|
13924
|
+
return randomInRange(0, 90);
|
|
13933
13925
|
}
|
|
13934
13926
|
}
|
|
13935
13927
|
|
|
@@ -15925,11 +15917,9 @@ class ParticleSystem extends Component {
|
|
|
15925
15917
|
this.props = props;
|
|
15926
15918
|
this.destroyed = false;
|
|
15927
15919
|
const cachePrefix = '';
|
|
15928
|
-
const options = props
|
|
15929
|
-
const
|
|
15930
|
-
const
|
|
15931
|
-
const gravityModifier = positionOverLifetime.gravityOverLifetime;
|
|
15932
|
-
const gravity = ensureVec3(positionOverLifetime.gravity);
|
|
15920
|
+
const { options, positionOverLifetime = {}, shape } = props;
|
|
15921
|
+
const gravityModifier = positionOverLifetime == null ? void 0 : positionOverLifetime.gravityOverLifetime;
|
|
15922
|
+
const gravity = ensureVec3(positionOverLifetime == null ? void 0 : positionOverLifetime.gravity);
|
|
15933
15923
|
const _textureSheetAnimation = props.textureSheetAnimation;
|
|
15934
15924
|
const textureSheetAnimation = _textureSheetAnimation ? {
|
|
15935
15925
|
animationDelay: createValueGetter(_textureSheetAnimation.animationDelay || 0),
|
|
@@ -15940,7 +15930,7 @@ class ParticleSystem extends Component {
|
|
|
15940
15930
|
row: _textureSheetAnimation.row,
|
|
15941
15931
|
total: _textureSheetAnimation.total || _textureSheetAnimation.col * _textureSheetAnimation.row
|
|
15942
15932
|
} : undefined;
|
|
15943
|
-
const startTurbulence = !!(shape && shape.turbulenceX || shape.turbulenceY || shape.turbulenceZ);
|
|
15933
|
+
const startTurbulence = !!(shape && shape.turbulenceX || (shape == null ? void 0 : shape.turbulenceY) || (shape == null ? void 0 : shape.turbulenceZ));
|
|
15944
15934
|
let turbulence;
|
|
15945
15935
|
if (startTurbulence) {
|
|
15946
15936
|
var _shape_turbulenceX, _shape_turbulenceY, _shape_turbulenceZ;
|
|
@@ -15971,7 +15961,7 @@ class ParticleSystem extends Component {
|
|
|
15971
15961
|
}
|
|
15972
15962
|
}
|
|
15973
15963
|
let forceTarget;
|
|
15974
|
-
if (positionOverLifetime.forceTarget) {
|
|
15964
|
+
if (positionOverLifetime == null ? void 0 : positionOverLifetime.forceTarget) {
|
|
15975
15965
|
forceTarget = {
|
|
15976
15966
|
target: positionOverLifetime.target || [
|
|
15977
15967
|
0,
|
|
@@ -17590,6 +17580,27 @@ class AnimationClipPlayable extends Playable {
|
|
|
17590
17580
|
}
|
|
17591
17581
|
}
|
|
17592
17582
|
|
|
17583
|
+
/**
|
|
17584
|
+
* @since 2.0.0
|
|
17585
|
+
* @internal
|
|
17586
|
+
*/ class TimelineClip {
|
|
17587
|
+
toLocalTime(time) {
|
|
17588
|
+
let localTime = time - this.start;
|
|
17589
|
+
const duration = this.duration;
|
|
17590
|
+
if (localTime - duration > 0.001) {
|
|
17591
|
+
if (this.endBehaviour === ItemEndBehavior.loop) {
|
|
17592
|
+
localTime = localTime % duration;
|
|
17593
|
+
} else if (this.endBehaviour === ItemEndBehavior.freeze) {
|
|
17594
|
+
localTime = Math.min(duration, localTime);
|
|
17595
|
+
}
|
|
17596
|
+
}
|
|
17597
|
+
return localTime;
|
|
17598
|
+
}
|
|
17599
|
+
constructor(){
|
|
17600
|
+
this.start = 0;
|
|
17601
|
+
this.duration = 0;
|
|
17602
|
+
}
|
|
17603
|
+
}
|
|
17593
17604
|
class TrackAsset extends PlayableAsset {
|
|
17594
17605
|
/**
|
|
17595
17606
|
* 重写该方法以获取自定义对象绑定
|
|
@@ -17670,7 +17681,7 @@ class TrackAsset extends PlayableAsset {
|
|
|
17670
17681
|
}
|
|
17671
17682
|
}
|
|
17672
17683
|
__decorate([
|
|
17673
|
-
serialize(
|
|
17684
|
+
serialize(TimelineClip)
|
|
17674
17685
|
], TrackAsset.prototype, "clips", void 0);
|
|
17675
17686
|
__decorate([
|
|
17676
17687
|
serialize()
|
|
@@ -17683,27 +17694,6 @@ var TrackType;
|
|
|
17683
17694
|
TrackType[TrackType["MasterTrack"] = 0] = "MasterTrack";
|
|
17684
17695
|
TrackType[TrackType["ObjectTrack"] = 1] = "ObjectTrack";
|
|
17685
17696
|
})(TrackType || (TrackType = {}));
|
|
17686
|
-
class TimelineClip {
|
|
17687
|
-
toLocalTime(time) {
|
|
17688
|
-
let localTime = time - this.start;
|
|
17689
|
-
const duration = this.duration;
|
|
17690
|
-
if (localTime - duration > 0.001) {
|
|
17691
|
-
if (this.endBehaviour === ItemEndBehavior.loop) {
|
|
17692
|
-
localTime = localTime % duration;
|
|
17693
|
-
} else if (this.endBehaviour === ItemEndBehavior.freeze) {
|
|
17694
|
-
localTime = Math.min(duration, localTime);
|
|
17695
|
-
}
|
|
17696
|
-
}
|
|
17697
|
-
return localTime;
|
|
17698
|
-
}
|
|
17699
|
-
constructor(){
|
|
17700
|
-
this.start = 0;
|
|
17701
|
-
this.duration = 0;
|
|
17702
|
-
}
|
|
17703
|
-
}
|
|
17704
|
-
TimelineClip = __decorate([
|
|
17705
|
-
effectsClass('TimelineClip')
|
|
17706
|
-
], TimelineClip);
|
|
17707
17697
|
class RuntimeClip {
|
|
17708
17698
|
set enable(value) {
|
|
17709
17699
|
if (value) {
|
|
@@ -17778,10 +17768,6 @@ class ObjectBindingTrack extends TrackAsset {
|
|
|
17778
17768
|
particleClip.endBehaviour = boundItem.endBehavior;
|
|
17779
17769
|
}
|
|
17780
17770
|
}
|
|
17781
|
-
fromData(data) {
|
|
17782
|
-
super.fromData(data);
|
|
17783
|
-
this.data = data;
|
|
17784
|
-
}
|
|
17785
17771
|
}
|
|
17786
17772
|
ObjectBindingTrack = __decorate([
|
|
17787
17773
|
effectsClass('ObjectBindingTrack')
|
|
@@ -17967,7 +17953,6 @@ function compareTracks(a, b) {
|
|
|
17967
17953
|
this.startTime = startTime;
|
|
17968
17954
|
this.resolveBindings();
|
|
17969
17955
|
this.timelinePlayable = this.timelineAsset.createPlayable(this.graph);
|
|
17970
|
-
this.timelinePlayable.play();
|
|
17971
17956
|
// 重播不销毁元素
|
|
17972
17957
|
if (this.item.endBehavior !== ItemEndBehavior.destroy) {
|
|
17973
17958
|
this.setReusable(true);
|
|
@@ -18351,7 +18336,6 @@ class CanvasPool {
|
|
|
18351
18336
|
return this.elements.shift();
|
|
18352
18337
|
}
|
|
18353
18338
|
if (getConfig(TEMPLATE_USE_OFFSCREEN_CANVAS)) {
|
|
18354
|
-
// @ts-expect-error
|
|
18355
18339
|
return window._createOffscreenCanvas(10, 10);
|
|
18356
18340
|
} else {
|
|
18357
18341
|
// in hongmeng system, create too many canvas will case render error
|
|
@@ -19175,7 +19159,6 @@ class VFXItem extends EffectsObject {
|
|
|
19175
19159
|
this.parentId = parentId;
|
|
19176
19160
|
this.duration = duration;
|
|
19177
19161
|
this.endBehavior = endBehavior;
|
|
19178
|
-
this.renderOrder = listIndex;
|
|
19179
19162
|
//@ts-expect-error
|
|
19180
19163
|
this.oldId = data.oldId;
|
|
19181
19164
|
if (!data.content) {
|
|
@@ -19186,17 +19169,11 @@ class VFXItem extends EffectsObject {
|
|
|
19186
19169
|
if (duration <= 0) {
|
|
19187
19170
|
throw Error(`Item duration can't be less than 0, see ${HELP_LINK['Item duration can\'t be less than 0']}`);
|
|
19188
19171
|
}
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
const newComponent = component;
|
|
19192
|
-
this.components.push(newComponent);
|
|
19193
|
-
if (newComponent instanceof RendererComponent) {
|
|
19194
|
-
this.rendererComponents.push(newComponent);
|
|
19195
|
-
} else if (newComponent instanceof ItemBehaviour) {
|
|
19196
|
-
this.itemBehaviours.push(newComponent);
|
|
19197
|
-
}
|
|
19198
|
-
}
|
|
19172
|
+
for (const component of this.components){
|
|
19173
|
+
component.onAttached();
|
|
19199
19174
|
}
|
|
19175
|
+
// renderOrder 在 component 初始化后设置。确保能拿到 rendererComponent。
|
|
19176
|
+
this.renderOrder = listIndex;
|
|
19200
19177
|
}
|
|
19201
19178
|
toData() {
|
|
19202
19179
|
var _this_parent;
|
|
@@ -19291,6 +19268,7 @@ class VFXItem extends EffectsObject {
|
|
|
19291
19268
|
/**
|
|
19292
19269
|
* 元素动画的速度
|
|
19293
19270
|
*/ this.speed = 1;
|
|
19271
|
+
this.listIndex = 0;
|
|
19294
19272
|
this.name = 'VFXItem';
|
|
19295
19273
|
this.transform.name = this.name;
|
|
19296
19274
|
this.transform.engine = engine;
|
|
@@ -19299,6 +19277,9 @@ class VFXItem extends EffectsObject {
|
|
|
19299
19277
|
}
|
|
19300
19278
|
}
|
|
19301
19279
|
}
|
|
19280
|
+
__decorate([
|
|
19281
|
+
serialize()
|
|
19282
|
+
], VFXItem.prototype, "components", void 0);
|
|
19302
19283
|
VFXItem = __decorate([
|
|
19303
19284
|
effectsClass(DataType.VFXItemData)
|
|
19304
19285
|
], VFXItem);
|
|
@@ -19494,20 +19475,20 @@ class SerializationHelper {
|
|
|
19494
19475
|
if (value === undefined) {
|
|
19495
19476
|
value = effectsObject[key];
|
|
19496
19477
|
}
|
|
19497
|
-
if (value
|
|
19498
|
-
|
|
19499
|
-
} else if (value
|
|
19478
|
+
if (EffectsObject.is(value)) {
|
|
19479
|
+
SerializationHelper.collectSerializableObject(value, res);
|
|
19480
|
+
} else if (isArray(value)) {
|
|
19500
19481
|
for (const arrayValue of value){
|
|
19501
|
-
if (arrayValue
|
|
19502
|
-
|
|
19482
|
+
if (EffectsObject.is(arrayValue)) {
|
|
19483
|
+
SerializationHelper.collectSerializableObject(arrayValue, res);
|
|
19503
19484
|
}
|
|
19504
19485
|
}
|
|
19505
|
-
} else if (value
|
|
19486
|
+
} else if (isObject(value)) {
|
|
19506
19487
|
// 非 EffectsObject 对象只递归一层
|
|
19507
19488
|
for (const objectKey of Object.keys(value)){
|
|
19508
19489
|
const objectValue = value[objectKey];
|
|
19509
|
-
if (objectValue
|
|
19510
|
-
|
|
19490
|
+
if (EffectsObject.is(objectValue)) {
|
|
19491
|
+
SerializationHelper.collectSerializableObject(objectValue, res);
|
|
19511
19492
|
}
|
|
19512
19493
|
}
|
|
19513
19494
|
}
|
|
@@ -19542,17 +19523,17 @@ class SerializationHelper {
|
|
|
19542
19523
|
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean' || SerializationHelper.checkTypedArray(value)) {
|
|
19543
19524
|
// TODO json 数据避免传 typedArray
|
|
19544
19525
|
serializedData[key] = value;
|
|
19545
|
-
} else if (value
|
|
19526
|
+
} else if (isArray(value)) {
|
|
19546
19527
|
if (!serializedData[key]) {
|
|
19547
19528
|
serializedData[key] = [];
|
|
19548
19529
|
}
|
|
19549
19530
|
SerializationHelper.serializeArrayProperty(value, serializedData[key], 0);
|
|
19550
|
-
} else if (value
|
|
19531
|
+
} else if (EffectsObject.is(value)) {
|
|
19551
19532
|
// TODO 处理 EffectsObject 递归序列化
|
|
19552
19533
|
serializedData[key] = {
|
|
19553
19534
|
id: value.getInstanceId()
|
|
19554
19535
|
};
|
|
19555
|
-
} else if (value
|
|
19536
|
+
} else if (isObject(value)) {
|
|
19556
19537
|
if (!serializedData[key]) {
|
|
19557
19538
|
serializedData[key] = {};
|
|
19558
19539
|
}
|
|
@@ -19565,17 +19546,17 @@ class SerializationHelper {
|
|
|
19565
19546
|
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean' || SerializationHelper.checkTypedArray(value)) {
|
|
19566
19547
|
// TODO json 数据避免传 typedArray
|
|
19567
19548
|
serializedData[key] = value;
|
|
19568
|
-
} else if (value
|
|
19549
|
+
} else if (isArray(value)) {
|
|
19569
19550
|
if (!serializedData[key]) {
|
|
19570
19551
|
serializedData[key] = [];
|
|
19571
19552
|
}
|
|
19572
19553
|
SerializationHelper.serializeArrayProperty(value, serializedData[key], 0);
|
|
19573
|
-
} else if (value
|
|
19554
|
+
} else if (EffectsObject.is(value)) {
|
|
19574
19555
|
// TODO 处理 EffectsObject 递归序列化
|
|
19575
19556
|
serializedData[key] = {
|
|
19576
19557
|
id: value.getInstanceId()
|
|
19577
19558
|
};
|
|
19578
|
-
} else if (value
|
|
19559
|
+
} else if (isObject(value)) {
|
|
19579
19560
|
if (!serializedData[key]) {
|
|
19580
19561
|
serializedData[key] = {};
|
|
19581
19562
|
}
|
|
@@ -19635,13 +19616,13 @@ class SerializationHelper {
|
|
|
19635
19616
|
static checkTypedArray(obj) {
|
|
19636
19617
|
return obj instanceof Int8Array || obj instanceof Uint8Array || obj instanceof Uint8ClampedArray || obj instanceof Int16Array || obj instanceof Uint16Array || obj instanceof Int32Array || obj instanceof Uint32Array || obj instanceof Float32Array || obj instanceof Float64Array || obj instanceof ArrayBuffer;
|
|
19637
19618
|
}
|
|
19619
|
+
// check value is { id: 7e69662e964e4892ae8933f24562395b }
|
|
19638
19620
|
static checkDataPath(value) {
|
|
19639
|
-
|
|
19640
|
-
return value instanceof Object && Object.keys(value).length === 1 && value.id && value.id.length === 32;
|
|
19621
|
+
return !!(isObject(value) && Object.keys(value).length === 1 && 'id' in value && isString(value.id) && value.id.length === 32);
|
|
19641
19622
|
}
|
|
19642
19623
|
// TODO 测试函数,2.0 上线后移除
|
|
19643
19624
|
static checkGLTFNode(value) {
|
|
19644
|
-
return value
|
|
19625
|
+
return isObject(value) && value.nodeIndex !== undefined && value.isJoint !== undefined;
|
|
19645
19626
|
}
|
|
19646
19627
|
static checkImageSource(value) {
|
|
19647
19628
|
return isCanvas(value) || value instanceof HTMLImageElement;
|
|
@@ -19652,7 +19633,7 @@ class SerializationHelper {
|
|
|
19652
19633
|
return;
|
|
19653
19634
|
}
|
|
19654
19635
|
// 加载并链接 DataPath 字段表示的 EffectsObject 引用。Class 对象 copy [key, value] 会丢失对象信息,因此只递归数组对象和普通 js Object 结构对象。
|
|
19655
|
-
if (property
|
|
19636
|
+
if (isArray(property)) {
|
|
19656
19637
|
const res = [];
|
|
19657
19638
|
for (const value of property){
|
|
19658
19639
|
res.push(SerializationHelper.deserializeProperty(value, engine, level + 1, type));
|
|
@@ -19661,16 +19642,14 @@ class SerializationHelper {
|
|
|
19661
19642
|
// TODO json 数据避免传 typedArray
|
|
19662
19643
|
} else if (SerializationHelper.checkDataPath(property)) {
|
|
19663
19644
|
return engine.assetLoader.loadGUID(property.id);
|
|
19664
|
-
} else if (property
|
|
19645
|
+
} else if (isObject(property) && property.constructor === Object) {
|
|
19665
19646
|
let res;
|
|
19666
19647
|
if (type) {
|
|
19667
|
-
|
|
19668
|
-
res = new classConstructor();
|
|
19648
|
+
res = new type();
|
|
19669
19649
|
} else {
|
|
19670
19650
|
res = {};
|
|
19671
19651
|
}
|
|
19672
19652
|
for (const key of Object.keys(property)){
|
|
19673
|
-
// @ts-expect-error
|
|
19674
19653
|
res[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
|
|
19675
19654
|
}
|
|
19676
19655
|
return res;
|
|
@@ -19684,7 +19663,7 @@ class SerializationHelper {
|
|
|
19684
19663
|
console.error('序列化数据的内嵌对象层数大于上限');
|
|
19685
19664
|
return;
|
|
19686
19665
|
}
|
|
19687
|
-
if (property
|
|
19666
|
+
if (isArray(property)) {
|
|
19688
19667
|
const res = [];
|
|
19689
19668
|
for (const value of property){
|
|
19690
19669
|
res.push((yield SerializationHelper.deserializePropertyAsync(value, engine, level + 1, type)));
|
|
@@ -19694,16 +19673,14 @@ class SerializationHelper {
|
|
|
19694
19673
|
} else if (SerializationHelper.checkDataPath(property)) {
|
|
19695
19674
|
const res = yield engine.assetLoader.loadGUIDAsync(property.id);
|
|
19696
19675
|
return res;
|
|
19697
|
-
} else if (property
|
|
19676
|
+
} else if (isObject(property) && property.constructor === Object) {
|
|
19698
19677
|
let res;
|
|
19699
19678
|
if (type) {
|
|
19700
|
-
|
|
19701
|
-
res = new classConstructor();
|
|
19679
|
+
res = new type();
|
|
19702
19680
|
} else {
|
|
19703
19681
|
res = {};
|
|
19704
19682
|
}
|
|
19705
19683
|
for (const key of Object.keys(property)){
|
|
19706
|
-
// @ts-expect-error
|
|
19707
19684
|
res[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
|
|
19708
19685
|
}
|
|
19709
19686
|
return res;
|
|
@@ -19725,17 +19702,17 @@ class SerializationHelper {
|
|
|
19725
19702
|
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean' || SerializationHelper.checkTypedArray(objectProperty)) {
|
|
19726
19703
|
// TODO json 数据避免传 typedArray
|
|
19727
19704
|
serializedData[key] = value;
|
|
19728
|
-
} else if (value
|
|
19705
|
+
} else if (isArray(value)) {
|
|
19729
19706
|
if (!serializedData[key]) {
|
|
19730
19707
|
serializedData[key] = [];
|
|
19731
19708
|
}
|
|
19732
19709
|
SerializationHelper.serializeArrayProperty(value, serializedData[key], level + 1);
|
|
19733
|
-
} else if (value
|
|
19710
|
+
} else if (EffectsObject.is(value)) {
|
|
19734
19711
|
// TODO 处理 EffectsObject 递归序列化
|
|
19735
19712
|
serializedData[key] = {
|
|
19736
19713
|
id: value.getInstanceId()
|
|
19737
19714
|
};
|
|
19738
|
-
} else if (value
|
|
19715
|
+
} else if (isObject(value)) {
|
|
19739
19716
|
if (!serializedData[key]) {
|
|
19740
19717
|
serializedData[key] = {};
|
|
19741
19718
|
}
|
|
@@ -19756,17 +19733,17 @@ class SerializationHelper {
|
|
|
19756
19733
|
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean' || SerializationHelper.checkTypedArray(arrayProperty)) {
|
|
19757
19734
|
// TODO json 数据避免传 typedArray
|
|
19758
19735
|
serializedData[i] = value;
|
|
19759
|
-
} else if (value
|
|
19736
|
+
} else if (isArray(value)) {
|
|
19760
19737
|
if (!serializedData[i]) {
|
|
19761
19738
|
serializedData[i] = [];
|
|
19762
19739
|
}
|
|
19763
|
-
|
|
19764
|
-
} else if (value
|
|
19740
|
+
SerializationHelper.serializeArrayProperty(value, serializedData[i], level + 1);
|
|
19741
|
+
} else if (EffectsObject.is(value)) {
|
|
19765
19742
|
// TODO 处理 EffectsObject 递归序列化
|
|
19766
19743
|
serializedData[i] = {
|
|
19767
19744
|
id: value.getInstanceId()
|
|
19768
19745
|
};
|
|
19769
|
-
} else if (value
|
|
19746
|
+
} else if (isObject(value)) {
|
|
19770
19747
|
if (!serializedData[i]) {
|
|
19771
19748
|
serializedData[i] = {};
|
|
19772
19749
|
}
|
|
@@ -20697,8 +20674,6 @@ function getStandardCameraContent(model) {
|
|
|
20697
20674
|
/**
|
|
20698
20675
|
* 3.0 以下版本数据适配(runtime 2.0及以上版本支持)
|
|
20699
20676
|
*/ function version30Migration(json) {
|
|
20700
|
-
var // 更正 spine 数据中的 images 属性
|
|
20701
|
-
_json_spines;
|
|
20702
20677
|
var // 兼容老版本数据中不存在textures的情况
|
|
20703
20678
|
_result;
|
|
20704
20679
|
const result = _extends({}, json, {
|
|
@@ -20708,7 +20683,8 @@ function getStandardCameraContent(model) {
|
|
|
20708
20683
|
materials: [],
|
|
20709
20684
|
shaders: [],
|
|
20710
20685
|
geometries: [],
|
|
20711
|
-
animations: []
|
|
20686
|
+
animations: [],
|
|
20687
|
+
miscs: []
|
|
20712
20688
|
});
|
|
20713
20689
|
// image数据添加 guid
|
|
20714
20690
|
for (const image of result.images){
|
|
@@ -20737,17 +20713,10 @@ function getStandardCameraContent(model) {
|
|
|
20737
20713
|
});
|
|
20738
20714
|
}
|
|
20739
20715
|
}
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
const textureId = (_json_textures_spine_images_i = json.textures[spine.images[i]]) == null ? void 0 : _json_textures_spine_images_i.id;
|
|
20745
|
-
//@ts-expect-error
|
|
20746
|
-
spine.images[i] = {
|
|
20747
|
-
id: textureId
|
|
20748
|
-
};
|
|
20749
|
-
}
|
|
20750
|
-
});
|
|
20716
|
+
// 处理老版本数据中 bins 没有 id 的情况
|
|
20717
|
+
if (json.bins) {
|
|
20718
|
+
convertBinaryAsset(json.bins, result);
|
|
20719
|
+
}
|
|
20751
20720
|
const itemOldIdToGuidMap = {};
|
|
20752
20721
|
const guidToItemMap = {};
|
|
20753
20722
|
// 更正Composition.endBehavior
|
|
@@ -20968,6 +20937,10 @@ function getStandardCameraContent(model) {
|
|
|
20968
20937
|
//@ts-expect-error
|
|
20969
20938
|
item.type = 'orientation-transformer';
|
|
20970
20939
|
}
|
|
20940
|
+
// Spine 元素转为 guid 索引
|
|
20941
|
+
if (item.type === ItemType.spine && json.spines && json.spines.length !== 0) {
|
|
20942
|
+
convertSpineData(json.spines[item.content.options.spine], item.content, result);
|
|
20943
|
+
}
|
|
20971
20944
|
// item 的 content 转为 component data 加入 JSONScene.components
|
|
20972
20945
|
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') {
|
|
20973
20946
|
item.components = [];
|
|
@@ -21211,20 +21184,48 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
21211
21184
|
id: timelineAssetData.id
|
|
21212
21185
|
};
|
|
21213
21186
|
composition.sceneBindings = sceneBindings;
|
|
21214
|
-
|
|
21215
|
-
jsonScene.animations = [];
|
|
21216
|
-
}
|
|
21217
|
-
// @ts-expect-error
|
|
21218
|
-
jsonScene.animations.push(timelineAssetData);
|
|
21187
|
+
jsonScene.miscs.push(timelineAssetData);
|
|
21219
21188
|
for (const trackData of trackDatas){
|
|
21220
21189
|
//@ts-expect-error
|
|
21221
|
-
jsonScene.
|
|
21190
|
+
jsonScene.miscs.push(trackData);
|
|
21222
21191
|
}
|
|
21223
21192
|
for (const playableAsset of playableAssetDatas){
|
|
21224
21193
|
//@ts-expect-error
|
|
21225
|
-
jsonScene.
|
|
21194
|
+
jsonScene.miscs.push(playableAsset);
|
|
21226
21195
|
}
|
|
21227
21196
|
}
|
|
21197
|
+
function convertBinaryAsset(bins, jsonScene) {
|
|
21198
|
+
//@ts-expect-error
|
|
21199
|
+
jsonScene.bins = bins.map((bin)=>({
|
|
21200
|
+
url: bin.url,
|
|
21201
|
+
'dataType': 'BinaryAsset',
|
|
21202
|
+
id: generateGUID()
|
|
21203
|
+
}));
|
|
21204
|
+
}
|
|
21205
|
+
function convertSpineData(resource, content, jsonScene) {
|
|
21206
|
+
//@ts-expect-error
|
|
21207
|
+
content.resource = {
|
|
21208
|
+
'atlas': {
|
|
21209
|
+
'bins': {
|
|
21210
|
+
//@ts-expect-error
|
|
21211
|
+
'id': jsonScene.bins[resource.atlas[1][0]].id
|
|
21212
|
+
},
|
|
21213
|
+
'source': resource.atlas[1].slice(1)
|
|
21214
|
+
},
|
|
21215
|
+
'skeleton': {
|
|
21216
|
+
'bins': {
|
|
21217
|
+
//@ts-expect-error
|
|
21218
|
+
'id': jsonScene.bins[resource.skeleton[1][0]].id
|
|
21219
|
+
},
|
|
21220
|
+
'source': resource.skeleton[1].slice(1)
|
|
21221
|
+
},
|
|
21222
|
+
'skeletonType': resource.skeletonType,
|
|
21223
|
+
'images': resource.images.map((i)=>({
|
|
21224
|
+
//@ts-expect-error
|
|
21225
|
+
id: jsonScene.textures[i].id
|
|
21226
|
+
}))
|
|
21227
|
+
};
|
|
21228
|
+
}
|
|
21228
21229
|
|
|
21229
21230
|
const v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
21230
21231
|
const standardVersion = /^(\d+)\.(\d+)$/;
|
|
@@ -21783,7 +21784,7 @@ let seed = 1;
|
|
|
21783
21784
|
const shaderLibrary = renderer == null ? void 0 : renderer.getShaderLibrary();
|
|
21784
21785
|
yield pluginSystem == null ? void 0 : pluginSystem.precompile(compositions, renderer, options);
|
|
21785
21786
|
yield new Promise((resolve)=>{
|
|
21786
|
-
shaderLibrary.compileAllShaders(()=>{
|
|
21787
|
+
shaderLibrary == null ? void 0 : shaderLibrary.compileAllShaders(()=>{
|
|
21787
21788
|
resolve(null);
|
|
21788
21789
|
});
|
|
21789
21790
|
});
|
|
@@ -23287,7 +23288,7 @@ let listOrder = 0;
|
|
|
23287
23288
|
}
|
|
23288
23289
|
addPackageDatas(scene) {
|
|
23289
23290
|
const { jsonScene, textureOptions = [] } = scene;
|
|
23290
|
-
const { items = [], materials = [], shaders = [], geometries = [], components = [], animations = [], bins = [] } = jsonScene;
|
|
23291
|
+
const { items = [], materials = [], shaders = [], geometries = [], components = [], animations = [], bins = [], miscs = [] } = jsonScene;
|
|
23291
23292
|
for (const vfxItemData of items){
|
|
23292
23293
|
this.addEffectsObjectData(vfxItemData);
|
|
23293
23294
|
}
|
|
@@ -23306,6 +23307,9 @@ let listOrder = 0;
|
|
|
23306
23307
|
for (const animationData of animations){
|
|
23307
23308
|
this.addEffectsObjectData(animationData);
|
|
23308
23309
|
}
|
|
23310
|
+
for (const miscData of miscs){
|
|
23311
|
+
this.addEffectsObjectData(miscData);
|
|
23312
|
+
}
|
|
23309
23313
|
for(let i = 0; i < bins.length; i++){
|
|
23310
23314
|
const binaryData = bins[i];
|
|
23311
23315
|
const binaryBuffer = scene.bins[i];
|
|
@@ -23579,5 +23583,5 @@ registerPlugin('particle', ParticleLoader, VFXItem, true);
|
|
|
23579
23583
|
registerPlugin('cal', CalculateLoader, VFXItem, true);
|
|
23580
23584
|
registerPlugin('interact', InteractLoader, VFXItem, true);
|
|
23581
23585
|
|
|
23582
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, TextComponent, TextLoader, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, 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,
|
|
23586
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, TextComponent, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, vertexFormatType2GLType };
|
|
23583
23587
|
//# sourceMappingURL=index.mjs.map
|