@galacean/effects-core 2.0.0-alpha.25 → 2.0.0-alpha.27
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/__definations__/fbeffects-object-data.d.ts +28 -0
- package/dist/__definations__/fbeffects-package-data.d.ts +26 -0
- package/dist/__definations__/fbgeometry-data.d.ts +77 -0
- package/dist/__definations__/fbsub-mesh.d.ts +26 -0
- package/dist/__definations__/fbvertex-channel.d.ts +33 -0
- package/dist/__definations__/fbvertex-data.d.ts +27 -0
- package/dist/__definations__/index.d.ts +6 -0
- package/dist/composition-source-manager.d.ts +1 -1
- package/dist/decorators.d.ts +1 -1
- package/dist/effects-package.d.ts +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1733 -141
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1733 -142
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/timeline/track.d.ts +2 -2
- package/dist/vfx-item.d.ts +1 -1
- package/package.json +5 -3
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.27
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -3997,13 +3997,29 @@ var RenderFace;
|
|
|
3997
3997
|
RenderFace["Front"] = "Front";
|
|
3998
3998
|
})(RenderFace || (RenderFace = {}));
|
|
3999
3999
|
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
var
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
var
|
|
4000
|
+
/**
|
|
4001
|
+
* 销毁
|
|
4002
|
+
*/ var END_BEHAVIOR_DESTROY = 0;
|
|
4003
|
+
/**
|
|
4004
|
+
* 暂停
|
|
4005
|
+
* @deprecated since 2.0 - use `END_BEHAVIOR_FREEZE` instead
|
|
4006
|
+
*/ var END_BEHAVIOR_PAUSE = 1;
|
|
4007
|
+
/**
|
|
4008
|
+
* 无限播放
|
|
4009
|
+
*/ var END_BEHAVIOR_FORWARD = 2;
|
|
4010
|
+
/**
|
|
4011
|
+
* 销毁并保留最后一帧
|
|
4012
|
+
* @deprecated since 2.0
|
|
4013
|
+
*/ var END_BEHAVIOR_PAUSE_AND_DESTROY = 3;
|
|
4014
|
+
/**
|
|
4015
|
+
* 冻结
|
|
4016
|
+
*/ var END_BEHAVIOR_FREEZE = 4;
|
|
4017
|
+
/**
|
|
4018
|
+
* 重播
|
|
4019
|
+
*/ var END_BEHAVIOR_RESTART = 5;
|
|
4020
|
+
/**
|
|
4021
|
+
*
|
|
4022
|
+
*/ var END_BEHAVIOR_DESTROY_CHILDREN = 6;
|
|
4007
4023
|
var CAMERA_CLIP_MODE_VERTICAL = 1;
|
|
4008
4024
|
var CAMERA_CLIP_MODE_NORMAL = 0;
|
|
4009
4025
|
var MESSAGE_ITEM_PHRASE_BEGIN = 2;
|
|
@@ -4018,29 +4034,6 @@ var CameraClipMode;
|
|
|
4018
4034
|
* 剪裁左右
|
|
4019
4035
|
*/ CameraClipMode[CameraClipMode["landscape"] = 0] = "landscape";
|
|
4020
4036
|
})(CameraClipMode || (CameraClipMode = {}));
|
|
4021
|
-
/**
|
|
4022
|
-
* 结束行为
|
|
4023
|
-
*/ var CompositionEndBehavior;
|
|
4024
|
-
(function(CompositionEndBehavior) {
|
|
4025
|
-
/**
|
|
4026
|
-
* 销毁
|
|
4027
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["destroy"] = 0] = "destroy";
|
|
4028
|
-
/**
|
|
4029
|
-
* 暂停
|
|
4030
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["pause"] = 1] = "pause";
|
|
4031
|
-
/**
|
|
4032
|
-
* 重播
|
|
4033
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["restart"] = 5] = "restart";
|
|
4034
|
-
/**
|
|
4035
|
-
* 无限播放
|
|
4036
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["forward"] = 2] = "forward";
|
|
4037
|
-
/**
|
|
4038
|
-
* 销毁并保留最后一帧
|
|
4039
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["pause_destroy"] = 3] = "pause_destroy";
|
|
4040
|
-
/**
|
|
4041
|
-
* 冻结
|
|
4042
|
-
*/ CompositionEndBehavior[CompositionEndBehavior["freeze"] = 4] = "freeze";
|
|
4043
|
-
})(CompositionEndBehavior || (CompositionEndBehavior = {}));
|
|
4044
4037
|
|
|
4045
4038
|
/**
|
|
4046
4039
|
* 动态换图类型
|
|
@@ -4121,12 +4114,23 @@ var CameraClipMode;
|
|
|
4121
4114
|
BezierKeyframeType[BezierKeyframeType["LINE_OUT"] = 6] = "LINE_OUT";
|
|
4122
4115
|
})(BezierKeyframeType || (BezierKeyframeType = {}));
|
|
4123
4116
|
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4117
|
+
/**
|
|
4118
|
+
* 结束行为
|
|
4119
|
+
*/ var EndBehavior;
|
|
4120
|
+
(function(EndBehavior) {
|
|
4121
|
+
/**
|
|
4122
|
+
* 销毁
|
|
4123
|
+
*/ EndBehavior[EndBehavior["destroy"] = 0] = "destroy";
|
|
4124
|
+
/**
|
|
4125
|
+
* 重播
|
|
4126
|
+
*/ EndBehavior[EndBehavior["restart"] = 5] = "restart";
|
|
4127
|
+
/**
|
|
4128
|
+
* 无限播放
|
|
4129
|
+
*/ EndBehavior[EndBehavior["forward"] = 2] = "forward";
|
|
4130
|
+
/**
|
|
4131
|
+
* 冻结
|
|
4132
|
+
*/ EndBehavior[EndBehavior["freeze"] = 4] = "freeze";
|
|
4133
|
+
})(EndBehavior || (EndBehavior = {}));
|
|
4130
4134
|
var ParentItemEndBehavior;
|
|
4131
4135
|
(function(ParentItemEndBehavior) {
|
|
4132
4136
|
ParentItemEndBehavior[ParentItemEndBehavior["destroyChildren"] = 6] = "destroyChildren";
|
|
@@ -4451,7 +4455,6 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
4451
4455
|
get RenderType () { return RenderType; },
|
|
4452
4456
|
get RenderFace () { return RenderFace; },
|
|
4453
4457
|
get CameraClipMode () { return CameraClipMode; },
|
|
4454
|
-
get CompositionEndBehavior () { return CompositionEndBehavior; },
|
|
4455
4458
|
get BackgroundType () { return BackgroundType; },
|
|
4456
4459
|
END_BEHAVIOR_DESTROY: END_BEHAVIOR_DESTROY,
|
|
4457
4460
|
END_BEHAVIOR_PAUSE: END_BEHAVIOR_PAUSE,
|
|
@@ -4466,7 +4469,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
4466
4469
|
MESSAGE_ITEM_PHRASE_END: MESSAGE_ITEM_PHRASE_END,
|
|
4467
4470
|
get ValueType () { return ValueType; },
|
|
4468
4471
|
get BezierKeyframeType () { return BezierKeyframeType; },
|
|
4469
|
-
get
|
|
4472
|
+
get EndBehavior () { return EndBehavior; },
|
|
4470
4473
|
get ParentItemEndBehavior () { return ParentItemEndBehavior; },
|
|
4471
4474
|
get ParticleInteractionBehavior () { return ParticleInteractionBehavior; },
|
|
4472
4475
|
get ShapeArcMode () { return ShapeArcMode; },
|
|
@@ -4489,8 +4492,8 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
4489
4492
|
BuiltinObjectGUID: BuiltinObjectGUID
|
|
4490
4493
|
});
|
|
4491
4494
|
|
|
4492
|
-
var decoratorInitialStore =
|
|
4493
|
-
var mergedStore =
|
|
4495
|
+
var decoratorInitialStore = new Map();
|
|
4496
|
+
var mergedStore = new Map();
|
|
4494
4497
|
var effectsClassStore = {};
|
|
4495
4498
|
function effectsClass(className) {
|
|
4496
4499
|
return function(target, context) {
|
|
@@ -4505,22 +4508,22 @@ function serialize(type, sourceName) {
|
|
|
4505
4508
|
return generateSerializableMember(type, sourceName); // value member
|
|
4506
4509
|
}
|
|
4507
4510
|
function getMergedStore(target) {
|
|
4508
|
-
var classKey = target.constructor
|
|
4509
|
-
if (mergedStore
|
|
4510
|
-
return mergedStore
|
|
4511
|
+
var classKey = target.constructor;
|
|
4512
|
+
if (mergedStore.get(classKey)) {
|
|
4513
|
+
return mergedStore.get(classKey);
|
|
4511
4514
|
}
|
|
4512
|
-
|
|
4513
|
-
|
|
4515
|
+
var store = {};
|
|
4516
|
+
mergedStore.set(classKey, store);
|
|
4514
4517
|
var currentTarget = target;
|
|
4515
4518
|
var currentKey = classKey;
|
|
4516
4519
|
while(currentKey){
|
|
4517
|
-
var initialStore = decoratorInitialStore
|
|
4520
|
+
var initialStore = decoratorInitialStore.get(currentKey);
|
|
4518
4521
|
for(var property in initialStore){
|
|
4519
4522
|
store[property] = initialStore[property];
|
|
4520
4523
|
}
|
|
4521
4524
|
var parent = Object.getPrototypeOf(currentTarget);
|
|
4522
|
-
currentKey = Object.getPrototypeOf(parent).constructor
|
|
4523
|
-
if (currentKey ===
|
|
4525
|
+
currentKey = Object.getPrototypeOf(parent).constructor;
|
|
4526
|
+
if (currentKey === Object) {
|
|
4524
4527
|
break;
|
|
4525
4528
|
}
|
|
4526
4529
|
currentTarget = parent;
|
|
@@ -4530,6 +4533,9 @@ function getMergedStore(target) {
|
|
|
4530
4533
|
function generateSerializableMember(type, sourceName) {
|
|
4531
4534
|
return function(target, propertyKey) {
|
|
4532
4535
|
var classStore = getDirectStore(target);
|
|
4536
|
+
if (!classStore) {
|
|
4537
|
+
return;
|
|
4538
|
+
}
|
|
4533
4539
|
if (!classStore[propertyKey]) {
|
|
4534
4540
|
classStore[propertyKey] = {
|
|
4535
4541
|
type: type,
|
|
@@ -4539,11 +4545,11 @@ function generateSerializableMember(type, sourceName) {
|
|
|
4539
4545
|
};
|
|
4540
4546
|
}
|
|
4541
4547
|
function getDirectStore(target) {
|
|
4542
|
-
var classKey = target.constructor
|
|
4543
|
-
if (!decoratorInitialStore
|
|
4544
|
-
decoratorInitialStore
|
|
4548
|
+
var classKey = target.constructor;
|
|
4549
|
+
if (!decoratorInitialStore.get(classKey)) {
|
|
4550
|
+
decoratorInitialStore.set(classKey, {});
|
|
4545
4551
|
}
|
|
4546
|
-
return decoratorInitialStore
|
|
4552
|
+
return decoratorInitialStore.get(classKey);
|
|
4547
4553
|
}
|
|
4548
4554
|
|
|
4549
4555
|
/**
|
|
@@ -16613,7 +16619,7 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16613
16619
|
}
|
|
16614
16620
|
}
|
|
16615
16621
|
}
|
|
16616
|
-
} else if (this.item.endBehavior ===
|
|
16622
|
+
} else if (this.item.endBehavior === EndBehavior.restart) {
|
|
16617
16623
|
updateTrail();
|
|
16618
16624
|
this.loopStartTime = now - duration;
|
|
16619
16625
|
this.lastEmitTime -= duration;
|
|
@@ -16632,12 +16638,12 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16632
16638
|
this.ended = true;
|
|
16633
16639
|
this.onEnd(this);
|
|
16634
16640
|
var endBehavior = this.item.endBehavior;
|
|
16635
|
-
if (endBehavior ===
|
|
16641
|
+
if (endBehavior === EndBehavior.freeze) {
|
|
16636
16642
|
this.frozen = true;
|
|
16637
16643
|
}
|
|
16638
16644
|
}
|
|
16639
|
-
} else if (this.item.endBehavior !==
|
|
16640
|
-
if (
|
|
16645
|
+
} else if (this.item.endBehavior !== EndBehavior.restart) {
|
|
16646
|
+
if (EndBehavior.destroy === this.item.endBehavior) {
|
|
16641
16647
|
var node = link.last;
|
|
16642
16648
|
if (node && node.content[0] < this.lastUpdate) {
|
|
16643
16649
|
this.destroyed = true;
|
|
@@ -18717,9 +18723,9 @@ var AnimationClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18717
18723
|
var localTime = time - this.start;
|
|
18718
18724
|
var duration = this.duration;
|
|
18719
18725
|
if (localTime - duration > 0.001) {
|
|
18720
|
-
if (this.endBehavior ===
|
|
18726
|
+
if (this.endBehavior === EndBehavior.restart) {
|
|
18721
18727
|
localTime = localTime % duration;
|
|
18722
|
-
} else if (this.endBehavior ===
|
|
18728
|
+
} else if (this.endBehavior === EndBehavior.freeze) {
|
|
18723
18729
|
localTime = Math.min(duration, localTime);
|
|
18724
18730
|
}
|
|
18725
18731
|
}
|
|
@@ -18845,7 +18851,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
18845
18851
|
var ended = false;
|
|
18846
18852
|
var started = false;
|
|
18847
18853
|
var boundObject = this.track.binding;
|
|
18848
|
-
if (localTime > clip.start + clip.duration + 0.001 && clip.endBehavior ===
|
|
18854
|
+
if (localTime > clip.start + clip.duration + 0.001 && clip.endBehavior === EndBehavior.destroy) {
|
|
18849
18855
|
if (_instanceof1(boundObject, VFXItem) && VFXItem.isParticle(boundObject) && this.particleSystem && !this.particleSystem.destroyed) {
|
|
18850
18856
|
weight = 1.0;
|
|
18851
18857
|
} else {
|
|
@@ -19153,7 +19159,7 @@ function compareTracks(a, b) {
|
|
|
19153
19159
|
this.resolveBindings();
|
|
19154
19160
|
this.timelinePlayable = this.timelineAsset.createPlayable(this.graph);
|
|
19155
19161
|
// 重播不销毁元素
|
|
19156
|
-
if (this.item.endBehavior !==
|
|
19162
|
+
if (this.item.endBehavior !== EndBehavior.destroy) {
|
|
19157
19163
|
this.setReusable(true);
|
|
19158
19164
|
}
|
|
19159
19165
|
};
|
|
@@ -19220,7 +19226,7 @@ function compareTracks(a, b) {
|
|
|
19220
19226
|
compositionComponent.refId = refId;
|
|
19221
19227
|
item.transform.parentTransform = this.transform;
|
|
19222
19228
|
this.item.composition.refContent.push(item);
|
|
19223
|
-
if (item.endBehavior ===
|
|
19229
|
+
if (item.endBehavior === EndBehavior.restart) {
|
|
19224
19230
|
this.item.composition.autoRefTex = false;
|
|
19225
19231
|
}
|
|
19226
19232
|
compositionComponent.createContent();
|
|
@@ -19665,7 +19671,7 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
19665
19671
|
_proto.updateWithOptions = function updateWithOptions(options) {
|
|
19666
19672
|
this.textStyle = new TextStyle(options);
|
|
19667
19673
|
this.textLayout = new TextLayout(options);
|
|
19668
|
-
this.text = options.text;
|
|
19674
|
+
this.text = options.text.toString();
|
|
19669
19675
|
this.lineCount = this.getLineCount(options.text, true);
|
|
19670
19676
|
};
|
|
19671
19677
|
_proto.getLineCount = function getLineCount(text, init) {
|
|
@@ -19736,7 +19742,7 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
19736
19742
|
if (this.text === value) {
|
|
19737
19743
|
return;
|
|
19738
19744
|
}
|
|
19739
|
-
this.text = value;
|
|
19745
|
+
this.text = value.toString();
|
|
19740
19746
|
this.lineCount = this.getLineCount(value, false);
|
|
19741
19747
|
this.isDirty = true;
|
|
19742
19748
|
};
|
|
@@ -20845,29 +20851,31 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20845
20851
|
effectsObject.toData();
|
|
20846
20852
|
res[effectsObject.getInstanceId()] = effectsObject;
|
|
20847
20853
|
var serializedProperties = getMergedStore(effectsObject);
|
|
20848
|
-
|
|
20849
|
-
var
|
|
20850
|
-
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
value
|
|
20854
|
-
|
|
20855
|
-
if (EffectsObject.is(value)) {
|
|
20856
|
-
SerializationHelper.collectSerializableObject(value, res);
|
|
20857
|
-
} else if (isArray(value)) {
|
|
20858
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(value), _step1; !(_step1 = _iterator1()).done;){
|
|
20859
|
-
var arrayValue = _step1.value;
|
|
20860
|
-
if (EffectsObject.is(arrayValue)) {
|
|
20861
|
-
SerializationHelper.collectSerializableObject(arrayValue, res);
|
|
20862
|
-
}
|
|
20854
|
+
if (serializedProperties) {
|
|
20855
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(Object.keys(serializedProperties)), _step; !(_step = _iterator()).done;){
|
|
20856
|
+
var key = _step.value;
|
|
20857
|
+
// TODO 待移除,序列化属性通过 effectsObject 对象直接获取
|
|
20858
|
+
var value = effectsObject.taggedProperties[key];
|
|
20859
|
+
if (value === undefined) {
|
|
20860
|
+
value = effectsObject[key];
|
|
20863
20861
|
}
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
var
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20862
|
+
if (EffectsObject.is(value)) {
|
|
20863
|
+
SerializationHelper.collectSerializableObject(value, res);
|
|
20864
|
+
} else if (isArray(value)) {
|
|
20865
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(value), _step1; !(_step1 = _iterator1()).done;){
|
|
20866
|
+
var arrayValue = _step1.value;
|
|
20867
|
+
if (EffectsObject.is(arrayValue)) {
|
|
20868
|
+
SerializationHelper.collectSerializableObject(arrayValue, res);
|
|
20869
|
+
}
|
|
20870
|
+
}
|
|
20871
|
+
} else if (isObject(value)) {
|
|
20872
|
+
// 非 EffectsObject 对象只递归一层
|
|
20873
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(Object.keys(value)), _step2; !(_step2 = _iterator2()).done;){
|
|
20874
|
+
var objectKey = _step2.value;
|
|
20875
|
+
var objectValue = value[objectKey];
|
|
20876
|
+
if (EffectsObject.is(objectValue)) {
|
|
20877
|
+
SerializationHelper.collectSerializableObject(objectValue, res);
|
|
20878
|
+
}
|
|
20871
20879
|
}
|
|
20872
20880
|
}
|
|
20873
20881
|
}
|
|
@@ -20898,27 +20906,29 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20898
20906
|
serializedData = {};
|
|
20899
20907
|
}
|
|
20900
20908
|
var serializedProperties = getMergedStore(effectsObject);
|
|
20901
|
-
|
|
20902
|
-
var
|
|
20903
|
-
|
|
20904
|
-
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
|
|
20908
|
-
if (
|
|
20909
|
-
serializedData[key]
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
|
|
20918
|
-
if (
|
|
20919
|
-
serializedData[key]
|
|
20909
|
+
if (serializedProperties) {
|
|
20910
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(Object.keys(serializedProperties)), _step; !(_step = _iterator()).done;){
|
|
20911
|
+
var key = _step.value;
|
|
20912
|
+
var value = effectsObject[key];
|
|
20913
|
+
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean" || SerializationHelper.checkTypedArray(value)) {
|
|
20914
|
+
// TODO json 数据避免传 typedArray
|
|
20915
|
+
serializedData[key] = value;
|
|
20916
|
+
} else if (isArray(value)) {
|
|
20917
|
+
if (!serializedData[key]) {
|
|
20918
|
+
serializedData[key] = [];
|
|
20919
|
+
}
|
|
20920
|
+
SerializationHelper.serializeArrayProperty(value, serializedData[key], 0);
|
|
20921
|
+
} else if (EffectsObject.is(value)) {
|
|
20922
|
+
// TODO 处理 EffectsObject 递归序列化
|
|
20923
|
+
serializedData[key] = {
|
|
20924
|
+
id: value.getInstanceId()
|
|
20925
|
+
};
|
|
20926
|
+
} else if (isObject(value)) {
|
|
20927
|
+
if (!serializedData[key]) {
|
|
20928
|
+
serializedData[key] = {};
|
|
20929
|
+
}
|
|
20930
|
+
SerializationHelper.serializeObjectProperty(value, serializedData[key], 0);
|
|
20920
20931
|
}
|
|
20921
|
-
SerializationHelper.serializeObjectProperty(value, serializedData[key], 0);
|
|
20922
20932
|
}
|
|
20923
20933
|
}
|
|
20924
20934
|
// TODO 待移除 tagggedProperties 为没有装饰器的临时方案
|
|
@@ -20953,22 +20963,24 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20953
20963
|
var engine = effectsObject.engine;
|
|
20954
20964
|
for(var _iterator = _create_for_of_iterator_helper_loose(Object.keys(serializedData)), _step; !(_step = _iterator()).done;){
|
|
20955
20965
|
var key = _step.value;
|
|
20956
|
-
if (serializedProperties[key]) {
|
|
20966
|
+
if (serializedProperties && serializedProperties[key]) {
|
|
20957
20967
|
continue;
|
|
20958
20968
|
}
|
|
20959
20969
|
var value = serializedData[key];
|
|
20960
20970
|
taggedProperties[key] = SerializationHelper.deserializeProperty(value, engine, 0);
|
|
20961
20971
|
}
|
|
20962
|
-
|
|
20963
|
-
var
|
|
20964
|
-
|
|
20965
|
-
|
|
20966
|
-
|
|
20972
|
+
if (serializedProperties) {
|
|
20973
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(Object.keys(serializedProperties)), _step1; !(_step1 = _iterator1()).done;){
|
|
20974
|
+
var key1 = _step1.value;
|
|
20975
|
+
var value1 = serializedData[key1];
|
|
20976
|
+
if (value1 === undefined) {
|
|
20977
|
+
continue;
|
|
20978
|
+
}
|
|
20979
|
+
var propertyType = serializedProperties[key1].type;
|
|
20980
|
+
// FIXME: taggedProperties 为 readonly,这里存在强制赋值
|
|
20981
|
+
// @ts-expect-error
|
|
20982
|
+
effectsObject[key1] = SerializationHelper.deserializeProperty(value1, engine, 0, propertyType);
|
|
20967
20983
|
}
|
|
20968
|
-
var propertyType = serializedProperties[key1].type;
|
|
20969
|
-
// FIXME: taggedProperties 为 readonly,这里存在强制赋值
|
|
20970
|
-
// @ts-expect-error
|
|
20971
|
-
effectsObject[key1] = SerializationHelper.deserializeProperty(value1, engine, 0, propertyType);
|
|
20972
20984
|
}
|
|
20973
20985
|
effectsObject.fromData(taggedProperties);
|
|
20974
20986
|
};
|
|
@@ -20989,7 +21001,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
20989
21001
|
4
|
|
20990
21002
|
];
|
|
20991
21003
|
key = _step.value;
|
|
20992
|
-
if (serializedProperties[key]) {
|
|
21004
|
+
if (serializedProperties && serializedProperties[key]) {
|
|
20993
21005
|
return [
|
|
20994
21006
|
3,
|
|
20995
21007
|
3
|
|
@@ -21009,6 +21021,10 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21009
21021
|
1
|
|
21010
21022
|
];
|
|
21011
21023
|
case 4:
|
|
21024
|
+
if (!serializedProperties) return [
|
|
21025
|
+
3,
|
|
21026
|
+
8
|
|
21027
|
+
];
|
|
21012
21028
|
_iterator1 = _create_for_of_iterator_helper_loose(Object.keys(serializedProperties));
|
|
21013
21029
|
_state.label = 5;
|
|
21014
21030
|
case 5:
|
|
@@ -22192,8 +22208,8 @@ function getStandardCameraContent(model) {
|
|
|
22192
22208
|
json.compositions.forEach(function(composition) {
|
|
22193
22209
|
composition.items.forEach(function(item) {
|
|
22194
22210
|
if (item.type === ItemType.null) {
|
|
22195
|
-
if (item.endBehavior ===
|
|
22196
|
-
item.endBehavior =
|
|
22211
|
+
if (item.endBehavior === EndBehavior.destroy) {
|
|
22212
|
+
item.endBehavior = EndBehavior.freeze;
|
|
22197
22213
|
}
|
|
22198
22214
|
}
|
|
22199
22215
|
});
|
|
@@ -22212,7 +22228,7 @@ function getStandardCameraContent(model) {
|
|
|
22212
22228
|
json.compositions.forEach(function(composition) {
|
|
22213
22229
|
composition.items.forEach(function(item) {
|
|
22214
22230
|
if (item.type === ItemType.mesh || item.type === ItemType.light) {
|
|
22215
|
-
item.endBehavior = item.endBehavior === 1 ?
|
|
22231
|
+
item.endBehavior = item.endBehavior === 1 ? EndBehavior.destroy : item.endBehavior;
|
|
22216
22232
|
}
|
|
22217
22233
|
});
|
|
22218
22234
|
});
|
|
@@ -22224,7 +22240,11 @@ function getStandardCameraContent(model) {
|
|
|
22224
22240
|
var _loop = function() {
|
|
22225
22241
|
var composition = _step1.value;
|
|
22226
22242
|
// composition 的 endBehavior 兼容
|
|
22227
|
-
if (
|
|
22243
|
+
if (// @ts-expect-error
|
|
22244
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
22245
|
+
composition.endBehavior === END_BEHAVIOR_PAUSE_AND_DESTROY || // @ts-expect-error
|
|
22246
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
22247
|
+
composition.endBehavior === END_BEHAVIOR_PAUSE) {
|
|
22228
22248
|
composition.endBehavior = END_BEHAVIOR_FREEZE;
|
|
22229
22249
|
}
|
|
22230
22250
|
// 过滤掉滤镜元素
|
|
@@ -23011,13 +23031,13 @@ function getStandardItem(item, opt) {
|
|
|
23011
23031
|
var looping = (_originContent_options = originContent.options) == null ? void 0 : _originContent_options.looping;
|
|
23012
23032
|
if (looping) {
|
|
23013
23033
|
if (Array.isArray(looping)) {
|
|
23014
|
-
endBehavior = looping[1] ?
|
|
23034
|
+
endBehavior = looping[1] ? EndBehavior.restart : EndBehavior.destroy;
|
|
23015
23035
|
} else {
|
|
23016
|
-
endBehavior =
|
|
23036
|
+
endBehavior = EndBehavior.restart;
|
|
23017
23037
|
}
|
|
23018
23038
|
} else {
|
|
23019
23039
|
var _originContent_options1;
|
|
23020
|
-
endBehavior = endBehavior || (originContent == null ? void 0 : (_originContent_options1 = originContent.options) == null ? void 0 : _originContent_options1.endBehavior) ||
|
|
23040
|
+
endBehavior = endBehavior || (originContent == null ? void 0 : (_originContent_options1 = originContent.options) == null ? void 0 : _originContent_options1.endBehavior) || EndBehavior.destroy;
|
|
23021
23041
|
}
|
|
23022
23042
|
if (originContent.options.renderLevel) {
|
|
23023
23043
|
renderLevel = originContent.options.renderLevel;
|
|
@@ -24128,11 +24148,13 @@ var tmpScale = new Vector3(1, 1, 1);
|
|
|
24128
24148
|
* 获取归一化坐标和 3D 世界坐标的换算比例
|
|
24129
24149
|
* @param z - 当前的位置 z
|
|
24130
24150
|
*/ _proto.getInverseVPRatio = function getInverseVPRatio(z) {
|
|
24131
|
-
var pos = new Vector3(
|
|
24151
|
+
var pos = new Vector3(this.position.x, this.position.y, z);
|
|
24132
24152
|
var mat = this.getViewProjectionMatrix();
|
|
24133
24153
|
var inverseVP = this.getInverseViewProjectionMatrix();
|
|
24134
24154
|
var _mat_projectPoint = mat.projectPoint(pos), nz = _mat_projectPoint.z;
|
|
24135
|
-
|
|
24155
|
+
var _inverseVP_projectPoint = inverseVP.projectPoint(new Vector3(1, 1, nz)), xMax = _inverseVP_projectPoint.x, yMax = _inverseVP_projectPoint.y;
|
|
24156
|
+
var _inverseVP_projectPoint1 = inverseVP.projectPoint(new Vector3(-1, -1, nz)), xMin = _inverseVP_projectPoint1.x, yMin = _inverseVP_projectPoint1.y;
|
|
24157
|
+
return new Vector3((xMax - xMin) / 2, (yMax - yMin) / 2, 0);
|
|
24136
24158
|
};
|
|
24137
24159
|
/**
|
|
24138
24160
|
* 设置相机的旋转四元数
|
|
@@ -24360,7 +24382,7 @@ var listOrder = 0;
|
|
|
24360
24382
|
id: id,
|
|
24361
24383
|
duration: duration,
|
|
24362
24384
|
name: name,
|
|
24363
|
-
endBehavior: isNaN(endBehavior) ?
|
|
24385
|
+
endBehavior: isNaN(endBehavior) ? EndBehavior.freeze : endBehavior,
|
|
24364
24386
|
// looping,
|
|
24365
24387
|
items: items,
|
|
24366
24388
|
camera: camera,
|
|
@@ -24544,7 +24566,7 @@ var listOrder = 0;
|
|
|
24544
24566
|
};
|
|
24545
24567
|
this.reusable = reusable;
|
|
24546
24568
|
this.speed = speed;
|
|
24547
|
-
this.autoRefTex = !this.keepResource && imageUsage && this.rootItem.endBehavior !==
|
|
24569
|
+
this.autoRefTex = !this.keepResource && imageUsage && this.rootItem.endBehavior !== EndBehavior.restart;
|
|
24548
24570
|
this.name = sourceContent.name;
|
|
24549
24571
|
this.pluginSystem = pluginSystem;
|
|
24550
24572
|
this.pluginSystem.initializeComposition(this, scene);
|
|
@@ -24744,7 +24766,7 @@ var listOrder = 0;
|
|
|
24744
24766
|
* @returns 重新播放合成标志位
|
|
24745
24767
|
*/ _proto.shouldRestart = function shouldRestart() {
|
|
24746
24768
|
var _this_rootItem = this.rootItem, ended = _this_rootItem.ended, endBehavior = _this_rootItem.endBehavior;
|
|
24747
|
-
return ended && endBehavior ===
|
|
24769
|
+
return ended && endBehavior === EndBehavior.restart;
|
|
24748
24770
|
};
|
|
24749
24771
|
/**
|
|
24750
24772
|
* 是否合成需要销毁
|
|
@@ -24785,6 +24807,7 @@ var listOrder = 0;
|
|
|
24785
24807
|
// this.extraCamera?.getComponent(TimelineComponent)?.update(deltaTime);
|
|
24786
24808
|
this.updateCamera();
|
|
24787
24809
|
if (this.shouldDispose()) {
|
|
24810
|
+
this.onEnd == null ? void 0 : this.onEnd.call(this, this);
|
|
24788
24811
|
this.dispose();
|
|
24789
24812
|
} else {
|
|
24790
24813
|
if (!skipRender) {
|
|
@@ -24796,9 +24819,9 @@ var listOrder = 0;
|
|
|
24796
24819
|
var localTime = time - this.rootItem.start;
|
|
24797
24820
|
var duration = this.rootItem.duration;
|
|
24798
24821
|
if (localTime - duration > 0.001) {
|
|
24799
|
-
if (this.rootItem.endBehavior ===
|
|
24822
|
+
if (this.rootItem.endBehavior === EndBehavior.restart) {
|
|
24800
24823
|
localTime = localTime % duration;
|
|
24801
|
-
} else if (this.rootItem.endBehavior ===
|
|
24824
|
+
} else if (this.rootItem.endBehavior === EndBehavior.freeze) {
|
|
24802
24825
|
localTime = Math.min(duration, localTime);
|
|
24803
24826
|
}
|
|
24804
24827
|
}
|
|
@@ -24849,7 +24872,7 @@ var listOrder = 0;
|
|
|
24849
24872
|
for(var _iterator2 = _create_for_of_iterator_helper_loose(item.children), _step2; !(_step2 = _iterator2()).done;){
|
|
24850
24873
|
var child = _step2.value;
|
|
24851
24874
|
if (VFXItem.isComposition(child)) {
|
|
24852
|
-
if (child.ended && child.endBehavior ===
|
|
24875
|
+
if (child.ended && child.endBehavior === EndBehavior.restart) {
|
|
24853
24876
|
child.ended = false;
|
|
24854
24877
|
// TODO K帧动画在元素重建后需要 tick ,否则会导致元素位置和 k 帧第一帧位置不一致
|
|
24855
24878
|
this.callUpdate(child, 0);
|
|
@@ -25060,7 +25083,7 @@ var listOrder = 0;
|
|
|
25060
25083
|
var _this = this;
|
|
25061
25084
|
// 预合成元素销毁时销毁其中的item
|
|
25062
25085
|
if (item.type == ItemType.composition) {
|
|
25063
|
-
if (item.endBehavior !==
|
|
25086
|
+
if (item.endBehavior !== EndBehavior.freeze) {
|
|
25064
25087
|
var contentItems = item.getComponent(CompositionComponent).items;
|
|
25065
25088
|
contentItems.forEach(function(it) {
|
|
25066
25089
|
return _this.pluginSystem.plugins.forEach(function(loader) {
|
|
@@ -25319,6 +25342,1567 @@ var listOrder = 0;
|
|
|
25319
25342
|
return Composition;
|
|
25320
25343
|
}();
|
|
25321
25344
|
|
|
25345
|
+
var SIZEOF_SHORT = 2;
|
|
25346
|
+
var SIZEOF_INT = 4;
|
|
25347
|
+
var FILE_IDENTIFIER_LENGTH = 4;
|
|
25348
|
+
var SIZE_PREFIX_LENGTH = 4;
|
|
25349
|
+
|
|
25350
|
+
var int32 = new Int32Array(2);
|
|
25351
|
+
var float32 = new Float32Array(int32.buffer);
|
|
25352
|
+
var float64 = new Float64Array(int32.buffer);
|
|
25353
|
+
var isLittleEndian = new Uint16Array(new Uint8Array([
|
|
25354
|
+
1,
|
|
25355
|
+
0
|
|
25356
|
+
]).buffer)[0] === 1;
|
|
25357
|
+
|
|
25358
|
+
var Encoding;
|
|
25359
|
+
(function(Encoding) {
|
|
25360
|
+
Encoding[Encoding["UTF8_BYTES"] = 1] = "UTF8_BYTES";
|
|
25361
|
+
Encoding[Encoding["UTF16_STRING"] = 2] = "UTF16_STRING";
|
|
25362
|
+
})(Encoding || (Encoding = {}));
|
|
25363
|
+
|
|
25364
|
+
var ByteBuffer = /*#__PURE__*/ function() {
|
|
25365
|
+
function ByteBuffer(bytes_) {
|
|
25366
|
+
this.bytes_ = bytes_;
|
|
25367
|
+
this.position_ = 0;
|
|
25368
|
+
this.text_decoder_ = new TextDecoder();
|
|
25369
|
+
}
|
|
25370
|
+
var _proto = ByteBuffer.prototype;
|
|
25371
|
+
_proto.clear = function clear() {
|
|
25372
|
+
this.position_ = 0;
|
|
25373
|
+
};
|
|
25374
|
+
/**
|
|
25375
|
+
* Get the underlying `Uint8Array`.
|
|
25376
|
+
*/ _proto.bytes = function bytes() {
|
|
25377
|
+
return this.bytes_;
|
|
25378
|
+
};
|
|
25379
|
+
/**
|
|
25380
|
+
* Get the buffer's position.
|
|
25381
|
+
*/ _proto.position = function position() {
|
|
25382
|
+
return this.position_;
|
|
25383
|
+
};
|
|
25384
|
+
/**
|
|
25385
|
+
* Set the buffer's position.
|
|
25386
|
+
*/ _proto.setPosition = function setPosition(position) {
|
|
25387
|
+
this.position_ = position;
|
|
25388
|
+
};
|
|
25389
|
+
/**
|
|
25390
|
+
* Get the buffer's capacity.
|
|
25391
|
+
*/ _proto.capacity = function capacity() {
|
|
25392
|
+
return this.bytes_.length;
|
|
25393
|
+
};
|
|
25394
|
+
_proto.readInt8 = function readInt8(offset) {
|
|
25395
|
+
return this.readUint8(offset) << 24 >> 24;
|
|
25396
|
+
};
|
|
25397
|
+
_proto.readUint8 = function readUint8(offset) {
|
|
25398
|
+
return this.bytes_[offset];
|
|
25399
|
+
};
|
|
25400
|
+
_proto.readInt16 = function readInt16(offset) {
|
|
25401
|
+
return this.readUint16(offset) << 16 >> 16;
|
|
25402
|
+
};
|
|
25403
|
+
_proto.readUint16 = function readUint16(offset) {
|
|
25404
|
+
return this.bytes_[offset] | this.bytes_[offset + 1] << 8;
|
|
25405
|
+
};
|
|
25406
|
+
_proto.readInt32 = function readInt32(offset) {
|
|
25407
|
+
return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;
|
|
25408
|
+
};
|
|
25409
|
+
_proto.readUint32 = function readUint32(offset) {
|
|
25410
|
+
return this.readInt32(offset) >>> 0;
|
|
25411
|
+
};
|
|
25412
|
+
_proto.readInt64 = function readInt64(offset) {
|
|
25413
|
+
return BigInt.asIntN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
|
|
25414
|
+
};
|
|
25415
|
+
_proto.readUint64 = function readUint64(offset) {
|
|
25416
|
+
return BigInt.asUintN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));
|
|
25417
|
+
};
|
|
25418
|
+
_proto.readFloat32 = function readFloat32(offset) {
|
|
25419
|
+
int32[0] = this.readInt32(offset);
|
|
25420
|
+
return float32[0];
|
|
25421
|
+
};
|
|
25422
|
+
_proto.readFloat64 = function readFloat64(offset) {
|
|
25423
|
+
int32[isLittleEndian ? 0 : 1] = this.readInt32(offset);
|
|
25424
|
+
int32[isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);
|
|
25425
|
+
return float64[0];
|
|
25426
|
+
};
|
|
25427
|
+
_proto.writeInt8 = function writeInt8(offset, value) {
|
|
25428
|
+
this.bytes_[offset] = value;
|
|
25429
|
+
};
|
|
25430
|
+
_proto.writeUint8 = function writeUint8(offset, value) {
|
|
25431
|
+
this.bytes_[offset] = value;
|
|
25432
|
+
};
|
|
25433
|
+
_proto.writeInt16 = function writeInt16(offset, value) {
|
|
25434
|
+
this.bytes_[offset] = value;
|
|
25435
|
+
this.bytes_[offset + 1] = value >> 8;
|
|
25436
|
+
};
|
|
25437
|
+
_proto.writeUint16 = function writeUint16(offset, value) {
|
|
25438
|
+
this.bytes_[offset] = value;
|
|
25439
|
+
this.bytes_[offset + 1] = value >> 8;
|
|
25440
|
+
};
|
|
25441
|
+
_proto.writeInt32 = function writeInt32(offset, value) {
|
|
25442
|
+
this.bytes_[offset] = value;
|
|
25443
|
+
this.bytes_[offset + 1] = value >> 8;
|
|
25444
|
+
this.bytes_[offset + 2] = value >> 16;
|
|
25445
|
+
this.bytes_[offset + 3] = value >> 24;
|
|
25446
|
+
};
|
|
25447
|
+
_proto.writeUint32 = function writeUint32(offset, value) {
|
|
25448
|
+
this.bytes_[offset] = value;
|
|
25449
|
+
this.bytes_[offset + 1] = value >> 8;
|
|
25450
|
+
this.bytes_[offset + 2] = value >> 16;
|
|
25451
|
+
this.bytes_[offset + 3] = value >> 24;
|
|
25452
|
+
};
|
|
25453
|
+
_proto.writeInt64 = function writeInt64(offset, value) {
|
|
25454
|
+
this.writeInt32(offset, Number(BigInt.asIntN(32, value)));
|
|
25455
|
+
this.writeInt32(offset + 4, Number(BigInt.asIntN(32, value >> BigInt(32))));
|
|
25456
|
+
};
|
|
25457
|
+
_proto.writeUint64 = function writeUint64(offset, value) {
|
|
25458
|
+
this.writeUint32(offset, Number(BigInt.asUintN(32, value)));
|
|
25459
|
+
this.writeUint32(offset + 4, Number(BigInt.asUintN(32, value >> BigInt(32))));
|
|
25460
|
+
};
|
|
25461
|
+
_proto.writeFloat32 = function writeFloat32(offset, value) {
|
|
25462
|
+
float32[0] = value;
|
|
25463
|
+
this.writeInt32(offset, int32[0]);
|
|
25464
|
+
};
|
|
25465
|
+
_proto.writeFloat64 = function writeFloat64(offset, value) {
|
|
25466
|
+
float64[0] = value;
|
|
25467
|
+
this.writeInt32(offset, int32[isLittleEndian ? 0 : 1]);
|
|
25468
|
+
this.writeInt32(offset + 4, int32[isLittleEndian ? 1 : 0]);
|
|
25469
|
+
};
|
|
25470
|
+
/**
|
|
25471
|
+
* Return the file identifier. Behavior is undefined for FlatBuffers whose
|
|
25472
|
+
* schema does not include a file_identifier (likely points at padding or the
|
|
25473
|
+
* start of a the root vtable).
|
|
25474
|
+
*/ _proto.getBufferIdentifier = function getBufferIdentifier() {
|
|
25475
|
+
if (this.bytes_.length < this.position_ + SIZEOF_INT + FILE_IDENTIFIER_LENGTH) {
|
|
25476
|
+
throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");
|
|
25477
|
+
}
|
|
25478
|
+
var result = "";
|
|
25479
|
+
for(var i = 0; i < FILE_IDENTIFIER_LENGTH; i++){
|
|
25480
|
+
result += String.fromCharCode(this.readInt8(this.position_ + SIZEOF_INT + i));
|
|
25481
|
+
}
|
|
25482
|
+
return result;
|
|
25483
|
+
};
|
|
25484
|
+
/**
|
|
25485
|
+
* Look up a field in the vtable, return an offset into the object, or 0 if the
|
|
25486
|
+
* field is not present.
|
|
25487
|
+
*/ _proto.__offset = function __offset(bb_pos, vtable_offset) {
|
|
25488
|
+
var vtable = bb_pos - this.readInt32(bb_pos);
|
|
25489
|
+
return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;
|
|
25490
|
+
};
|
|
25491
|
+
/**
|
|
25492
|
+
* Initialize any Table-derived type to point to the union at the given offset.
|
|
25493
|
+
*/ _proto.__union = function __union(t, offset) {
|
|
25494
|
+
t.bb_pos = offset + this.readInt32(offset);
|
|
25495
|
+
t.bb = this;
|
|
25496
|
+
return t;
|
|
25497
|
+
};
|
|
25498
|
+
/**
|
|
25499
|
+
* Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.
|
|
25500
|
+
* This allocates a new string and converts to wide chars upon each access.
|
|
25501
|
+
*
|
|
25502
|
+
* To avoid the conversion to string, pass Encoding.UTF8_BYTES as the
|
|
25503
|
+
* "optionalEncoding" argument. This is useful for avoiding conversion when
|
|
25504
|
+
* the data will just be packaged back up in another FlatBuffer later on.
|
|
25505
|
+
*
|
|
25506
|
+
* @param offset
|
|
25507
|
+
* @param opt_encoding Defaults to UTF16_STRING
|
|
25508
|
+
*/ _proto.__string = function __string(offset, opt_encoding) {
|
|
25509
|
+
offset += this.readInt32(offset);
|
|
25510
|
+
var length = this.readInt32(offset);
|
|
25511
|
+
offset += SIZEOF_INT;
|
|
25512
|
+
var utf8bytes = this.bytes_.subarray(offset, offset + length);
|
|
25513
|
+
if (opt_encoding === Encoding.UTF8_BYTES) return utf8bytes;
|
|
25514
|
+
else return this.text_decoder_.decode(utf8bytes);
|
|
25515
|
+
};
|
|
25516
|
+
/**
|
|
25517
|
+
* Handle unions that can contain string as its member, if a Table-derived type then initialize it,
|
|
25518
|
+
* if a string then return a new one
|
|
25519
|
+
*
|
|
25520
|
+
* WARNING: strings are immutable in JS so we can't change the string that the user gave us, this
|
|
25521
|
+
* makes the behaviour of __union_with_string different compared to __union
|
|
25522
|
+
*/ _proto.__union_with_string = function __union_with_string(o, offset) {
|
|
25523
|
+
if (typeof o === "string") {
|
|
25524
|
+
return this.__string(offset);
|
|
25525
|
+
}
|
|
25526
|
+
return this.__union(o, offset);
|
|
25527
|
+
};
|
|
25528
|
+
/**
|
|
25529
|
+
* Retrieve the relative offset stored at "offset"
|
|
25530
|
+
*/ _proto.__indirect = function __indirect(offset) {
|
|
25531
|
+
return offset + this.readInt32(offset);
|
|
25532
|
+
};
|
|
25533
|
+
/**
|
|
25534
|
+
* Get the start of data of a vector whose offset is stored at "offset" in this object.
|
|
25535
|
+
*/ _proto.__vector = function __vector(offset) {
|
|
25536
|
+
return offset + this.readInt32(offset) + SIZEOF_INT; // data starts after the length
|
|
25537
|
+
};
|
|
25538
|
+
/**
|
|
25539
|
+
* Get the length of a vector whose offset is stored at "offset" in this object.
|
|
25540
|
+
*/ _proto.__vector_len = function __vector_len(offset) {
|
|
25541
|
+
return this.readInt32(offset + this.readInt32(offset));
|
|
25542
|
+
};
|
|
25543
|
+
_proto.__has_identifier = function __has_identifier(ident) {
|
|
25544
|
+
if (ident.length != FILE_IDENTIFIER_LENGTH) {
|
|
25545
|
+
throw new Error("FlatBuffers: file identifier must be length " + FILE_IDENTIFIER_LENGTH);
|
|
25546
|
+
}
|
|
25547
|
+
for(var i = 0; i < FILE_IDENTIFIER_LENGTH; i++){
|
|
25548
|
+
if (ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)) {
|
|
25549
|
+
return false;
|
|
25550
|
+
}
|
|
25551
|
+
}
|
|
25552
|
+
return true;
|
|
25553
|
+
};
|
|
25554
|
+
/**
|
|
25555
|
+
* A helper function for generating list for obj api
|
|
25556
|
+
*/ _proto.createScalarList = function createScalarList(listAccessor, listLength) {
|
|
25557
|
+
var ret = [];
|
|
25558
|
+
for(var i = 0; i < listLength; ++i){
|
|
25559
|
+
var val = listAccessor(i);
|
|
25560
|
+
if (val !== null) {
|
|
25561
|
+
ret.push(val);
|
|
25562
|
+
}
|
|
25563
|
+
}
|
|
25564
|
+
return ret;
|
|
25565
|
+
};
|
|
25566
|
+
/**
|
|
25567
|
+
* A helper function for generating list for obj api
|
|
25568
|
+
* @param listAccessor function that accepts an index and return data at that index
|
|
25569
|
+
* @param listLength listLength
|
|
25570
|
+
* @param res result list
|
|
25571
|
+
*/ _proto.createObjList = function createObjList(listAccessor, listLength) {
|
|
25572
|
+
var ret = [];
|
|
25573
|
+
for(var i = 0; i < listLength; ++i){
|
|
25574
|
+
var val = listAccessor(i);
|
|
25575
|
+
if (val !== null) {
|
|
25576
|
+
ret.push(val.unpack());
|
|
25577
|
+
}
|
|
25578
|
+
}
|
|
25579
|
+
return ret;
|
|
25580
|
+
};
|
|
25581
|
+
/**
|
|
25582
|
+
* Create and allocate a new ByteBuffer with a given size.
|
|
25583
|
+
*/ ByteBuffer.allocate = function allocate(byte_size) {
|
|
25584
|
+
return new ByteBuffer(new Uint8Array(byte_size));
|
|
25585
|
+
};
|
|
25586
|
+
return ByteBuffer;
|
|
25587
|
+
}();
|
|
25588
|
+
|
|
25589
|
+
var Builder = /*#__PURE__*/ function() {
|
|
25590
|
+
function Builder(opt_initial_size) {
|
|
25591
|
+
/** Minimum alignment encountered so far. */ this.minalign = 1;
|
|
25592
|
+
/** The vtable for the current table. */ this.vtable = null;
|
|
25593
|
+
/** The amount of fields we're actually using. */ this.vtable_in_use = 0;
|
|
25594
|
+
/** Whether we are currently serializing a table. */ this.isNested = false;
|
|
25595
|
+
/** Starting offset of the current struct/table. */ this.object_start = 0;
|
|
25596
|
+
/** List of offsets of all vtables. */ this.vtables = [];
|
|
25597
|
+
/** For the current vector being built. */ this.vector_num_elems = 0;
|
|
25598
|
+
/** False omits default values from the serialized data */ this.force_defaults = false;
|
|
25599
|
+
this.string_maps = null;
|
|
25600
|
+
this.text_encoder = new TextEncoder();
|
|
25601
|
+
var initial_size;
|
|
25602
|
+
if (!opt_initial_size) {
|
|
25603
|
+
initial_size = 1024;
|
|
25604
|
+
} else {
|
|
25605
|
+
initial_size = opt_initial_size;
|
|
25606
|
+
}
|
|
25607
|
+
/**
|
|
25608
|
+
* @type {ByteBuffer}
|
|
25609
|
+
* @private
|
|
25610
|
+
*/ this.bb = ByteBuffer.allocate(initial_size);
|
|
25611
|
+
this.space = initial_size;
|
|
25612
|
+
}
|
|
25613
|
+
var _proto = Builder.prototype;
|
|
25614
|
+
_proto.clear = function clear() {
|
|
25615
|
+
this.bb.clear();
|
|
25616
|
+
this.space = this.bb.capacity();
|
|
25617
|
+
this.minalign = 1;
|
|
25618
|
+
this.vtable = null;
|
|
25619
|
+
this.vtable_in_use = 0;
|
|
25620
|
+
this.isNested = false;
|
|
25621
|
+
this.object_start = 0;
|
|
25622
|
+
this.vtables = [];
|
|
25623
|
+
this.vector_num_elems = 0;
|
|
25624
|
+
this.force_defaults = false;
|
|
25625
|
+
this.string_maps = null;
|
|
25626
|
+
};
|
|
25627
|
+
/**
|
|
25628
|
+
* In order to save space, fields that are set to their default value
|
|
25629
|
+
* don't get serialized into the buffer. Forcing defaults provides a
|
|
25630
|
+
* way to manually disable this optimization.
|
|
25631
|
+
*
|
|
25632
|
+
* @param forceDefaults true always serializes default values
|
|
25633
|
+
*/ _proto.forceDefaults = function forceDefaults(forceDefaults) {
|
|
25634
|
+
this.force_defaults = forceDefaults;
|
|
25635
|
+
};
|
|
25636
|
+
/**
|
|
25637
|
+
* Get the ByteBuffer representing the FlatBuffer. Only call this after you've
|
|
25638
|
+
* called finish(). The actual data starts at the ByteBuffer's current position,
|
|
25639
|
+
* not necessarily at 0.
|
|
25640
|
+
*/ _proto.dataBuffer = function dataBuffer() {
|
|
25641
|
+
return this.bb;
|
|
25642
|
+
};
|
|
25643
|
+
/**
|
|
25644
|
+
* Get the bytes representing the FlatBuffer. Only call this after you've
|
|
25645
|
+
* called finish().
|
|
25646
|
+
*/ _proto.asUint8Array = function asUint8Array() {
|
|
25647
|
+
return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());
|
|
25648
|
+
};
|
|
25649
|
+
/**
|
|
25650
|
+
* Prepare to write an element of `size` after `additional_bytes` have been
|
|
25651
|
+
* written, e.g. if you write a string, you need to align such the int length
|
|
25652
|
+
* field is aligned to 4 bytes, and the string data follows it directly. If all
|
|
25653
|
+
* you need to do is alignment, `additional_bytes` will be 0.
|
|
25654
|
+
*
|
|
25655
|
+
* @param size This is the of the new element to write
|
|
25656
|
+
* @param additional_bytes The padding size
|
|
25657
|
+
*/ _proto.prep = function prep(size, additional_bytes) {
|
|
25658
|
+
// Track the biggest thing we've ever aligned to.
|
|
25659
|
+
if (size > this.minalign) {
|
|
25660
|
+
this.minalign = size;
|
|
25661
|
+
}
|
|
25662
|
+
// Find the amount of alignment needed such that `size` is properly
|
|
25663
|
+
// aligned after `additional_bytes`
|
|
25664
|
+
var align_size = ~(this.bb.capacity() - this.space + additional_bytes) + 1 & size - 1;
|
|
25665
|
+
// Reallocate the buffer if needed.
|
|
25666
|
+
while(this.space < align_size + size + additional_bytes){
|
|
25667
|
+
var old_buf_size = this.bb.capacity();
|
|
25668
|
+
this.bb = Builder.growByteBuffer(this.bb);
|
|
25669
|
+
this.space += this.bb.capacity() - old_buf_size;
|
|
25670
|
+
}
|
|
25671
|
+
this.pad(align_size);
|
|
25672
|
+
};
|
|
25673
|
+
_proto.pad = function pad(byte_size) {
|
|
25674
|
+
for(var i = 0; i < byte_size; i++){
|
|
25675
|
+
this.bb.writeInt8(--this.space, 0);
|
|
25676
|
+
}
|
|
25677
|
+
};
|
|
25678
|
+
_proto.writeInt8 = function writeInt8(value) {
|
|
25679
|
+
this.bb.writeInt8(this.space -= 1, value);
|
|
25680
|
+
};
|
|
25681
|
+
_proto.writeInt16 = function writeInt16(value) {
|
|
25682
|
+
this.bb.writeInt16(this.space -= 2, value);
|
|
25683
|
+
};
|
|
25684
|
+
_proto.writeInt32 = function writeInt32(value) {
|
|
25685
|
+
this.bb.writeInt32(this.space -= 4, value);
|
|
25686
|
+
};
|
|
25687
|
+
_proto.writeInt64 = function writeInt64(value) {
|
|
25688
|
+
this.bb.writeInt64(this.space -= 8, value);
|
|
25689
|
+
};
|
|
25690
|
+
_proto.writeFloat32 = function writeFloat32(value) {
|
|
25691
|
+
this.bb.writeFloat32(this.space -= 4, value);
|
|
25692
|
+
};
|
|
25693
|
+
_proto.writeFloat64 = function writeFloat64(value) {
|
|
25694
|
+
this.bb.writeFloat64(this.space -= 8, value);
|
|
25695
|
+
};
|
|
25696
|
+
/**
|
|
25697
|
+
* Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25698
|
+
* @param value The `int8` to add the buffer.
|
|
25699
|
+
*/ _proto.addInt8 = function addInt8(value) {
|
|
25700
|
+
this.prep(1, 0);
|
|
25701
|
+
this.writeInt8(value);
|
|
25702
|
+
};
|
|
25703
|
+
/**
|
|
25704
|
+
* Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25705
|
+
* @param value The `int16` to add the buffer.
|
|
25706
|
+
*/ _proto.addInt16 = function addInt16(value) {
|
|
25707
|
+
this.prep(2, 0);
|
|
25708
|
+
this.writeInt16(value);
|
|
25709
|
+
};
|
|
25710
|
+
/**
|
|
25711
|
+
* Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25712
|
+
* @param value The `int32` to add the buffer.
|
|
25713
|
+
*/ _proto.addInt32 = function addInt32(value) {
|
|
25714
|
+
this.prep(4, 0);
|
|
25715
|
+
this.writeInt32(value);
|
|
25716
|
+
};
|
|
25717
|
+
/**
|
|
25718
|
+
* Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25719
|
+
* @param value The `int64` to add the buffer.
|
|
25720
|
+
*/ _proto.addInt64 = function addInt64(value) {
|
|
25721
|
+
this.prep(8, 0);
|
|
25722
|
+
this.writeInt64(value);
|
|
25723
|
+
};
|
|
25724
|
+
/**
|
|
25725
|
+
* Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25726
|
+
* @param value The `float32` to add the buffer.
|
|
25727
|
+
*/ _proto.addFloat32 = function addFloat32(value) {
|
|
25728
|
+
this.prep(4, 0);
|
|
25729
|
+
this.writeFloat32(value);
|
|
25730
|
+
};
|
|
25731
|
+
/**
|
|
25732
|
+
* Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
25733
|
+
* @param value The `float64` to add the buffer.
|
|
25734
|
+
*/ _proto.addFloat64 = function addFloat64(value) {
|
|
25735
|
+
this.prep(8, 0);
|
|
25736
|
+
this.writeFloat64(value);
|
|
25737
|
+
};
|
|
25738
|
+
_proto.addFieldInt8 = function addFieldInt8(voffset, value, defaultValue) {
|
|
25739
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25740
|
+
this.addInt8(value);
|
|
25741
|
+
this.slot(voffset);
|
|
25742
|
+
}
|
|
25743
|
+
};
|
|
25744
|
+
_proto.addFieldInt16 = function addFieldInt16(voffset, value, defaultValue) {
|
|
25745
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25746
|
+
this.addInt16(value);
|
|
25747
|
+
this.slot(voffset);
|
|
25748
|
+
}
|
|
25749
|
+
};
|
|
25750
|
+
_proto.addFieldInt32 = function addFieldInt32(voffset, value, defaultValue) {
|
|
25751
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25752
|
+
this.addInt32(value);
|
|
25753
|
+
this.slot(voffset);
|
|
25754
|
+
}
|
|
25755
|
+
};
|
|
25756
|
+
_proto.addFieldInt64 = function addFieldInt64(voffset, value, defaultValue) {
|
|
25757
|
+
if (this.force_defaults || value !== defaultValue) {
|
|
25758
|
+
this.addInt64(value);
|
|
25759
|
+
this.slot(voffset);
|
|
25760
|
+
}
|
|
25761
|
+
};
|
|
25762
|
+
_proto.addFieldFloat32 = function addFieldFloat32(voffset, value, defaultValue) {
|
|
25763
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25764
|
+
this.addFloat32(value);
|
|
25765
|
+
this.slot(voffset);
|
|
25766
|
+
}
|
|
25767
|
+
};
|
|
25768
|
+
_proto.addFieldFloat64 = function addFieldFloat64(voffset, value, defaultValue) {
|
|
25769
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25770
|
+
this.addFloat64(value);
|
|
25771
|
+
this.slot(voffset);
|
|
25772
|
+
}
|
|
25773
|
+
};
|
|
25774
|
+
_proto.addFieldOffset = function addFieldOffset(voffset, value, defaultValue) {
|
|
25775
|
+
if (this.force_defaults || value != defaultValue) {
|
|
25776
|
+
this.addOffset(value);
|
|
25777
|
+
this.slot(voffset);
|
|
25778
|
+
}
|
|
25779
|
+
};
|
|
25780
|
+
/**
|
|
25781
|
+
* Structs are stored inline, so nothing additional is being added. `d` is always 0.
|
|
25782
|
+
*/ _proto.addFieldStruct = function addFieldStruct(voffset, value, defaultValue) {
|
|
25783
|
+
if (value != defaultValue) {
|
|
25784
|
+
this.nested(value);
|
|
25785
|
+
this.slot(voffset);
|
|
25786
|
+
}
|
|
25787
|
+
};
|
|
25788
|
+
/**
|
|
25789
|
+
* Structures are always stored inline, they need to be created right
|
|
25790
|
+
* where they're used. You'll get this assertion failure if you
|
|
25791
|
+
* created it elsewhere.
|
|
25792
|
+
*/ _proto.nested = function nested(obj) {
|
|
25793
|
+
if (obj != this.offset()) {
|
|
25794
|
+
throw new TypeError("FlatBuffers: struct must be serialized inline.");
|
|
25795
|
+
}
|
|
25796
|
+
};
|
|
25797
|
+
/**
|
|
25798
|
+
* Should not be creating any other object, string or vector
|
|
25799
|
+
* while an object is being constructed
|
|
25800
|
+
*/ _proto.notNested = function notNested() {
|
|
25801
|
+
if (this.isNested) {
|
|
25802
|
+
throw new TypeError("FlatBuffers: object serialization must not be nested.");
|
|
25803
|
+
}
|
|
25804
|
+
};
|
|
25805
|
+
/**
|
|
25806
|
+
* Set the current vtable at `voffset` to the current location in the buffer.
|
|
25807
|
+
*/ _proto.slot = function slot(voffset) {
|
|
25808
|
+
if (this.vtable !== null) this.vtable[voffset] = this.offset();
|
|
25809
|
+
};
|
|
25810
|
+
/**
|
|
25811
|
+
* @returns Offset relative to the end of the buffer.
|
|
25812
|
+
*/ _proto.offset = function offset() {
|
|
25813
|
+
return this.bb.capacity() - this.space;
|
|
25814
|
+
};
|
|
25815
|
+
/**
|
|
25816
|
+
* Adds on offset, relative to where it will be written.
|
|
25817
|
+
*
|
|
25818
|
+
* @param offset The offset to add.
|
|
25819
|
+
*/ _proto.addOffset = function addOffset(offset) {
|
|
25820
|
+
this.prep(SIZEOF_INT, 0); // Ensure alignment is already done.
|
|
25821
|
+
this.writeInt32(this.offset() - offset + SIZEOF_INT);
|
|
25822
|
+
};
|
|
25823
|
+
/**
|
|
25824
|
+
* Start encoding a new object in the buffer. Users will not usually need to
|
|
25825
|
+
* call this directly. The FlatBuffers compiler will generate helper methods
|
|
25826
|
+
* that call this method internally.
|
|
25827
|
+
*/ _proto.startObject = function startObject(numfields) {
|
|
25828
|
+
this.notNested();
|
|
25829
|
+
if (this.vtable == null) {
|
|
25830
|
+
this.vtable = [];
|
|
25831
|
+
}
|
|
25832
|
+
this.vtable_in_use = numfields;
|
|
25833
|
+
for(var i = 0; i < numfields; i++){
|
|
25834
|
+
this.vtable[i] = 0; // This will push additional elements as needed
|
|
25835
|
+
}
|
|
25836
|
+
this.isNested = true;
|
|
25837
|
+
this.object_start = this.offset();
|
|
25838
|
+
};
|
|
25839
|
+
/**
|
|
25840
|
+
* Finish off writing the object that is under construction.
|
|
25841
|
+
*
|
|
25842
|
+
* @returns The offset to the object inside `dataBuffer`
|
|
25843
|
+
*/ _proto.endObject = function endObject() {
|
|
25844
|
+
if (this.vtable == null || !this.isNested) {
|
|
25845
|
+
throw new Error("FlatBuffers: endObject called without startObject");
|
|
25846
|
+
}
|
|
25847
|
+
this.addInt32(0);
|
|
25848
|
+
var vtableloc = this.offset();
|
|
25849
|
+
// Trim trailing zeroes.
|
|
25850
|
+
var i = this.vtable_in_use - 1;
|
|
25851
|
+
// eslint-disable-next-line no-empty
|
|
25852
|
+
for(; i >= 0 && this.vtable[i] == 0; i--){}
|
|
25853
|
+
var trimmed_size = i + 1;
|
|
25854
|
+
// Write out the current vtable.
|
|
25855
|
+
for(; i >= 0; i--){
|
|
25856
|
+
// Offset relative to the start of the table.
|
|
25857
|
+
this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);
|
|
25858
|
+
}
|
|
25859
|
+
var standard_fields = 2; // The fields below:
|
|
25860
|
+
this.addInt16(vtableloc - this.object_start);
|
|
25861
|
+
var len = (trimmed_size + standard_fields) * SIZEOF_SHORT;
|
|
25862
|
+
this.addInt16(len);
|
|
25863
|
+
// Search for an existing vtable that matches the current one.
|
|
25864
|
+
var existing_vtable = 0;
|
|
25865
|
+
var vt1 = this.space;
|
|
25866
|
+
outer_loop: for(i = 0; i < this.vtables.length; i++){
|
|
25867
|
+
var vt2 = this.bb.capacity() - this.vtables[i];
|
|
25868
|
+
if (len == this.bb.readInt16(vt2)) {
|
|
25869
|
+
for(var j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT){
|
|
25870
|
+
if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {
|
|
25871
|
+
continue outer_loop;
|
|
25872
|
+
}
|
|
25873
|
+
}
|
|
25874
|
+
existing_vtable = this.vtables[i];
|
|
25875
|
+
break;
|
|
25876
|
+
}
|
|
25877
|
+
}
|
|
25878
|
+
if (existing_vtable) {
|
|
25879
|
+
// Found a match:
|
|
25880
|
+
// Remove the current vtable.
|
|
25881
|
+
this.space = this.bb.capacity() - vtableloc;
|
|
25882
|
+
// Point table to existing vtable.
|
|
25883
|
+
this.bb.writeInt32(this.space, existing_vtable - vtableloc);
|
|
25884
|
+
} else {
|
|
25885
|
+
// No match:
|
|
25886
|
+
// Add the location of the current vtable to the list of vtables.
|
|
25887
|
+
this.vtables.push(this.offset());
|
|
25888
|
+
// Point table to current vtable.
|
|
25889
|
+
this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);
|
|
25890
|
+
}
|
|
25891
|
+
this.isNested = false;
|
|
25892
|
+
return vtableloc;
|
|
25893
|
+
};
|
|
25894
|
+
/**
|
|
25895
|
+
* Finalize a buffer, poiting to the given `root_table`.
|
|
25896
|
+
*/ _proto.finish = function finish(root_table, opt_file_identifier, opt_size_prefix) {
|
|
25897
|
+
var size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;
|
|
25898
|
+
if (opt_file_identifier) {
|
|
25899
|
+
var file_identifier = opt_file_identifier;
|
|
25900
|
+
this.prep(this.minalign, SIZEOF_INT + FILE_IDENTIFIER_LENGTH + size_prefix);
|
|
25901
|
+
if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {
|
|
25902
|
+
throw new TypeError("FlatBuffers: file identifier must be length " + FILE_IDENTIFIER_LENGTH);
|
|
25903
|
+
}
|
|
25904
|
+
for(var i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--){
|
|
25905
|
+
this.writeInt8(file_identifier.charCodeAt(i));
|
|
25906
|
+
}
|
|
25907
|
+
}
|
|
25908
|
+
this.prep(this.minalign, SIZEOF_INT + size_prefix);
|
|
25909
|
+
this.addOffset(root_table);
|
|
25910
|
+
if (size_prefix) {
|
|
25911
|
+
this.addInt32(this.bb.capacity() - this.space);
|
|
25912
|
+
}
|
|
25913
|
+
this.bb.setPosition(this.space);
|
|
25914
|
+
};
|
|
25915
|
+
/**
|
|
25916
|
+
* Finalize a size prefixed buffer, pointing to the given `root_table`.
|
|
25917
|
+
*/ _proto.finishSizePrefixed = function finishSizePrefixed(root_table, opt_file_identifier) {
|
|
25918
|
+
this.finish(root_table, opt_file_identifier, true);
|
|
25919
|
+
};
|
|
25920
|
+
/**
|
|
25921
|
+
* This checks a required field has been set in a given table that has
|
|
25922
|
+
* just been constructed.
|
|
25923
|
+
*/ _proto.requiredField = function requiredField(table, field) {
|
|
25924
|
+
var table_start = this.bb.capacity() - table;
|
|
25925
|
+
var vtable_start = table_start - this.bb.readInt32(table_start);
|
|
25926
|
+
var ok = field < this.bb.readInt16(vtable_start) && this.bb.readInt16(vtable_start + field) != 0;
|
|
25927
|
+
// If this fails, the caller will show what field needs to be set.
|
|
25928
|
+
if (!ok) {
|
|
25929
|
+
throw new TypeError("FlatBuffers: field " + field + " must be set");
|
|
25930
|
+
}
|
|
25931
|
+
};
|
|
25932
|
+
/**
|
|
25933
|
+
* Start a new array/vector of objects. Users usually will not call
|
|
25934
|
+
* this directly. The FlatBuffers compiler will create a start/end
|
|
25935
|
+
* method for vector types in generated code.
|
|
25936
|
+
*
|
|
25937
|
+
* @param elem_size The size of each element in the array
|
|
25938
|
+
* @param num_elems The number of elements in the array
|
|
25939
|
+
* @param alignment The alignment of the array
|
|
25940
|
+
*/ _proto.startVector = function startVector(elem_size, num_elems, alignment) {
|
|
25941
|
+
this.notNested();
|
|
25942
|
+
this.vector_num_elems = num_elems;
|
|
25943
|
+
this.prep(SIZEOF_INT, elem_size * num_elems);
|
|
25944
|
+
this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.
|
|
25945
|
+
};
|
|
25946
|
+
/**
|
|
25947
|
+
* Finish off the creation of an array and all its elements. The array must be
|
|
25948
|
+
* created with `startVector`.
|
|
25949
|
+
*
|
|
25950
|
+
* @returns The offset at which the newly created array
|
|
25951
|
+
* starts.
|
|
25952
|
+
*/ _proto.endVector = function endVector() {
|
|
25953
|
+
this.writeInt32(this.vector_num_elems);
|
|
25954
|
+
return this.offset();
|
|
25955
|
+
};
|
|
25956
|
+
/**
|
|
25957
|
+
* Encode the string `s` in the buffer using UTF-8. If the string passed has
|
|
25958
|
+
* already been seen, we return the offset of the already written string
|
|
25959
|
+
*
|
|
25960
|
+
* @param s The string to encode
|
|
25961
|
+
* @return The offset in the buffer where the encoded string starts
|
|
25962
|
+
*/ _proto.createSharedString = function createSharedString(s) {
|
|
25963
|
+
if (!s) {
|
|
25964
|
+
return 0;
|
|
25965
|
+
}
|
|
25966
|
+
if (!this.string_maps) {
|
|
25967
|
+
this.string_maps = new Map();
|
|
25968
|
+
}
|
|
25969
|
+
if (this.string_maps.has(s)) {
|
|
25970
|
+
return this.string_maps.get(s);
|
|
25971
|
+
}
|
|
25972
|
+
var offset = this.createString(s);
|
|
25973
|
+
this.string_maps.set(s, offset);
|
|
25974
|
+
return offset;
|
|
25975
|
+
};
|
|
25976
|
+
/**
|
|
25977
|
+
* Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed
|
|
25978
|
+
* instead of a string, it is assumed to contain valid UTF-8 encoded data.
|
|
25979
|
+
*
|
|
25980
|
+
* @param s The string to encode
|
|
25981
|
+
* @return The offset in the buffer where the encoded string starts
|
|
25982
|
+
*/ _proto.createString = function createString(s) {
|
|
25983
|
+
if (s === null || s === undefined) {
|
|
25984
|
+
return 0;
|
|
25985
|
+
}
|
|
25986
|
+
var utf8;
|
|
25987
|
+
if (_instanceof1(s, Uint8Array)) {
|
|
25988
|
+
utf8 = s;
|
|
25989
|
+
} else {
|
|
25990
|
+
utf8 = this.text_encoder.encode(s);
|
|
25991
|
+
}
|
|
25992
|
+
this.addInt8(0);
|
|
25993
|
+
this.startVector(1, utf8.length, 1);
|
|
25994
|
+
this.bb.setPosition(this.space -= utf8.length);
|
|
25995
|
+
this.bb.bytes().set(utf8, this.space);
|
|
25996
|
+
return this.endVector();
|
|
25997
|
+
};
|
|
25998
|
+
/**
|
|
25999
|
+
* Create a byte vector.
|
|
26000
|
+
*
|
|
26001
|
+
* @param v The bytes to add
|
|
26002
|
+
* @returns The offset in the buffer where the byte vector starts
|
|
26003
|
+
*/ _proto.createByteVector = function createByteVector(v) {
|
|
26004
|
+
if (v === null || v === undefined) {
|
|
26005
|
+
return 0;
|
|
26006
|
+
}
|
|
26007
|
+
this.startVector(1, v.length, 1);
|
|
26008
|
+
this.bb.setPosition(this.space -= v.length);
|
|
26009
|
+
this.bb.bytes().set(v, this.space);
|
|
26010
|
+
return this.endVector();
|
|
26011
|
+
};
|
|
26012
|
+
/**
|
|
26013
|
+
* A helper function to pack an object
|
|
26014
|
+
*
|
|
26015
|
+
* @returns offset of obj
|
|
26016
|
+
*/ _proto.createObjectOffset = function createObjectOffset(obj) {
|
|
26017
|
+
if (obj === null) {
|
|
26018
|
+
return 0;
|
|
26019
|
+
}
|
|
26020
|
+
if (typeof obj === "string") {
|
|
26021
|
+
return this.createString(obj);
|
|
26022
|
+
} else {
|
|
26023
|
+
return obj.pack(this);
|
|
26024
|
+
}
|
|
26025
|
+
};
|
|
26026
|
+
/**
|
|
26027
|
+
* A helper function to pack a list of object
|
|
26028
|
+
*
|
|
26029
|
+
* @returns list of offsets of each non null object
|
|
26030
|
+
*/ _proto.createObjectOffsetList = function createObjectOffsetList(list) {
|
|
26031
|
+
var ret = [];
|
|
26032
|
+
for(var i = 0; i < list.length; ++i){
|
|
26033
|
+
var val = list[i];
|
|
26034
|
+
if (val !== null) {
|
|
26035
|
+
ret.push(this.createObjectOffset(val));
|
|
26036
|
+
} else {
|
|
26037
|
+
throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.");
|
|
26038
|
+
}
|
|
26039
|
+
}
|
|
26040
|
+
return ret;
|
|
26041
|
+
};
|
|
26042
|
+
_proto.createStructOffsetList = function createStructOffsetList(list, startFunc) {
|
|
26043
|
+
startFunc(this, list.length);
|
|
26044
|
+
this.createObjectOffsetList(list.slice().reverse());
|
|
26045
|
+
return this.endVector();
|
|
26046
|
+
};
|
|
26047
|
+
/**
|
|
26048
|
+
* Doubles the size of the backing ByteBuffer and copies the old data towards
|
|
26049
|
+
* the end of the new buffer (since we build the buffer backwards).
|
|
26050
|
+
*
|
|
26051
|
+
* @param bb The current buffer with the existing data
|
|
26052
|
+
* @returns A new byte buffer with the old data copied
|
|
26053
|
+
* to it. The data is located at the end of the buffer.
|
|
26054
|
+
*
|
|
26055
|
+
* uint8Array.set() formally takes {Array<number>|ArrayBufferView}, so to pass
|
|
26056
|
+
* it a uint8Array we need to suppress the type check:
|
|
26057
|
+
* @suppress {checkTypes}
|
|
26058
|
+
*/ Builder.growByteBuffer = function growByteBuffer(bb) {
|
|
26059
|
+
var old_buf_size = bb.capacity();
|
|
26060
|
+
// Ensure we don't grow beyond what fits in an int.
|
|
26061
|
+
if (old_buf_size & 0xC0000000) {
|
|
26062
|
+
throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");
|
|
26063
|
+
}
|
|
26064
|
+
var new_buf_size = old_buf_size << 1;
|
|
26065
|
+
var nbb = ByteBuffer.allocate(new_buf_size);
|
|
26066
|
+
nbb.setPosition(new_buf_size - old_buf_size);
|
|
26067
|
+
nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);
|
|
26068
|
+
return nbb;
|
|
26069
|
+
};
|
|
26070
|
+
return Builder;
|
|
26071
|
+
}();
|
|
26072
|
+
|
|
26073
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26074
|
+
var FBEffectsObjectData = /*#__PURE__*/ function() {
|
|
26075
|
+
function FBEffectsObjectData() {
|
|
26076
|
+
this.bb = null;
|
|
26077
|
+
this.bb_pos = 0;
|
|
26078
|
+
}
|
|
26079
|
+
var _proto = FBEffectsObjectData.prototype;
|
|
26080
|
+
_proto.__init = function __init(i, bb) {
|
|
26081
|
+
this.bb_pos = i;
|
|
26082
|
+
this.bb = bb;
|
|
26083
|
+
return this;
|
|
26084
|
+
};
|
|
26085
|
+
_proto.dataType = function dataType(optionalEncoding) {
|
|
26086
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26087
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26088
|
+
};
|
|
26089
|
+
_proto.data = function data(index) {
|
|
26090
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26091
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
26092
|
+
};
|
|
26093
|
+
_proto.dataLength = function dataLength() {
|
|
26094
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26095
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26096
|
+
};
|
|
26097
|
+
_proto.dataArray = function dataArray() {
|
|
26098
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26099
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
26100
|
+
};
|
|
26101
|
+
_proto.unpack = function unpack() {
|
|
26102
|
+
return new FBEffectsObjectDataT(this.dataType(), this.bb.createScalarList(this.data.bind(this), this.dataLength()));
|
|
26103
|
+
};
|
|
26104
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26105
|
+
_o.dataType = this.dataType();
|
|
26106
|
+
_o.data = this.bb.createScalarList(this.data.bind(this), this.dataLength());
|
|
26107
|
+
};
|
|
26108
|
+
FBEffectsObjectData.getRootAsFBEffectsObjectData = function getRootAsFBEffectsObjectData(bb, obj) {
|
|
26109
|
+
return (obj || new FBEffectsObjectData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26110
|
+
};
|
|
26111
|
+
FBEffectsObjectData.getSizePrefixedRootAsFBEffectsObjectData = function getSizePrefixedRootAsFBEffectsObjectData(bb, obj) {
|
|
26112
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26113
|
+
return (obj || new FBEffectsObjectData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26114
|
+
};
|
|
26115
|
+
FBEffectsObjectData.startFBEffectsObjectData = function startFBEffectsObjectData(builder) {
|
|
26116
|
+
builder.startObject(2);
|
|
26117
|
+
};
|
|
26118
|
+
FBEffectsObjectData.addDataType = function addDataType(builder, dataTypeOffset) {
|
|
26119
|
+
builder.addFieldOffset(0, dataTypeOffset, 0);
|
|
26120
|
+
};
|
|
26121
|
+
FBEffectsObjectData.addData = function addData(builder, dataOffset) {
|
|
26122
|
+
builder.addFieldOffset(1, dataOffset, 0);
|
|
26123
|
+
};
|
|
26124
|
+
FBEffectsObjectData.createDataVector = function createDataVector(builder, data) {
|
|
26125
|
+
builder.startVector(1, data.length, 1);
|
|
26126
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26127
|
+
builder.addInt8(data[i]);
|
|
26128
|
+
}
|
|
26129
|
+
return builder.endVector();
|
|
26130
|
+
};
|
|
26131
|
+
FBEffectsObjectData.startDataVector = function startDataVector(builder, numElems) {
|
|
26132
|
+
builder.startVector(1, numElems, 1);
|
|
26133
|
+
};
|
|
26134
|
+
FBEffectsObjectData.endFBEffectsObjectData = function endFBEffectsObjectData(builder) {
|
|
26135
|
+
var offset = builder.endObject();
|
|
26136
|
+
return offset;
|
|
26137
|
+
};
|
|
26138
|
+
FBEffectsObjectData.createFBEffectsObjectData = function createFBEffectsObjectData(builder, dataTypeOffset, dataOffset) {
|
|
26139
|
+
FBEffectsObjectData.startFBEffectsObjectData(builder);
|
|
26140
|
+
FBEffectsObjectData.addDataType(builder, dataTypeOffset);
|
|
26141
|
+
FBEffectsObjectData.addData(builder, dataOffset);
|
|
26142
|
+
return FBEffectsObjectData.endFBEffectsObjectData(builder);
|
|
26143
|
+
};
|
|
26144
|
+
return FBEffectsObjectData;
|
|
26145
|
+
}();
|
|
26146
|
+
var FBEffectsObjectDataT = /*#__PURE__*/ function() {
|
|
26147
|
+
function FBEffectsObjectDataT(dataType, data) {
|
|
26148
|
+
if (dataType === void 0) dataType = null;
|
|
26149
|
+
if (data === void 0) data = [];
|
|
26150
|
+
this.dataType = dataType;
|
|
26151
|
+
this.data = data;
|
|
26152
|
+
}
|
|
26153
|
+
var _proto = FBEffectsObjectDataT.prototype;
|
|
26154
|
+
_proto.pack = function pack(builder) {
|
|
26155
|
+
var dataType = this.dataType !== null ? builder.createString(this.dataType) : 0;
|
|
26156
|
+
var data = FBEffectsObjectData.createDataVector(builder, this.data);
|
|
26157
|
+
return FBEffectsObjectData.createFBEffectsObjectData(builder, dataType, data);
|
|
26158
|
+
};
|
|
26159
|
+
return FBEffectsObjectDataT;
|
|
26160
|
+
}();
|
|
26161
|
+
|
|
26162
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26163
|
+
var FBEffectsPackageData = /*#__PURE__*/ function() {
|
|
26164
|
+
function FBEffectsPackageData() {
|
|
26165
|
+
this.bb = null;
|
|
26166
|
+
this.bb_pos = 0;
|
|
26167
|
+
}
|
|
26168
|
+
var _proto = FBEffectsPackageData.prototype;
|
|
26169
|
+
_proto.__init = function __init(i, bb) {
|
|
26170
|
+
this.bb_pos = i;
|
|
26171
|
+
this.bb = bb;
|
|
26172
|
+
return this;
|
|
26173
|
+
};
|
|
26174
|
+
_proto.exportObjects = function exportObjects(index, obj) {
|
|
26175
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26176
|
+
return offset ? (obj || new FBEffectsObjectData()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
26177
|
+
};
|
|
26178
|
+
_proto.exportObjectsLength = function exportObjectsLength() {
|
|
26179
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26180
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26181
|
+
};
|
|
26182
|
+
_proto.unpack = function unpack() {
|
|
26183
|
+
return new FBEffectsPackageDataT(this.bb.createObjList(this.exportObjects.bind(this), this.exportObjectsLength()));
|
|
26184
|
+
};
|
|
26185
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26186
|
+
_o.exportObjects = this.bb.createObjList(this.exportObjects.bind(this), this.exportObjectsLength());
|
|
26187
|
+
};
|
|
26188
|
+
FBEffectsPackageData.getRootAsFBEffectsPackageData = function getRootAsFBEffectsPackageData(bb, obj) {
|
|
26189
|
+
return (obj || new FBEffectsPackageData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26190
|
+
};
|
|
26191
|
+
FBEffectsPackageData.getSizePrefixedRootAsFBEffectsPackageData = function getSizePrefixedRootAsFBEffectsPackageData(bb, obj) {
|
|
26192
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26193
|
+
return (obj || new FBEffectsPackageData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26194
|
+
};
|
|
26195
|
+
FBEffectsPackageData.startFBEffectsPackageData = function startFBEffectsPackageData(builder) {
|
|
26196
|
+
builder.startObject(1);
|
|
26197
|
+
};
|
|
26198
|
+
FBEffectsPackageData.addExportObjects = function addExportObjects(builder, exportObjectsOffset) {
|
|
26199
|
+
builder.addFieldOffset(0, exportObjectsOffset, 0);
|
|
26200
|
+
};
|
|
26201
|
+
FBEffectsPackageData.createExportObjectsVector = function createExportObjectsVector(builder, data) {
|
|
26202
|
+
builder.startVector(4, data.length, 4);
|
|
26203
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26204
|
+
builder.addOffset(data[i]);
|
|
26205
|
+
}
|
|
26206
|
+
return builder.endVector();
|
|
26207
|
+
};
|
|
26208
|
+
FBEffectsPackageData.startExportObjectsVector = function startExportObjectsVector(builder, numElems) {
|
|
26209
|
+
builder.startVector(4, numElems, 4);
|
|
26210
|
+
};
|
|
26211
|
+
FBEffectsPackageData.endFBEffectsPackageData = function endFBEffectsPackageData(builder) {
|
|
26212
|
+
var offset = builder.endObject();
|
|
26213
|
+
return offset;
|
|
26214
|
+
};
|
|
26215
|
+
FBEffectsPackageData.finishFBEffectsPackageDataBuffer = function finishFBEffectsPackageDataBuffer(builder, offset) {
|
|
26216
|
+
builder.finish(offset);
|
|
26217
|
+
};
|
|
26218
|
+
FBEffectsPackageData.finishSizePrefixedFBEffectsPackageDataBuffer = function finishSizePrefixedFBEffectsPackageDataBuffer(builder, offset) {
|
|
26219
|
+
builder.finish(offset, undefined, true);
|
|
26220
|
+
};
|
|
26221
|
+
FBEffectsPackageData.createFBEffectsPackageData = function createFBEffectsPackageData(builder, exportObjectsOffset) {
|
|
26222
|
+
FBEffectsPackageData.startFBEffectsPackageData(builder);
|
|
26223
|
+
FBEffectsPackageData.addExportObjects(builder, exportObjectsOffset);
|
|
26224
|
+
return FBEffectsPackageData.endFBEffectsPackageData(builder);
|
|
26225
|
+
};
|
|
26226
|
+
return FBEffectsPackageData;
|
|
26227
|
+
}();
|
|
26228
|
+
var FBEffectsPackageDataT = /*#__PURE__*/ function() {
|
|
26229
|
+
function FBEffectsPackageDataT(exportObjects) {
|
|
26230
|
+
if (exportObjects === void 0) exportObjects = [];
|
|
26231
|
+
this.exportObjects = exportObjects;
|
|
26232
|
+
}
|
|
26233
|
+
var _proto = FBEffectsPackageDataT.prototype;
|
|
26234
|
+
_proto.pack = function pack(builder) {
|
|
26235
|
+
var exportObjects = FBEffectsPackageData.createExportObjectsVector(builder, builder.createObjectOffsetList(this.exportObjects));
|
|
26236
|
+
return FBEffectsPackageData.createFBEffectsPackageData(builder, exportObjects);
|
|
26237
|
+
};
|
|
26238
|
+
return FBEffectsPackageDataT;
|
|
26239
|
+
}();
|
|
26240
|
+
|
|
26241
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26242
|
+
var FBSubMesh = /*#__PURE__*/ function() {
|
|
26243
|
+
function FBSubMesh() {
|
|
26244
|
+
this.bb = null;
|
|
26245
|
+
this.bb_pos = 0;
|
|
26246
|
+
}
|
|
26247
|
+
var _proto = FBSubMesh.prototype;
|
|
26248
|
+
_proto.__init = function __init(i, bb) {
|
|
26249
|
+
this.bb_pos = i;
|
|
26250
|
+
this.bb = bb;
|
|
26251
|
+
return this;
|
|
26252
|
+
};
|
|
26253
|
+
_proto.offset = function offset() {
|
|
26254
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26255
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26256
|
+
};
|
|
26257
|
+
_proto.indexCount = function indexCount() {
|
|
26258
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26259
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26260
|
+
};
|
|
26261
|
+
_proto.vertexCount = function vertexCount() {
|
|
26262
|
+
var offset = this.bb.__offset(this.bb_pos, 8);
|
|
26263
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26264
|
+
};
|
|
26265
|
+
_proto.unpack = function unpack() {
|
|
26266
|
+
return new FBSubMeshT(this.offset(), this.indexCount(), this.vertexCount());
|
|
26267
|
+
};
|
|
26268
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26269
|
+
_o.offset = this.offset();
|
|
26270
|
+
_o.indexCount = this.indexCount();
|
|
26271
|
+
_o.vertexCount = this.vertexCount();
|
|
26272
|
+
};
|
|
26273
|
+
FBSubMesh.getRootAsFBSubMesh = function getRootAsFBSubMesh(bb, obj) {
|
|
26274
|
+
return (obj || new FBSubMesh()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26275
|
+
};
|
|
26276
|
+
FBSubMesh.getSizePrefixedRootAsFBSubMesh = function getSizePrefixedRootAsFBSubMesh(bb, obj) {
|
|
26277
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26278
|
+
return (obj || new FBSubMesh()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26279
|
+
};
|
|
26280
|
+
FBSubMesh.startFBSubMesh = function startFBSubMesh(builder) {
|
|
26281
|
+
builder.startObject(3);
|
|
26282
|
+
};
|
|
26283
|
+
FBSubMesh.addOffset = function addOffset(builder, offset) {
|
|
26284
|
+
builder.addFieldInt32(0, offset, 0);
|
|
26285
|
+
};
|
|
26286
|
+
FBSubMesh.addIndexCount = function addIndexCount(builder, indexCount) {
|
|
26287
|
+
builder.addFieldInt32(1, indexCount, 0);
|
|
26288
|
+
};
|
|
26289
|
+
FBSubMesh.addVertexCount = function addVertexCount(builder, vertexCount) {
|
|
26290
|
+
builder.addFieldInt32(2, vertexCount, 0);
|
|
26291
|
+
};
|
|
26292
|
+
FBSubMesh.endFBSubMesh = function endFBSubMesh(builder) {
|
|
26293
|
+
var offset = builder.endObject();
|
|
26294
|
+
return offset;
|
|
26295
|
+
};
|
|
26296
|
+
FBSubMesh.createFBSubMesh = function createFBSubMesh(builder, offset, indexCount, vertexCount) {
|
|
26297
|
+
FBSubMesh.startFBSubMesh(builder);
|
|
26298
|
+
FBSubMesh.addOffset(builder, offset);
|
|
26299
|
+
FBSubMesh.addIndexCount(builder, indexCount);
|
|
26300
|
+
FBSubMesh.addVertexCount(builder, vertexCount);
|
|
26301
|
+
return FBSubMesh.endFBSubMesh(builder);
|
|
26302
|
+
};
|
|
26303
|
+
return FBSubMesh;
|
|
26304
|
+
}();
|
|
26305
|
+
var FBSubMeshT = /*#__PURE__*/ function() {
|
|
26306
|
+
function FBSubMeshT(offset, indexCount, vertexCount) {
|
|
26307
|
+
if (offset === void 0) offset = 0;
|
|
26308
|
+
if (indexCount === void 0) indexCount = 0;
|
|
26309
|
+
if (vertexCount === void 0) vertexCount = 0;
|
|
26310
|
+
this.offset = offset;
|
|
26311
|
+
this.indexCount = indexCount;
|
|
26312
|
+
this.vertexCount = vertexCount;
|
|
26313
|
+
}
|
|
26314
|
+
var _proto = FBSubMeshT.prototype;
|
|
26315
|
+
_proto.pack = function pack(builder) {
|
|
26316
|
+
return FBSubMesh.createFBSubMesh(builder, this.offset, this.indexCount, this.vertexCount);
|
|
26317
|
+
};
|
|
26318
|
+
return FBSubMeshT;
|
|
26319
|
+
}();
|
|
26320
|
+
|
|
26321
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26322
|
+
var FBVertexChannel = /*#__PURE__*/ function() {
|
|
26323
|
+
function FBVertexChannel() {
|
|
26324
|
+
this.bb = null;
|
|
26325
|
+
this.bb_pos = 0;
|
|
26326
|
+
}
|
|
26327
|
+
var _proto = FBVertexChannel.prototype;
|
|
26328
|
+
_proto.__init = function __init(i, bb) {
|
|
26329
|
+
this.bb_pos = i;
|
|
26330
|
+
this.bb = bb;
|
|
26331
|
+
return this;
|
|
26332
|
+
};
|
|
26333
|
+
_proto.semantic = function semantic(optionalEncoding) {
|
|
26334
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26335
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26336
|
+
};
|
|
26337
|
+
_proto.offset = function offset() {
|
|
26338
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26339
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26340
|
+
};
|
|
26341
|
+
_proto.format = function format() {
|
|
26342
|
+
var offset = this.bb.__offset(this.bb_pos, 8);
|
|
26343
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26344
|
+
};
|
|
26345
|
+
_proto.dimension = function dimension() {
|
|
26346
|
+
var offset = this.bb.__offset(this.bb_pos, 10);
|
|
26347
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26348
|
+
};
|
|
26349
|
+
_proto.normalize = function normalize() {
|
|
26350
|
+
var offset = this.bb.__offset(this.bb_pos, 12);
|
|
26351
|
+
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
26352
|
+
};
|
|
26353
|
+
_proto.unpack = function unpack() {
|
|
26354
|
+
return new FBVertexChannelT(this.semantic(), this.offset(), this.format(), this.dimension(), this.normalize());
|
|
26355
|
+
};
|
|
26356
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26357
|
+
_o.semantic = this.semantic();
|
|
26358
|
+
_o.offset = this.offset();
|
|
26359
|
+
_o.format = this.format();
|
|
26360
|
+
_o.dimension = this.dimension();
|
|
26361
|
+
_o.normalize = this.normalize();
|
|
26362
|
+
};
|
|
26363
|
+
FBVertexChannel.getRootAsFBVertexChannel = function getRootAsFBVertexChannel(bb, obj) {
|
|
26364
|
+
return (obj || new FBVertexChannel()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26365
|
+
};
|
|
26366
|
+
FBVertexChannel.getSizePrefixedRootAsFBVertexChannel = function getSizePrefixedRootAsFBVertexChannel(bb, obj) {
|
|
26367
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26368
|
+
return (obj || new FBVertexChannel()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26369
|
+
};
|
|
26370
|
+
FBVertexChannel.startFBVertexChannel = function startFBVertexChannel(builder) {
|
|
26371
|
+
builder.startObject(5);
|
|
26372
|
+
};
|
|
26373
|
+
FBVertexChannel.addSemantic = function addSemantic(builder, semanticOffset) {
|
|
26374
|
+
builder.addFieldOffset(0, semanticOffset, 0);
|
|
26375
|
+
};
|
|
26376
|
+
FBVertexChannel.addOffset = function addOffset(builder, offset) {
|
|
26377
|
+
builder.addFieldInt32(1, offset, 0);
|
|
26378
|
+
};
|
|
26379
|
+
FBVertexChannel.addFormat = function addFormat(builder, format) {
|
|
26380
|
+
builder.addFieldInt32(2, format, 0);
|
|
26381
|
+
};
|
|
26382
|
+
FBVertexChannel.addDimension = function addDimension(builder, dimension) {
|
|
26383
|
+
builder.addFieldInt32(3, dimension, 0);
|
|
26384
|
+
};
|
|
26385
|
+
FBVertexChannel.addNormalize = function addNormalize(builder, normalize) {
|
|
26386
|
+
builder.addFieldInt8(4, +normalize, +false);
|
|
26387
|
+
};
|
|
26388
|
+
FBVertexChannel.endFBVertexChannel = function endFBVertexChannel(builder) {
|
|
26389
|
+
var offset = builder.endObject();
|
|
26390
|
+
return offset;
|
|
26391
|
+
};
|
|
26392
|
+
FBVertexChannel.createFBVertexChannel = function createFBVertexChannel(builder, semanticOffset, offset, format, dimension, normalize) {
|
|
26393
|
+
FBVertexChannel.startFBVertexChannel(builder);
|
|
26394
|
+
FBVertexChannel.addSemantic(builder, semanticOffset);
|
|
26395
|
+
FBVertexChannel.addOffset(builder, offset);
|
|
26396
|
+
FBVertexChannel.addFormat(builder, format);
|
|
26397
|
+
FBVertexChannel.addDimension(builder, dimension);
|
|
26398
|
+
FBVertexChannel.addNormalize(builder, normalize);
|
|
26399
|
+
return FBVertexChannel.endFBVertexChannel(builder);
|
|
26400
|
+
};
|
|
26401
|
+
return FBVertexChannel;
|
|
26402
|
+
}();
|
|
26403
|
+
var FBVertexChannelT = /*#__PURE__*/ function() {
|
|
26404
|
+
function FBVertexChannelT(semantic, offset, format, dimension, normalize) {
|
|
26405
|
+
if (semantic === void 0) semantic = null;
|
|
26406
|
+
if (offset === void 0) offset = 0;
|
|
26407
|
+
if (format === void 0) format = 0;
|
|
26408
|
+
if (dimension === void 0) dimension = 0;
|
|
26409
|
+
if (normalize === void 0) normalize = false;
|
|
26410
|
+
this.semantic = semantic;
|
|
26411
|
+
this.offset = offset;
|
|
26412
|
+
this.format = format;
|
|
26413
|
+
this.dimension = dimension;
|
|
26414
|
+
this.normalize = normalize;
|
|
26415
|
+
}
|
|
26416
|
+
var _proto = FBVertexChannelT.prototype;
|
|
26417
|
+
_proto.pack = function pack(builder) {
|
|
26418
|
+
var semantic = this.semantic !== null ? builder.createString(this.semantic) : 0;
|
|
26419
|
+
return FBVertexChannel.createFBVertexChannel(builder, semantic, this.offset, this.format, this.dimension, this.normalize);
|
|
26420
|
+
};
|
|
26421
|
+
return FBVertexChannelT;
|
|
26422
|
+
}();
|
|
26423
|
+
|
|
26424
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26425
|
+
var FBVertexData = /*#__PURE__*/ function() {
|
|
26426
|
+
function FBVertexData() {
|
|
26427
|
+
this.bb = null;
|
|
26428
|
+
this.bb_pos = 0;
|
|
26429
|
+
}
|
|
26430
|
+
var _proto = FBVertexData.prototype;
|
|
26431
|
+
_proto.__init = function __init(i, bb) {
|
|
26432
|
+
this.bb_pos = i;
|
|
26433
|
+
this.bb = bb;
|
|
26434
|
+
return this;
|
|
26435
|
+
};
|
|
26436
|
+
_proto.vertexCount = function vertexCount() {
|
|
26437
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26438
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26439
|
+
};
|
|
26440
|
+
_proto.channels = function channels(index, obj) {
|
|
26441
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26442
|
+
return offset ? (obj || new FBVertexChannel()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
26443
|
+
};
|
|
26444
|
+
_proto.channelsLength = function channelsLength() {
|
|
26445
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26446
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26447
|
+
};
|
|
26448
|
+
_proto.unpack = function unpack() {
|
|
26449
|
+
return new FBVertexDataT(this.vertexCount(), this.bb.createObjList(this.channels.bind(this), this.channelsLength()));
|
|
26450
|
+
};
|
|
26451
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26452
|
+
_o.vertexCount = this.vertexCount();
|
|
26453
|
+
_o.channels = this.bb.createObjList(this.channels.bind(this), this.channelsLength());
|
|
26454
|
+
};
|
|
26455
|
+
FBVertexData.getRootAsFBVertexData = function getRootAsFBVertexData(bb, obj) {
|
|
26456
|
+
return (obj || new FBVertexData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26457
|
+
};
|
|
26458
|
+
FBVertexData.getSizePrefixedRootAsFBVertexData = function getSizePrefixedRootAsFBVertexData(bb, obj) {
|
|
26459
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26460
|
+
return (obj || new FBVertexData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26461
|
+
};
|
|
26462
|
+
FBVertexData.startFBVertexData = function startFBVertexData(builder) {
|
|
26463
|
+
builder.startObject(2);
|
|
26464
|
+
};
|
|
26465
|
+
FBVertexData.addVertexCount = function addVertexCount(builder, vertexCount) {
|
|
26466
|
+
builder.addFieldInt32(0, vertexCount, 0);
|
|
26467
|
+
};
|
|
26468
|
+
FBVertexData.addChannels = function addChannels(builder, channelsOffset) {
|
|
26469
|
+
builder.addFieldOffset(1, channelsOffset, 0);
|
|
26470
|
+
};
|
|
26471
|
+
FBVertexData.createChannelsVector = function createChannelsVector(builder, data) {
|
|
26472
|
+
builder.startVector(4, data.length, 4);
|
|
26473
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26474
|
+
builder.addOffset(data[i]);
|
|
26475
|
+
}
|
|
26476
|
+
return builder.endVector();
|
|
26477
|
+
};
|
|
26478
|
+
FBVertexData.startChannelsVector = function startChannelsVector(builder, numElems) {
|
|
26479
|
+
builder.startVector(4, numElems, 4);
|
|
26480
|
+
};
|
|
26481
|
+
FBVertexData.endFBVertexData = function endFBVertexData(builder) {
|
|
26482
|
+
var offset = builder.endObject();
|
|
26483
|
+
return offset;
|
|
26484
|
+
};
|
|
26485
|
+
FBVertexData.createFBVertexData = function createFBVertexData(builder, vertexCount, channelsOffset) {
|
|
26486
|
+
FBVertexData.startFBVertexData(builder);
|
|
26487
|
+
FBVertexData.addVertexCount(builder, vertexCount);
|
|
26488
|
+
FBVertexData.addChannels(builder, channelsOffset);
|
|
26489
|
+
return FBVertexData.endFBVertexData(builder);
|
|
26490
|
+
};
|
|
26491
|
+
return FBVertexData;
|
|
26492
|
+
}();
|
|
26493
|
+
var FBVertexDataT = /*#__PURE__*/ function() {
|
|
26494
|
+
function FBVertexDataT(vertexCount, channels) {
|
|
26495
|
+
if (vertexCount === void 0) vertexCount = 0;
|
|
26496
|
+
if (channels === void 0) channels = [];
|
|
26497
|
+
this.vertexCount = vertexCount;
|
|
26498
|
+
this.channels = channels;
|
|
26499
|
+
}
|
|
26500
|
+
var _proto = FBVertexDataT.prototype;
|
|
26501
|
+
_proto.pack = function pack(builder) {
|
|
26502
|
+
var channels = FBVertexData.createChannelsVector(builder, builder.createObjectOffsetList(this.channels));
|
|
26503
|
+
return FBVertexData.createFBVertexData(builder, this.vertexCount, channels);
|
|
26504
|
+
};
|
|
26505
|
+
return FBVertexDataT;
|
|
26506
|
+
}();
|
|
26507
|
+
|
|
26508
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
26509
|
+
var FBGeometryData = /*#__PURE__*/ function() {
|
|
26510
|
+
function FBGeometryData() {
|
|
26511
|
+
this.bb = null;
|
|
26512
|
+
this.bb_pos = 0;
|
|
26513
|
+
}
|
|
26514
|
+
var _proto = FBGeometryData.prototype;
|
|
26515
|
+
_proto.__init = function __init(i, bb) {
|
|
26516
|
+
this.bb_pos = i;
|
|
26517
|
+
this.bb = bb;
|
|
26518
|
+
return this;
|
|
26519
|
+
};
|
|
26520
|
+
_proto.id = function id(optionalEncoding) {
|
|
26521
|
+
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
26522
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26523
|
+
};
|
|
26524
|
+
_proto.name = function name(optionalEncoding) {
|
|
26525
|
+
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
26526
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26527
|
+
};
|
|
26528
|
+
_proto.vertexData = function vertexData(obj) {
|
|
26529
|
+
var offset = this.bb.__offset(this.bb_pos, 8);
|
|
26530
|
+
return offset ? (obj || new FBVertexData()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
26531
|
+
};
|
|
26532
|
+
_proto.indexFormat = function indexFormat() {
|
|
26533
|
+
var offset = this.bb.__offset(this.bb_pos, 10);
|
|
26534
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26535
|
+
};
|
|
26536
|
+
_proto.indexOffset = function indexOffset() {
|
|
26537
|
+
var offset = this.bb.__offset(this.bb_pos, 12);
|
|
26538
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26539
|
+
};
|
|
26540
|
+
_proto.subMeshes = function subMeshes(index, obj) {
|
|
26541
|
+
var offset = this.bb.__offset(this.bb_pos, 14);
|
|
26542
|
+
return offset ? (obj || new FBSubMesh()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
26543
|
+
};
|
|
26544
|
+
_proto.subMeshesLength = function subMeshesLength() {
|
|
26545
|
+
var offset = this.bb.__offset(this.bb_pos, 14);
|
|
26546
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26547
|
+
};
|
|
26548
|
+
_proto.mode = function mode() {
|
|
26549
|
+
var offset = this.bb.__offset(this.bb_pos, 16);
|
|
26550
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
26551
|
+
};
|
|
26552
|
+
_proto.buffer = function buffer(optionalEncoding) {
|
|
26553
|
+
var offset = this.bb.__offset(this.bb_pos, 18);
|
|
26554
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26555
|
+
};
|
|
26556
|
+
_proto.binaryData = function binaryData(index) {
|
|
26557
|
+
var offset = this.bb.__offset(this.bb_pos, 20);
|
|
26558
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
26559
|
+
};
|
|
26560
|
+
_proto.binaryDataLength = function binaryDataLength() {
|
|
26561
|
+
var offset = this.bb.__offset(this.bb_pos, 20);
|
|
26562
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26563
|
+
};
|
|
26564
|
+
_proto.binaryDataArray = function binaryDataArray() {
|
|
26565
|
+
var offset = this.bb.__offset(this.bb_pos, 20);
|
|
26566
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
26567
|
+
};
|
|
26568
|
+
_proto.boneNames = function boneNames(index, optionalEncoding) {
|
|
26569
|
+
var offset = this.bb.__offset(this.bb_pos, 22);
|
|
26570
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
26571
|
+
};
|
|
26572
|
+
_proto.boneNamesLength = function boneNamesLength() {
|
|
26573
|
+
var offset = this.bb.__offset(this.bb_pos, 22);
|
|
26574
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26575
|
+
};
|
|
26576
|
+
_proto.rootBoneName = function rootBoneName(optionalEncoding) {
|
|
26577
|
+
var offset = this.bb.__offset(this.bb_pos, 24);
|
|
26578
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26579
|
+
};
|
|
26580
|
+
_proto.inverseBindMatrices = function inverseBindMatrices(index) {
|
|
26581
|
+
var offset = this.bb.__offset(this.bb_pos, 26);
|
|
26582
|
+
return offset ? this.bb.readFloat32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;
|
|
26583
|
+
};
|
|
26584
|
+
_proto.inverseBindMatricesLength = function inverseBindMatricesLength() {
|
|
26585
|
+
var offset = this.bb.__offset(this.bb_pos, 26);
|
|
26586
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
26587
|
+
};
|
|
26588
|
+
_proto.inverseBindMatricesArray = function inverseBindMatricesArray() {
|
|
26589
|
+
var offset = this.bb.__offset(this.bb_pos, 26);
|
|
26590
|
+
return offset ? new Float32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
26591
|
+
};
|
|
26592
|
+
_proto.unpack = function unpack() {
|
|
26593
|
+
return new FBGeometryDataT(this.id(), this.name(), this.vertexData() !== null ? this.vertexData().unpack() : null, this.indexFormat(), this.indexOffset(), this.bb.createObjList(this.subMeshes.bind(this), this.subMeshesLength()), this.mode(), this.buffer(), this.bb.createScalarList(this.binaryData.bind(this), this.binaryDataLength()), this.bb.createScalarList(this.boneNames.bind(this), this.boneNamesLength()), this.rootBoneName(), this.bb.createScalarList(this.inverseBindMatrices.bind(this), this.inverseBindMatricesLength()));
|
|
26594
|
+
};
|
|
26595
|
+
_proto.unpackTo = function unpackTo(_o) {
|
|
26596
|
+
_o.id = this.id();
|
|
26597
|
+
_o.name = this.name();
|
|
26598
|
+
_o.vertexData = this.vertexData() !== null ? this.vertexData().unpack() : null;
|
|
26599
|
+
_o.indexFormat = this.indexFormat();
|
|
26600
|
+
_o.indexOffset = this.indexOffset();
|
|
26601
|
+
_o.subMeshes = this.bb.createObjList(this.subMeshes.bind(this), this.subMeshesLength());
|
|
26602
|
+
_o.mode = this.mode();
|
|
26603
|
+
_o.buffer = this.buffer();
|
|
26604
|
+
_o.binaryData = this.bb.createScalarList(this.binaryData.bind(this), this.binaryDataLength());
|
|
26605
|
+
_o.boneNames = this.bb.createScalarList(this.boneNames.bind(this), this.boneNamesLength());
|
|
26606
|
+
_o.rootBoneName = this.rootBoneName();
|
|
26607
|
+
_o.inverseBindMatrices = this.bb.createScalarList(this.inverseBindMatrices.bind(this), this.inverseBindMatricesLength());
|
|
26608
|
+
};
|
|
26609
|
+
FBGeometryData.getRootAsFBGeometryData = function getRootAsFBGeometryData(bb, obj) {
|
|
26610
|
+
return (obj || new FBGeometryData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26611
|
+
};
|
|
26612
|
+
FBGeometryData.getSizePrefixedRootAsFBGeometryData = function getSizePrefixedRootAsFBGeometryData(bb, obj) {
|
|
26613
|
+
bb.setPosition(bb.position() + SIZE_PREFIX_LENGTH);
|
|
26614
|
+
return (obj || new FBGeometryData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26615
|
+
};
|
|
26616
|
+
FBGeometryData.startFBGeometryData = function startFBGeometryData(builder) {
|
|
26617
|
+
builder.startObject(12);
|
|
26618
|
+
};
|
|
26619
|
+
FBGeometryData.addId = function addId(builder, idOffset) {
|
|
26620
|
+
builder.addFieldOffset(0, idOffset, 0);
|
|
26621
|
+
};
|
|
26622
|
+
FBGeometryData.addName = function addName(builder, nameOffset) {
|
|
26623
|
+
builder.addFieldOffset(1, nameOffset, 0);
|
|
26624
|
+
};
|
|
26625
|
+
FBGeometryData.addVertexData = function addVertexData(builder, vertexDataOffset) {
|
|
26626
|
+
builder.addFieldOffset(2, vertexDataOffset, 0);
|
|
26627
|
+
};
|
|
26628
|
+
FBGeometryData.addIndexFormat = function addIndexFormat(builder, indexFormat) {
|
|
26629
|
+
builder.addFieldInt32(3, indexFormat, 0);
|
|
26630
|
+
};
|
|
26631
|
+
FBGeometryData.addIndexOffset = function addIndexOffset(builder, indexOffset) {
|
|
26632
|
+
builder.addFieldInt32(4, indexOffset, 0);
|
|
26633
|
+
};
|
|
26634
|
+
FBGeometryData.addSubMeshes = function addSubMeshes(builder, subMeshesOffset) {
|
|
26635
|
+
builder.addFieldOffset(5, subMeshesOffset, 0);
|
|
26636
|
+
};
|
|
26637
|
+
FBGeometryData.createSubMeshesVector = function createSubMeshesVector(builder, data) {
|
|
26638
|
+
builder.startVector(4, data.length, 4);
|
|
26639
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26640
|
+
builder.addOffset(data[i]);
|
|
26641
|
+
}
|
|
26642
|
+
return builder.endVector();
|
|
26643
|
+
};
|
|
26644
|
+
FBGeometryData.startSubMeshesVector = function startSubMeshesVector(builder, numElems) {
|
|
26645
|
+
builder.startVector(4, numElems, 4);
|
|
26646
|
+
};
|
|
26647
|
+
FBGeometryData.addMode = function addMode(builder, mode) {
|
|
26648
|
+
builder.addFieldInt32(6, mode, 0);
|
|
26649
|
+
};
|
|
26650
|
+
FBGeometryData.addBuffer = function addBuffer(builder, bufferOffset) {
|
|
26651
|
+
builder.addFieldOffset(7, bufferOffset, 0);
|
|
26652
|
+
};
|
|
26653
|
+
FBGeometryData.addBinaryData = function addBinaryData(builder, binaryDataOffset) {
|
|
26654
|
+
builder.addFieldOffset(8, binaryDataOffset, 0);
|
|
26655
|
+
};
|
|
26656
|
+
FBGeometryData.createBinaryDataVector = function createBinaryDataVector(builder, data) {
|
|
26657
|
+
builder.startVector(1, data.length, 1);
|
|
26658
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26659
|
+
builder.addInt8(data[i]);
|
|
26660
|
+
}
|
|
26661
|
+
return builder.endVector();
|
|
26662
|
+
};
|
|
26663
|
+
FBGeometryData.startBinaryDataVector = function startBinaryDataVector(builder, numElems) {
|
|
26664
|
+
builder.startVector(1, numElems, 1);
|
|
26665
|
+
};
|
|
26666
|
+
FBGeometryData.addBoneNames = function addBoneNames(builder, boneNamesOffset) {
|
|
26667
|
+
builder.addFieldOffset(9, boneNamesOffset, 0);
|
|
26668
|
+
};
|
|
26669
|
+
FBGeometryData.createBoneNamesVector = function createBoneNamesVector(builder, data) {
|
|
26670
|
+
builder.startVector(4, data.length, 4);
|
|
26671
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26672
|
+
builder.addOffset(data[i]);
|
|
26673
|
+
}
|
|
26674
|
+
return builder.endVector();
|
|
26675
|
+
};
|
|
26676
|
+
FBGeometryData.startBoneNamesVector = function startBoneNamesVector(builder, numElems) {
|
|
26677
|
+
builder.startVector(4, numElems, 4);
|
|
26678
|
+
};
|
|
26679
|
+
FBGeometryData.addRootBoneName = function addRootBoneName(builder, rootBoneNameOffset) {
|
|
26680
|
+
builder.addFieldOffset(10, rootBoneNameOffset, 0);
|
|
26681
|
+
};
|
|
26682
|
+
FBGeometryData.addInverseBindMatrices = function addInverseBindMatrices(builder, inverseBindMatricesOffset) {
|
|
26683
|
+
builder.addFieldOffset(11, inverseBindMatricesOffset, 0);
|
|
26684
|
+
};
|
|
26685
|
+
FBGeometryData.createInverseBindMatricesVector = function createInverseBindMatricesVector(builder, data) {
|
|
26686
|
+
builder.startVector(4, data.length, 4);
|
|
26687
|
+
for(var i = data.length - 1; i >= 0; i--){
|
|
26688
|
+
builder.addFloat32(data[i]);
|
|
26689
|
+
}
|
|
26690
|
+
return builder.endVector();
|
|
26691
|
+
};
|
|
26692
|
+
FBGeometryData.startInverseBindMatricesVector = function startInverseBindMatricesVector(builder, numElems) {
|
|
26693
|
+
builder.startVector(4, numElems, 4);
|
|
26694
|
+
};
|
|
26695
|
+
FBGeometryData.endFBGeometryData = function endFBGeometryData(builder) {
|
|
26696
|
+
var offset = builder.endObject();
|
|
26697
|
+
return offset;
|
|
26698
|
+
};
|
|
26699
|
+
return FBGeometryData;
|
|
26700
|
+
}();
|
|
26701
|
+
var FBGeometryDataT = /*#__PURE__*/ function() {
|
|
26702
|
+
function FBGeometryDataT(id, name, vertexData, indexFormat, indexOffset, subMeshes, mode, buffer, binaryData, boneNames, rootBoneName, inverseBindMatrices) {
|
|
26703
|
+
if (id === void 0) id = null;
|
|
26704
|
+
if (name === void 0) name = null;
|
|
26705
|
+
if (vertexData === void 0) vertexData = null;
|
|
26706
|
+
if (indexFormat === void 0) indexFormat = 0;
|
|
26707
|
+
if (indexOffset === void 0) indexOffset = 0;
|
|
26708
|
+
if (subMeshes === void 0) subMeshes = [];
|
|
26709
|
+
if (mode === void 0) mode = 0;
|
|
26710
|
+
if (buffer === void 0) buffer = null;
|
|
26711
|
+
if (binaryData === void 0) binaryData = [];
|
|
26712
|
+
if (boneNames === void 0) boneNames = [];
|
|
26713
|
+
if (rootBoneName === void 0) rootBoneName = null;
|
|
26714
|
+
if (inverseBindMatrices === void 0) inverseBindMatrices = [];
|
|
26715
|
+
this.id = id;
|
|
26716
|
+
this.name = name;
|
|
26717
|
+
this.vertexData = vertexData;
|
|
26718
|
+
this.indexFormat = indexFormat;
|
|
26719
|
+
this.indexOffset = indexOffset;
|
|
26720
|
+
this.subMeshes = subMeshes;
|
|
26721
|
+
this.mode = mode;
|
|
26722
|
+
this.buffer = buffer;
|
|
26723
|
+
this.binaryData = binaryData;
|
|
26724
|
+
this.boneNames = boneNames;
|
|
26725
|
+
this.rootBoneName = rootBoneName;
|
|
26726
|
+
this.inverseBindMatrices = inverseBindMatrices;
|
|
26727
|
+
}
|
|
26728
|
+
var _proto = FBGeometryDataT.prototype;
|
|
26729
|
+
_proto.pack = function pack(builder) {
|
|
26730
|
+
var id = this.id !== null ? builder.createString(this.id) : 0;
|
|
26731
|
+
var name = this.name !== null ? builder.createString(this.name) : 0;
|
|
26732
|
+
var vertexData = this.vertexData !== null ? this.vertexData.pack(builder) : 0;
|
|
26733
|
+
var subMeshes = FBGeometryData.createSubMeshesVector(builder, builder.createObjectOffsetList(this.subMeshes));
|
|
26734
|
+
var buffer = this.buffer !== null ? builder.createString(this.buffer) : 0;
|
|
26735
|
+
var binaryData = FBGeometryData.createBinaryDataVector(builder, this.binaryData);
|
|
26736
|
+
var boneNames = FBGeometryData.createBoneNamesVector(builder, builder.createObjectOffsetList(this.boneNames));
|
|
26737
|
+
var rootBoneName = this.rootBoneName !== null ? builder.createString(this.rootBoneName) : 0;
|
|
26738
|
+
var inverseBindMatrices = FBGeometryData.createInverseBindMatricesVector(builder, this.inverseBindMatrices);
|
|
26739
|
+
FBGeometryData.startFBGeometryData(builder);
|
|
26740
|
+
FBGeometryData.addId(builder, id);
|
|
26741
|
+
FBGeometryData.addName(builder, name);
|
|
26742
|
+
FBGeometryData.addVertexData(builder, vertexData);
|
|
26743
|
+
FBGeometryData.addIndexFormat(builder, this.indexFormat);
|
|
26744
|
+
FBGeometryData.addIndexOffset(builder, this.indexOffset);
|
|
26745
|
+
FBGeometryData.addSubMeshes(builder, subMeshes);
|
|
26746
|
+
FBGeometryData.addMode(builder, this.mode);
|
|
26747
|
+
FBGeometryData.addBuffer(builder, buffer);
|
|
26748
|
+
FBGeometryData.addBinaryData(builder, binaryData);
|
|
26749
|
+
FBGeometryData.addBoneNames(builder, boneNames);
|
|
26750
|
+
FBGeometryData.addRootBoneName(builder, rootBoneName);
|
|
26751
|
+
FBGeometryData.addInverseBindMatrices(builder, inverseBindMatrices);
|
|
26752
|
+
return FBGeometryData.endFBGeometryData(builder);
|
|
26753
|
+
};
|
|
26754
|
+
return FBGeometryDataT;
|
|
26755
|
+
}();
|
|
26756
|
+
|
|
26757
|
+
var EffectsPackage = /*#__PURE__*/ function() {
|
|
26758
|
+
function EffectsPackage() {
|
|
26759
|
+
this.exportObjectDatas = [];
|
|
26760
|
+
}
|
|
26761
|
+
var _proto = EffectsPackage.prototype;
|
|
26762
|
+
_proto.addData = function addData(effectsObjectData) {
|
|
26763
|
+
this.exportObjectDatas.push(effectsObjectData);
|
|
26764
|
+
};
|
|
26765
|
+
_proto.serializeToBinary = function serializeToBinary() {
|
|
26766
|
+
var fbb = new Builder(1);
|
|
26767
|
+
var effectsPackage = new FBEffectsPackageDataT();
|
|
26768
|
+
var exportObjects = [];
|
|
26769
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.exportObjectDatas), _step; !(_step = _iterator()).done;){
|
|
26770
|
+
var effectsObjectData = _step.value;
|
|
26771
|
+
var fbEffectsObjectData = void 0;
|
|
26772
|
+
if (effectsObjectData.dataType === DataType.Geometry) {
|
|
26773
|
+
fbEffectsObjectData = new FBEffectsObjectDataT("Geometry", this.geometryDataToBinary(effectsObjectData));
|
|
26774
|
+
}
|
|
26775
|
+
if (!fbEffectsObjectData) {
|
|
26776
|
+
continue;
|
|
26777
|
+
}
|
|
26778
|
+
exportObjects.push(fbEffectsObjectData);
|
|
26779
|
+
}
|
|
26780
|
+
effectsPackage.exportObjects = exportObjects;
|
|
26781
|
+
FBEffectsPackageData.finishFBEffectsPackageDataBuffer(fbb, effectsPackage.pack(fbb));
|
|
26782
|
+
var buffer = fbb.asUint8Array(); // Of type `Uint8Array`.
|
|
26783
|
+
return buffer;
|
|
26784
|
+
};
|
|
26785
|
+
_proto.deserializeFromBinary = function deserializeFromBinary(buffer) {
|
|
26786
|
+
var buf = new ByteBuffer(buffer);
|
|
26787
|
+
var fbEffectsPackage = FBEffectsPackageData.getRootAsFBEffectsPackageData(buf);
|
|
26788
|
+
for(var i = 0; i < fbEffectsPackage.exportObjectsLength(); i++){
|
|
26789
|
+
var fbEffectsObjectData = fbEffectsPackage.exportObjects(i);
|
|
26790
|
+
if (!fbEffectsObjectData) {
|
|
26791
|
+
continue;
|
|
26792
|
+
}
|
|
26793
|
+
var dataBuffer = fbEffectsObjectData.dataArray();
|
|
26794
|
+
var dataType = fbEffectsObjectData.dataType();
|
|
26795
|
+
if (!dataBuffer) {
|
|
26796
|
+
continue;
|
|
26797
|
+
}
|
|
26798
|
+
var effectsObjectData = void 0;
|
|
26799
|
+
if (dataType === DataType.Geometry) {
|
|
26800
|
+
effectsObjectData = this.binaryToGeometryData(dataBuffer);
|
|
26801
|
+
}
|
|
26802
|
+
if (!effectsObjectData) {
|
|
26803
|
+
continue;
|
|
26804
|
+
}
|
|
26805
|
+
this.exportObjectDatas.push(effectsObjectData);
|
|
26806
|
+
}
|
|
26807
|
+
};
|
|
26808
|
+
_proto.geometryDataToBinary = function geometryDataToBinary(geometryData) {
|
|
26809
|
+
var fbb = new Builder(1);
|
|
26810
|
+
var fbGeometryData = new FBGeometryDataT();
|
|
26811
|
+
fbGeometryData.indexFormat = geometryData.indexFormat;
|
|
26812
|
+
fbGeometryData.indexOffset = geometryData.indexOffset;
|
|
26813
|
+
fbGeometryData.mode = geometryData.mode;
|
|
26814
|
+
fbGeometryData.id = geometryData.id;
|
|
26815
|
+
var _geometryData_boneNames;
|
|
26816
|
+
fbGeometryData.boneNames = (_geometryData_boneNames = geometryData.boneNames) != null ? _geometryData_boneNames : [];
|
|
26817
|
+
var _geometryData_rootBoneName;
|
|
26818
|
+
fbGeometryData.rootBoneName = (_geometryData_rootBoneName = geometryData.rootBoneName) != null ? _geometryData_rootBoneName : "";
|
|
26819
|
+
var _geometryData_inverseBindMatrices;
|
|
26820
|
+
fbGeometryData.inverseBindMatrices = (_geometryData_inverseBindMatrices = geometryData.inverseBindMatrices) != null ? _geometryData_inverseBindMatrices : [];
|
|
26821
|
+
var _geometryData_binaryData;
|
|
26822
|
+
fbGeometryData.binaryData = (_geometryData_binaryData = geometryData.binaryData) != null ? _geometryData_binaryData : [];
|
|
26823
|
+
var fbVertexdata = new FBVertexDataT();
|
|
26824
|
+
fbVertexdata.vertexCount = geometryData.vertexData.vertexCount;
|
|
26825
|
+
fbVertexdata.channels = [];
|
|
26826
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(geometryData.vertexData.channels), _step; !(_step = _iterator()).done;){
|
|
26827
|
+
var channel = _step.value;
|
|
26828
|
+
var fbChannel = new FBVertexChannelT(channel.semantic, channel.offset, channel.format, channel.dimension, channel.normalize);
|
|
26829
|
+
fbVertexdata.channels.push(fbChannel);
|
|
26830
|
+
}
|
|
26831
|
+
fbGeometryData.vertexData = fbVertexdata;
|
|
26832
|
+
var fbSubMeshes = [];
|
|
26833
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(geometryData.subMeshes), _step1; !(_step1 = _iterator1()).done;){
|
|
26834
|
+
var subMesh = _step1.value;
|
|
26835
|
+
var fbSubMesh = new FBSubMeshT(subMesh.offset, subMesh.indexCount, subMesh.vertexCount);
|
|
26836
|
+
fbSubMeshes.push(fbSubMesh);
|
|
26837
|
+
}
|
|
26838
|
+
fbGeometryData.subMeshes = fbSubMeshes;
|
|
26839
|
+
FBEffectsPackageData.finishFBEffectsPackageDataBuffer(fbb, fbGeometryData.pack(fbb));
|
|
26840
|
+
var buffer = fbb.asUint8Array(); // Of type `Uint8Array`.
|
|
26841
|
+
return buffer;
|
|
26842
|
+
};
|
|
26843
|
+
_proto.binaryToGeometryData = function binaryToGeometryData(buffer) {
|
|
26844
|
+
var buf = new ByteBuffer(buffer);
|
|
26845
|
+
var fbGeometryData = FBGeometryData.getRootAsFBGeometryData(buf);
|
|
26846
|
+
var vertexData = {
|
|
26847
|
+
vertexCount: 0,
|
|
26848
|
+
channels: []
|
|
26849
|
+
};
|
|
26850
|
+
var fbVertexData = fbGeometryData.vertexData();
|
|
26851
|
+
if (fbVertexData) {
|
|
26852
|
+
vertexData.vertexCount = fbVertexData.vertexCount();
|
|
26853
|
+
for(var i = 0; i < fbVertexData.channelsLength(); i++){
|
|
26854
|
+
var channel = fbVertexData.channels(i);
|
|
26855
|
+
if (!channel) {
|
|
26856
|
+
continue;
|
|
26857
|
+
}
|
|
26858
|
+
var _channel_semantic;
|
|
26859
|
+
var vertexChannel = {
|
|
26860
|
+
semantic: (_channel_semantic = channel.semantic()) != null ? _channel_semantic : "",
|
|
26861
|
+
offset: channel.offset(),
|
|
26862
|
+
format: channel.format(),
|
|
26863
|
+
dimension: channel.dimension()
|
|
26864
|
+
};
|
|
26865
|
+
vertexData.channels.push(vertexChannel);
|
|
26866
|
+
}
|
|
26867
|
+
}
|
|
26868
|
+
var subMeshes = [];
|
|
26869
|
+
for(var i1 = 0; i1 < fbGeometryData.subMeshesLength(); i1++){
|
|
26870
|
+
var fbSubMesh = fbGeometryData.subMeshes(i1);
|
|
26871
|
+
if (!fbSubMesh) {
|
|
26872
|
+
continue;
|
|
26873
|
+
}
|
|
26874
|
+
var subMesh = {
|
|
26875
|
+
offset: fbSubMesh.offset(),
|
|
26876
|
+
vertexCount: fbSubMesh.vertexCount()
|
|
26877
|
+
};
|
|
26878
|
+
subMeshes.push(subMesh);
|
|
26879
|
+
}
|
|
26880
|
+
var boneNames = [];
|
|
26881
|
+
for(var i2 = 0; i2 < fbGeometryData.boneNamesLength(); i2++){
|
|
26882
|
+
var boneName = fbGeometryData.boneNames(i2);
|
|
26883
|
+
boneNames.push(boneName);
|
|
26884
|
+
}
|
|
26885
|
+
var inverseBindMatricesArray = fbGeometryData.inverseBindMatricesArray();
|
|
26886
|
+
var _fbGeometryData_buffer, _fbGeometryData_rootBoneName, _fbGeometryData_binaryDataArray, _fbGeometryData_id;
|
|
26887
|
+
var geometryData = {
|
|
26888
|
+
vertexData: vertexData,
|
|
26889
|
+
indexFormat: fbGeometryData.indexFormat(),
|
|
26890
|
+
indexOffset: fbGeometryData.indexOffset(),
|
|
26891
|
+
subMeshes: subMeshes,
|
|
26892
|
+
mode: fbGeometryData.mode(),
|
|
26893
|
+
buffer: (_fbGeometryData_buffer = fbGeometryData.buffer()) != null ? _fbGeometryData_buffer : "",
|
|
26894
|
+
boneNames: boneNames,
|
|
26895
|
+
rootBoneName: (_fbGeometryData_rootBoneName = fbGeometryData.rootBoneName()) != null ? _fbGeometryData_rootBoneName : "",
|
|
26896
|
+
inverseBindMatrices: inverseBindMatricesArray ? Array.from(inverseBindMatricesArray) : undefined,
|
|
26897
|
+
binaryData: (_fbGeometryData_binaryDataArray = fbGeometryData.binaryDataArray()) != null ? _fbGeometryData_binaryDataArray : undefined,
|
|
26898
|
+
id: (_fbGeometryData_id = fbGeometryData.id()) != null ? _fbGeometryData_id : "",
|
|
26899
|
+
dataType: DataType.Geometry
|
|
26900
|
+
};
|
|
26901
|
+
return geometryData;
|
|
26902
|
+
};
|
|
26903
|
+
return EffectsPackage;
|
|
26904
|
+
}();
|
|
26905
|
+
|
|
25322
26906
|
/**
|
|
25323
26907
|
* Engine 基类,负责维护所有 GPU 资源的管理及销毁
|
|
25324
26908
|
*/ var Engine = /*#__PURE__*/ function() {
|
|
@@ -25392,16 +26976,23 @@ var listOrder = 0;
|
|
|
25392
26976
|
for(var i = 0; i < bins.length; i++){
|
|
25393
26977
|
var binaryData = bins[i];
|
|
25394
26978
|
var binaryBuffer = scene.bins[i];
|
|
25395
|
-
|
|
25396
|
-
binaryData.buffer = binaryBuffer;
|
|
25397
|
-
//@ts-expect-error
|
|
25398
|
-
if (binaryData.id) {
|
|
26979
|
+
if (binaryData.dataType === DataType.BinaryAsset) {
|
|
25399
26980
|
//@ts-expect-error
|
|
25400
|
-
|
|
26981
|
+
binaryData.buffer = binaryBuffer;
|
|
26982
|
+
if (binaryData.id) {
|
|
26983
|
+
this.addEffectsObjectData(binaryData);
|
|
26984
|
+
}
|
|
26985
|
+
} else {
|
|
26986
|
+
var effectsPackage = new EffectsPackage();
|
|
26987
|
+
effectsPackage.deserializeFromBinary(new Uint8Array(binaryBuffer));
|
|
26988
|
+
for(var _iterator7 = _create_for_of_iterator_helper_loose(effectsPackage.exportObjectDatas), _step7; !(_step7 = _iterator7()).done;){
|
|
26989
|
+
var effectsObjectData = _step7.value;
|
|
26990
|
+
this.addEffectsObjectData(effectsObjectData);
|
|
26991
|
+
}
|
|
25401
26992
|
}
|
|
25402
26993
|
}
|
|
25403
|
-
for(var
|
|
25404
|
-
var textureData =
|
|
26994
|
+
for(var _iterator8 = _create_for_of_iterator_helper_loose(textureOptions), _step8; !(_step8 = _iterator8()).done;){
|
|
26995
|
+
var textureData = _step8.value;
|
|
25405
26996
|
this.addEffectsObjectData(textureData);
|
|
25406
26997
|
}
|
|
25407
26998
|
};
|
|
@@ -25711,8 +27302,8 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
25711
27302
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
25712
27303
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
25713
27304
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
25714
|
-
var version = "2.0.0-alpha.
|
|
27305
|
+
var version = "2.0.0-alpha.27";
|
|
25715
27306
|
logger.info("Core version: " + version + ".");
|
|
25716
27307
|
|
|
25717
|
-
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, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, 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, 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, setSpriteMeshMaxItemCountByGPU, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
27308
|
+
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, EffectsPackage, 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, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, 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, 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, setSpriteMeshMaxItemCountByGPU, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
25718
27309
|
//# sourceMappingURL=index.mjs.map
|