@galacean/engine-loader 1.1.0-alpha.3 → 1.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -40,56 +40,61 @@ function _inherits(subClass, superClass) {
40
40
  if (superClass) _set_prototype_of(subClass, superClass);
41
41
  }
42
42
 
43
- /******************************************************************************
44
- Copyright (c) Microsoft Corporation.
45
-
46
- Permission to use, copy, modify, and/or distribute this software for any
47
- purpose with or without fee is hereby granted.
48
-
49
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
- PERFORMANCE OF THIS SOFTWARE.
56
- ***************************************************************************** */
57
-
58
- function __decorate(decorators, target, key, desc) {
59
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
60
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
61
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62
- return c > 3 && r && Object.defineProperty(target, key, r), r;
63
- }
64
-
65
- function __generator(thisArg, body) {
66
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
68
- function verb(n) { return function (v) { return step([n, v]); }; }
69
- function step(op) {
70
- if (f) throw new TypeError("Generator is already executing.");
71
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
72
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
73
- if (y = 0, t) op = [op[0] & 2, t.value];
74
- switch (op[0]) {
75
- case 0: case 1: t = op; break;
76
- case 4: _.label++; return { value: op[1], done: false };
77
- case 5: _.label++; y = op[1]; op = [0]; continue;
78
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
79
- default:
80
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
81
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
82
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
83
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
84
- if (t[2]) _.ops.pop();
85
- _.trys.pop(); continue;
86
- }
87
- op = body.call(thisArg, _);
88
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
89
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
90
- }
43
+ /******************************************************************************
44
+ Copyright (c) Microsoft Corporation.
45
+
46
+ Permission to use, copy, modify, and/or distribute this software for any
47
+ purpose with or without fee is hereby granted.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
+ PERFORMANCE OF THIS SOFTWARE.
56
+ ***************************************************************************** */
57
+
58
+ function __decorate(decorators, target, key, desc) {
59
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
60
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
61
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
91
63
  }
92
64
 
65
+ function __generator(thisArg, body) {
66
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
68
+ function verb(n) { return function (v) { return step([n, v]); }; }
69
+ function step(op) {
70
+ if (f) throw new TypeError("Generator is already executing.");
71
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
72
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
73
+ if (y = 0, t) op = [op[0] & 2, t.value];
74
+ switch (op[0]) {
75
+ case 0: case 1: t = op; break;
76
+ case 4: _.label++; return { value: op[1], done: false };
77
+ case 5: _.label++; y = op[1]; op = [0]; continue;
78
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
79
+ default:
80
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
81
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
82
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
83
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
84
+ if (t[2]) _.ops.pop();
85
+ _.trys.pop(); continue;
86
+ }
87
+ op = body.call(thisArg, _);
88
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
89
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
90
+ }
91
+ }
92
+
93
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
94
+ var e = new Error(message);
95
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
96
+ };
97
+
93
98
  function _defineProperties(target, props) {
94
99
  for (var i = 0; i < props.length; i++) {
95
100
  var descriptor = props[i];
@@ -622,7 +627,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
622
627
  return _this.parseBasicType(param, engine, resourceManager);
623
628
  })).then(function(result) {
624
629
  var _instance;
625
- return (_instance = instance)[methodName].apply(_instance, result);
630
+ return (_instance = instance)[methodName].apply(_instance, [].concat(result));
626
631
  });
627
632
  };
628
633
  ReflectionParser._isClass = function _isClass(value) {
@@ -680,6 +685,8 @@ exports.InterpolableValueType = void 0;
680
685
  InterpolableValueType[InterpolableValueType["Color"] = 6] = "Color";
681
686
  InterpolableValueType[InterpolableValueType["Array"] = 7] = "Array";
682
687
  InterpolableValueType[InterpolableValueType["Boolean"] = 8] = "Boolean";
688
+ InterpolableValueType[InterpolableValueType["Rect"] = 9] = "Rect";
689
+ InterpolableValueType[InterpolableValueType["ReferResource"] = 10] = "ReferResource";
683
690
  })(exports.InterpolableValueType || (exports.InterpolableValueType = {}));
684
691
  exports.AnimationClipDecoder = /*#__PURE__*/ function() {
685
692
  function AnimationClipDecoder() {}
@@ -708,7 +715,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
708
715
  switch(curveType){
709
716
  case "AnimationFloatCurve":
710
717
  {
711
- curve = curve || new engineCore.AnimationFloatCurve();
718
+ curve = new engineCore.AnimationFloatCurve();
712
719
  curve.interpolation = interpolation;
713
720
  for(var j = 0; j < keysLen; ++j){
714
721
  var keyframe = new engineCore.Keyframe();
@@ -722,7 +729,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
722
729
  }
723
730
  case "AnimationArrayCurve":
724
731
  {
725
- curve = curve || new engineCore.AnimationArrayCurve();
732
+ curve = new engineCore.AnimationArrayCurve();
726
733
  curve.interpolation = interpolation;
727
734
  for(var j1 = 0; j1 < keysLen; ++j1){
728
735
  var keyframe1 = new engineCore.Keyframe();
@@ -737,7 +744,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
737
744
  }
738
745
  case "AnimationFloatArrayCurve":
739
746
  {
740
- curve = curve || new engineCore.AnimationFloatArrayCurve();
747
+ curve = new engineCore.AnimationFloatArrayCurve();
741
748
  curve.interpolation = interpolation;
742
749
  for(var j2 = 0; j2 < keysLen; ++j2){
743
750
  var keyframe2 = new engineCore.Keyframe();
@@ -752,7 +759,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
752
759
  }
753
760
  case "AnimationVector2Curve":
754
761
  {
755
- curve = curve || new engineCore.AnimationVector2Curve();
762
+ curve = new engineCore.AnimationVector2Curve();
756
763
  curve.interpolation = interpolation;
757
764
  for(var j3 = 0; j3 < keysLen; ++j3){
758
765
  var keyframe3 = new engineCore.Keyframe();
@@ -766,7 +773,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
766
773
  }
767
774
  case "AnimationVector3Curve":
768
775
  {
769
- curve = curve || new engineCore.AnimationVector3Curve();
776
+ curve = new engineCore.AnimationVector3Curve();
770
777
  curve.interpolation = interpolation;
771
778
  for(var j4 = 0; j4 < keysLen; ++j4){
772
779
  var keyframe4 = new engineCore.Keyframe();
@@ -780,7 +787,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
780
787
  }
781
788
  case "AnimationVector4Curve":
782
789
  {
783
- curve = curve || new engineCore.AnimationVector4Curve();
790
+ curve = new engineCore.AnimationVector4Curve();
784
791
  curve.interpolation = interpolation;
785
792
  var keyframe5 = new engineCore.Keyframe();
786
793
  keyframe5.time = bufferReader.nextFloat32();
@@ -792,7 +799,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
792
799
  }
793
800
  case "AnimationColorCurve":
794
801
  {
795
- curve = curve || new engineCore.AnimationColorCurve();
802
+ curve = new engineCore.AnimationColorCurve();
796
803
  curve.interpolation = interpolation;
797
804
  for(var j5 = 0; j5 < keysLen; ++j5){
798
805
  var keyframe6 = new engineCore.Keyframe();
@@ -806,7 +813,7 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
806
813
  }
807
814
  case "AnimationQuaternionCurve":
808
815
  {
809
- curve = curve || new engineCore.AnimationQuaternionCurve();
816
+ curve = new engineCore.AnimationQuaternionCurve();
810
817
  curve.interpolation = interpolation;
811
818
  for(var j6 = 0; j6 < keysLen; ++j6){
812
819
  var keyframe7 = new engineCore.Keyframe();
@@ -818,6 +825,18 @@ exports.AnimationClipDecoder = /*#__PURE__*/ function() {
818
825
  }
819
826
  break;
820
827
  }
828
+ case "AnimationRefCurve":
829
+ {
830
+ curve = new engineCore.AnimationRefCurve();
831
+ curve.interpolation = interpolation;
832
+ for(var j7 = 0; j7 < keysLen; ++j7){
833
+ var keyframe8 = new engineCore.Keyframe();
834
+ keyframe8.time = bufferReader.nextFloat32();
835
+ keyframe8.value = JSON.parse(bufferReader.nextStr());
836
+ curve.addKey(keyframe8);
837
+ }
838
+ break;
839
+ }
821
840
  }
822
841
  clip.addCurveBinding(relativePath, componentType, property, curve);
823
842
  }
@@ -987,10 +1006,10 @@ var SceneParserContext = /*#__PURE__*/ function() {
987
1006
  return SceneParser;
988
1007
  }();
989
1008
 
990
- exports.MeshLoader = /*#__PURE__*/ function(Loader) {
991
- _inherits(MeshLoader, Loader);
1009
+ exports.MeshLoader = /*#__PURE__*/ function(Loader1) {
1010
+ _inherits(MeshLoader, Loader1);
992
1011
  function MeshLoader() {
993
- return Loader.apply(this, arguments);
1012
+ return Loader1.apply(this, arguments);
994
1013
  }
995
1014
  var _proto = MeshLoader.prototype;
996
1015
  _proto.load = function load(item, resourceManager) {
@@ -1013,10 +1032,10 @@ exports.MeshLoader = __decorate([
1013
1032
  ], true)
1014
1033
  ], exports.MeshLoader);
1015
1034
 
1016
- exports.EditorTextureLoader = /*#__PURE__*/ function(Loader) {
1017
- _inherits(EditorTextureLoader, Loader);
1035
+ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader1) {
1036
+ _inherits(EditorTextureLoader, Loader1);
1018
1037
  function EditorTextureLoader() {
1019
- return Loader.apply(this, arguments);
1038
+ return Loader1.apply(this, arguments);
1020
1039
  }
1021
1040
  var _proto = EditorTextureLoader.prototype;
1022
1041
  _proto.load = function load(item, resourceManager) {
@@ -1053,10 +1072,10 @@ exports.EditorTextureLoader = __decorate([
1053
1072
  });
1054
1073
  }
1055
1074
 
1056
- var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
1057
- _inherits(AnimationClipLoader, Loader);
1075
+ var AnimationClipLoader = /*#__PURE__*/ function(Loader1) {
1076
+ _inherits(AnimationClipLoader, Loader1);
1058
1077
  function AnimationClipLoader() {
1059
- return Loader.apply(this, arguments);
1078
+ return Loader1.apply(this, arguments);
1060
1079
  }
1061
1080
  var _proto = AnimationClipLoader.prototype;
1062
1081
  _proto.load = function load(item, resourceManager) {
@@ -1065,7 +1084,27 @@ var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
1065
1084
  _this.request(item.url, _extends({}, item, {
1066
1085
  type: "arraybuffer"
1067
1086
  })).then(function(data) {
1068
- return decode(data, resourceManager.engine).then(resolve);
1087
+ return decode(data, resourceManager.engine).then(function(clip) {
1088
+ var curveBindingPromises = clip.curveBindings.map(function(curveBinding) {
1089
+ var curve = curveBinding.curve;
1090
+ var promises = curve.keys.map(function(key) {
1091
+ var value = key.value;
1092
+ if (typeof value === "object" && value.refId) {
1093
+ return new Promise(function(resolve) {
1094
+ resourceManager// @ts-ignore
1095
+ .getResourceByRef(value).then(function(asset) {
1096
+ key.value = asset;
1097
+ resolve(key);
1098
+ }).catch(reject);
1099
+ });
1100
+ }
1101
+ });
1102
+ return Promise.all(promises);
1103
+ });
1104
+ return Promise.all(curveBindingPromises).then(function() {
1105
+ resolve(clip);
1106
+ });
1107
+ });
1069
1108
  }).catch(reject);
1070
1109
  });
1071
1110
  };
@@ -1101,6 +1140,7 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1101
1140
  var states = stateMachineData.states;
1102
1141
  var stateMachine = layer.stateMachine = new engineCore.AnimatorStateMachine();
1103
1142
  states.forEach(function(stateData, stateIndex) {
1143
+ var _scriptsObject;
1104
1144
  var name = stateData.name, speed = stateData.speed, wrapMode = stateData.wrapMode, clipStartNormalizedTime = stateData.clipStartNormalizedTime, clipEndNormalizedTime = stateData.clipEndNormalizedTime, isDefaultState = stateData.isDefaultState, clipData = stateData.clip, scripts = stateData.scripts;
1105
1145
  var state = stateMachine.addState(name);
1106
1146
  isDefaultState && (stateMachine.defaultState = state);
@@ -1109,7 +1149,7 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1109
1149
  state.clipStartTime = clipStartNormalizedTime;
1110
1150
  state.clipEndTime = clipEndNormalizedTime;
1111
1151
  var scriptsObject = JSON.parse(scripts);
1112
- scriptsObject == null ? void 0 : scriptsObject.forEach(function(script) {
1152
+ (_scriptsObject = scriptsObject) == null ? void 0 : _scriptsObject.forEach(function(script) {
1113
1153
  state.addStateMachineScript(engineCore.Loader.getClass(script));
1114
1154
  });
1115
1155
  if (clipData) {
@@ -1163,10 +1203,10 @@ AnimatorControllerLoader = __decorate([
1163
1203
  function isBase64(url) {
1164
1204
  return /^data:(.+?);base64,/.test(url);
1165
1205
  }
1166
- var BufferLoader = /*#__PURE__*/ function(Loader) {
1167
- _inherits(BufferLoader, Loader);
1206
+ var BufferLoader = /*#__PURE__*/ function(Loader1) {
1207
+ _inherits(BufferLoader, Loader1);
1168
1208
  function BufferLoader() {
1169
- return Loader.apply(this, arguments);
1209
+ return Loader1.apply(this, arguments);
1170
1210
  }
1171
1211
  var _proto = BufferLoader.prototype;
1172
1212
  _proto.load = function load(item) {
@@ -1193,10 +1233,10 @@ BufferLoader = __decorate([
1193
1233
  ], false)
1194
1234
  ], BufferLoader);
1195
1235
 
1196
- var EnvLoader = /*#__PURE__*/ function(Loader) {
1197
- _inherits(EnvLoader, Loader);
1236
+ var EnvLoader = /*#__PURE__*/ function(Loader1) {
1237
+ _inherits(EnvLoader, Loader1);
1198
1238
  function EnvLoader() {
1199
- return Loader.apply(this, arguments);
1239
+ return Loader1.apply(this, arguments);
1200
1240
  }
1201
1241
  var _proto = EnvLoader.prototype;
1202
1242
  _proto.load = function load(item, resourceManager) {
@@ -1205,10 +1245,10 @@ var EnvLoader = /*#__PURE__*/ function(Loader) {
1205
1245
  _this.request(item.url, {
1206
1246
  type: "arraybuffer"
1207
1247
  }).then(function(arraybuffer) {
1208
- var _ref;
1248
+ var _this;
1209
1249
  var shArray = new Float32Array(arraybuffer, 0, 27);
1210
1250
  var shByteLength = 27 * 4;
1211
- var size = (_ref = new Uint16Array(arraybuffer, shByteLength, 1)) == null ? void 0 : _ref[0];
1251
+ var size = (_this = new Uint16Array(arraybuffer, shByteLength, 1)) == null ? void 0 : _this[0];
1212
1252
  var engine = resourceManager.engine;
1213
1253
  var texture = new engineCore.TextureCube(engine, size);
1214
1254
  texture.filterMode = engineCore.TextureFilterMode.Trilinear;
@@ -1275,10 +1315,10 @@ function _async_to_generator(fn) {
1275
1315
  };
1276
1316
  }
1277
1317
 
1278
- var FontLoader = /*#__PURE__*/ function(Loader) {
1279
- _inherits(FontLoader, Loader);
1318
+ var FontLoader = /*#__PURE__*/ function(Loader1) {
1319
+ _inherits(FontLoader, Loader1);
1280
1320
  function FontLoader() {
1281
- return Loader.apply(this, arguments);
1321
+ return Loader1.apply(this, arguments);
1282
1322
  }
1283
1323
  var _proto = FontLoader.prototype;
1284
1324
  _proto.load = function load(item, resourceManager) {
@@ -1335,11 +1375,11 @@ FontLoader = __decorate([
1335
1375
 
1336
1376
  /**
1337
1377
  * Product after glTF parser, usually, `defaultSceneRoot` is only needed to use.
1338
- */ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
1339
- _inherits(GLTFResource, ReferResource);
1378
+ */ var GLTFResource = /*#__PURE__*/ function(ReferResource1) {
1379
+ _inherits(GLTFResource, ReferResource1);
1340
1380
  function GLTFResource(engine, url) {
1341
1381
  var _this;
1342
- _this = ReferResource.call(this, engine) || this;
1382
+ _this = ReferResource1.call(this, engine) || this;
1343
1383
  _this.url = url;
1344
1384
  return _this;
1345
1385
  }
@@ -2542,10 +2582,10 @@ var AbstractTranscoder = /*#__PURE__*/ function() {
2542
2582
  };
2543
2583
  }
2544
2584
 
2545
- /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
2546
- _inherits(BinomialLLCTranscoder, AbstractTranscoder);
2585
+ /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
2586
+ _inherits(BinomialLLCTranscoder, AbstractTranscoder1);
2547
2587
  function BinomialLLCTranscoder(workerLimitCount) {
2548
- return AbstractTranscoder.call(this, workerLimitCount);
2588
+ return AbstractTranscoder1.call(this, workerLimitCount);
2549
2589
  }
2550
2590
  var _proto = BinomialLLCTranscoder.prototype;
2551
2591
  _proto._initTranscodeWorkerPool = function _initTranscodeWorkerPool() {
@@ -2722,11 +2762,11 @@ function TranscodeWorkerCode() {
2722
2762
  };
2723
2763
  }
2724
2764
 
2725
- /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
2726
- _inherits(KhronosTranscoder, AbstractTranscoder);
2765
+ /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
2766
+ _inherits(KhronosTranscoder, AbstractTranscoder1);
2727
2767
  function KhronosTranscoder(workerLimitCount, type) {
2728
2768
  var _this;
2729
- _this = AbstractTranscoder.call(this, workerLimitCount) || this;
2769
+ _this = AbstractTranscoder1.call(this, workerLimitCount) || this;
2730
2770
  _this.type = type;
2731
2771
  return _this;
2732
2772
  }
@@ -2794,10 +2834,10 @@ function TranscodeWorkerCode() {
2794
2834
  })();
2795
2835
 
2796
2836
  var _KTX2Loader;
2797
- exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader) {
2798
- _inherits(KTX2Loader1, Loader);
2837
+ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
2838
+ _inherits(KTX2Loader1, Loader1);
2799
2839
  function KTX2Loader1() {
2800
- return Loader.apply(this, arguments);
2840
+ return Loader1.apply(this, arguments);
2801
2841
  }
2802
2842
  var _proto = KTX2Loader1.prototype;
2803
2843
  _proto.initialize = function initialize(engine, configuration) {
@@ -2853,8 +2893,9 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader) {
2853
2893
  this._isBinomialInit = false;
2854
2894
  };
2855
2895
  /** @internal */ KTX2Loader1._parseBuffer = function _parseBuffer(buffer, engine, params) {
2896
+ var _params;
2856
2897
  var ktx2Container = new KTX2Container(buffer);
2857
- var formatPriorities = params == null ? void 0 : params.priorityFormats;
2898
+ var formatPriorities = (_params = params) == null ? void 0 : _params.priorityFormats;
2858
2899
  var targetFormat = exports.KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
2859
2900
  var transcodeResultPromise;
2860
2901
  if (exports.KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
@@ -2992,11 +3033,11 @@ exports.KTX2Loader = __decorate([
2992
3033
 
2993
3034
  /**
2994
3035
  * @internal
2995
- */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
2996
- _inherits(GLTFContentRestorer, ContentRestorer);
3036
+ */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
3037
+ _inherits(GLTFContentRestorer, ContentRestorer1);
2997
3038
  function GLTFContentRestorer() {
2998
3039
  var _this;
2999
- _this = ContentRestorer.apply(this, arguments) || this;
3040
+ _this = ContentRestorer1.apply(this, arguments) || this;
3000
3041
  _this.bufferRequests = [];
3001
3042
  _this.glbBufferSlices = [];
3002
3043
  _this.bufferTextures = [];
@@ -3164,24 +3205,6 @@ exports.KTX2Loader = __decorate([
3164
3205
  this.count = count;
3165
3206
  };
3166
3207
 
3167
- function _array_without_holes(arr) {
3168
- if (Array.isArray(arr)) return _array_like_to_array(arr);
3169
- }
3170
-
3171
- function _iterable_to_array(iter) {
3172
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
3173
- return Array.from(iter);
3174
- }
3175
- }
3176
-
3177
- function _non_iterable_spread() {
3178
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3179
- }
3180
-
3181
- function _to_consumable_array(arr) {
3182
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
3183
- }
3184
-
3185
3208
  /**
3186
3209
  * Base class of glTF extension parser.
3187
3210
  */ var GLTFExtensionParser = /*#__PURE__*/ function() {
@@ -3248,12 +3271,7 @@ exports.GLTFExtensionMode = void 0;
3248
3271
  var _GLTFParser;
3249
3272
  var extensionName = extensionArray[i];
3250
3273
  var extensionSchema = extensions[extensionName];
3251
- resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [
3252
- extensionName,
3253
- context,
3254
- extensionSchema,
3255
- ownerSchema
3256
- ].concat(_to_consumable_array(extra)));
3274
+ resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [].concat(extensionName, context, extensionSchema, ownerSchema, extra));
3257
3275
  if (resource) {
3258
3276
  return resource;
3259
3277
  }
@@ -3273,13 +3291,7 @@ exports.GLTFExtensionMode = void 0;
3273
3291
  for(var extensionName in extensions){
3274
3292
  var _GLTFParser;
3275
3293
  var extensionSchema = extensions[extensionName];
3276
- (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [
3277
- extensionName,
3278
- context,
3279
- parseResource,
3280
- extensionSchema,
3281
- ownerSchema
3282
- ].concat(_to_consumable_array(extra)));
3294
+ (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [].concat(extensionName, context, parseResource, extensionSchema, ownerSchema, extra));
3283
3295
  }
3284
3296
  };
3285
3297
  /**
@@ -3296,8 +3308,9 @@ exports.GLTFExtensionMode = void 0;
3296
3308
  * @param mode - GLTF extension mode
3297
3309
  * @returns GLTF extension parser
3298
3310
  */ GLTFParser.getExtensionParser = function getExtensionParser(extensionName, mode) {
3311
+ var _parsers;
3299
3312
  var parsers = GLTFParser._extensionParsers[extensionName];
3300
- var length = parsers == null ? void 0 : parsers.length;
3313
+ var length = (_parsers = parsers) == null ? void 0 : _parsers.length;
3301
3314
  if (length) {
3302
3315
  // only use the last parser.
3303
3316
  for(var i = length - 1; i >= 0; --i){
@@ -3323,11 +3336,7 @@ exports.GLTFExtensionMode = void 0;
3323
3336
  var parser = GLTFParser.getExtensionParser(extensionName, exports.GLTFExtensionMode.CreateAndParse);
3324
3337
  if (parser) {
3325
3338
  var _parser;
3326
- return (_parser = parser).createAndParse.apply(_parser, [
3327
- context,
3328
- extensionSchema,
3329
- ownerSchema
3330
- ].concat(_to_consumable_array(extra)));
3339
+ return (_parser = parser).createAndParse.apply(_parser, [].concat(context, extensionSchema, ownerSchema, extra));
3331
3340
  }
3332
3341
  };
3333
3342
  GLTFParser._additiveParse = function _additiveParse(extensionName, context, parseResource, extensionSchema, ownerSchema) {
@@ -3337,12 +3346,7 @@ exports.GLTFExtensionMode = void 0;
3337
3346
  var parser = GLTFParser.getExtensionParser(extensionName, exports.GLTFExtensionMode.AdditiveParse);
3338
3347
  if (parser) {
3339
3348
  var _parser;
3340
- (_parser = parser).additiveParse.apply(_parser, [
3341
- context,
3342
- parseResource,
3343
- extensionSchema,
3344
- ownerSchema
3345
- ].concat(_to_consumable_array(extra)));
3349
+ (_parser = parser).additiveParse.apply(_parser, [].concat(context, parseResource, extensionSchema, ownerSchema, extra));
3346
3350
  }
3347
3351
  };
3348
3352
  return GLTFParser;
@@ -3361,10 +3365,10 @@ exports.GLTFExtensionMode = void 0;
3361
3365
  };
3362
3366
  }
3363
3367
 
3364
- exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser) {
3365
- _inherits(GLTFSchemaParser, GLTFParser);
3368
+ exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3369
+ _inherits(GLTFSchemaParser, GLTFParser1);
3366
3370
  function GLTFSchemaParser() {
3367
- return GLTFParser.apply(this, arguments);
3371
+ return GLTFParser1.apply(this, arguments);
3368
3372
  }
3369
3373
  var _proto = GLTFSchemaParser.prototype;
3370
3374
  _proto.parse = function parse(context) {
@@ -3580,10 +3584,10 @@ exports.GLTFAnimationParser = __decorate([
3580
3584
  registerGLTFParser(exports.GLTFParserType.Animation)
3581
3585
  ], exports.GLTFAnimationParser);
3582
3586
 
3583
- exports.GLTFBufferParser = /*#__PURE__*/ function(GLTFParser) {
3584
- _inherits(GLTFBufferParser, GLTFParser);
3587
+ exports.GLTFBufferParser = /*#__PURE__*/ function(GLTFParser1) {
3588
+ _inherits(GLTFBufferParser, GLTFParser1);
3585
3589
  function GLTFBufferParser() {
3586
- return GLTFParser.apply(this, arguments);
3590
+ return GLTFParser1.apply(this, arguments);
3587
3591
  }
3588
3592
  var _proto = GLTFBufferParser.prototype;
3589
3593
  _proto.parse = function parse(context, index) {
@@ -4205,10 +4209,10 @@ exports.GLTFSceneParser = __decorate([
4205
4209
  registerGLTFParser(exports.GLTFParserType.Scene)
4206
4210
  ], exports.GLTFSceneParser);
4207
4211
 
4208
- exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser) {
4209
- _inherits(GLTFSkinParser, GLTFParser);
4212
+ exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser1) {
4213
+ _inherits(GLTFSkinParser, GLTFParser1);
4210
4214
  function GLTFSkinParser() {
4211
- return GLTFParser.apply(this, arguments);
4215
+ return GLTFParser1.apply(this, arguments);
4212
4216
  }
4213
4217
  var _proto = GLTFSkinParser.prototype;
4214
4218
  _proto.parse = function parse(context, index) {
@@ -4304,6 +4308,7 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4304
4308
  var useSampler = sampler !== undefined;
4305
4309
  var samplerInfo = sampler !== undefined && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
4306
4310
  if (uri) {
4311
+ var _samplerInfo;
4307
4312
  // TODO: deleted in 2.0
4308
4313
  var extIndex = uri.lastIndexOf(".");
4309
4314
  var ext = uri.substring(extIndex + 1);
@@ -4312,7 +4317,7 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4312
4317
  url: engineCore.Utils.resolveAbsoluteUrl(url, uri),
4313
4318
  type: type,
4314
4319
  params: {
4315
- mipmap: samplerInfo == null ? void 0 : samplerInfo.mipmap
4320
+ mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
4316
4321
  }
4317
4322
  }).then(function(texture) {
4318
4323
  var _texture;
@@ -4326,7 +4331,8 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4326
4331
  var buffer = buffers[bufferView.buffer];
4327
4332
  var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
4328
4333
  return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
4329
- var texture = new engineCore.Texture2D(engine, image.width, image.height, undefined, samplerInfo == null ? void 0 : samplerInfo.mipmap);
4334
+ var _samplerInfo;
4335
+ var texture = new engineCore.Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
4330
4336
  texture.setImageSource(image);
4331
4337
  texture.generateMipmaps();
4332
4338
  texture.name = textureName || imageName || "texture_" + index;
@@ -4390,17 +4396,18 @@ exports.GLTFValidator = __decorate([
4390
4396
  registerGLTFParser(exports.GLTFParserType.Validator)
4391
4397
  ], exports.GLTFValidator);
4392
4398
 
4393
- var GLTFLoader = /*#__PURE__*/ function(Loader) {
4394
- _inherits(GLTFLoader, Loader);
4399
+ var GLTFLoader = /*#__PURE__*/ function(Loader1) {
4400
+ _inherits(GLTFLoader, Loader1);
4395
4401
  function GLTFLoader() {
4396
- return Loader.apply(this, arguments);
4402
+ return Loader1.apply(this, arguments);
4397
4403
  }
4398
4404
  var _proto = GLTFLoader.prototype;
4399
4405
  _proto.load = function load(item, resourceManager) {
4406
+ var _params;
4400
4407
  var url = item.url;
4401
4408
  var params = item.params;
4402
4409
  var glTFResource = new GLTFResource(resourceManager.engine, url);
4403
- var context = new GLTFParserContext(glTFResource, resourceManager, !!(params == null ? void 0 : params.keepMeshData));
4410
+ var context = new GLTFParserContext(glTFResource, resourceManager, !!((_params = params) == null ? void 0 : _params.keepMeshData));
4404
4411
  return context.parse();
4405
4412
  };
4406
4413
  return GLTFLoader;
@@ -4414,10 +4421,10 @@ GLTFLoader = __decorate([
4414
4421
 
4415
4422
  var _HDRLoader;
4416
4423
  var PI = Math.PI;
4417
- var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
4418
- _inherits(HDRLoader1, Loader);
4424
+ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader1) {
4425
+ _inherits(HDRLoader1, Loader1);
4419
4426
  function HDRLoader1() {
4420
- return Loader.apply(this, arguments);
4427
+ return Loader1.apply(this, arguments);
4421
4428
  }
4422
4429
  var _proto = HDRLoader1.prototype;
4423
4430
  _proto.load = function load(item, resourceManager) {
@@ -4728,10 +4735,10 @@ HDRLoader = __decorate([
4728
4735
  ])
4729
4736
  ], HDRLoader);
4730
4737
 
4731
- var JSONLoader = /*#__PURE__*/ function(Loader) {
4732
- _inherits(JSONLoader, Loader);
4738
+ var JSONLoader = /*#__PURE__*/ function(Loader1) {
4739
+ _inherits(JSONLoader, Loader1);
4733
4740
  function JSONLoader() {
4734
- return Loader.apply(this, arguments);
4741
+ return Loader1.apply(this, arguments);
4735
4742
  }
4736
4743
  var _proto = JSONLoader.prototype;
4737
4744
  _proto.load = function load(item) {
@@ -4932,10 +4939,10 @@ function parseCubeKTX(dataArray) {
4932
4939
  };
4933
4940
  }
4934
4941
 
4935
- var KTXCubeLoader = /*#__PURE__*/ function(Loader) {
4936
- _inherits(KTXCubeLoader, Loader);
4942
+ var KTXCubeLoader = /*#__PURE__*/ function(Loader1) {
4943
+ _inherits(KTXCubeLoader, Loader1);
4937
4944
  function KTXCubeLoader() {
4938
- return Loader.apply(this, arguments);
4945
+ return Loader1.apply(this, arguments);
4939
4946
  }
4940
4947
  var _proto = KTXCubeLoader.prototype;
4941
4948
  _proto.load = function load(item, resourceManager) {
@@ -4969,10 +4976,10 @@ KTXCubeLoader = __decorate([
4969
4976
  engineCore.resourceLoader(engineCore.AssetType.KTXCube, [])
4970
4977
  ], KTXCubeLoader);
4971
4978
 
4972
- var KTXLoader = /*#__PURE__*/ function(Loader) {
4973
- _inherits(KTXLoader, Loader);
4979
+ var KTXLoader = /*#__PURE__*/ function(Loader1) {
4980
+ _inherits(KTXLoader, Loader1);
4974
4981
  function KTXLoader() {
4975
- return Loader.apply(this, arguments);
4982
+ return Loader1.apply(this, arguments);
4976
4983
  }
4977
4984
  var _proto = KTXLoader.prototype;
4978
4985
  _proto.load = function load(item, resourceManager) {
@@ -5012,10 +5019,10 @@ function parseProperty(object, key, value) {
5012
5019
  object[key] = value;
5013
5020
  }
5014
5021
  }
5015
- var MaterialLoader = /*#__PURE__*/ function(Loader) {
5016
- _inherits(MaterialLoader, Loader);
5022
+ var MaterialLoader = /*#__PURE__*/ function(Loader1) {
5023
+ _inherits(MaterialLoader, Loader1);
5017
5024
  function MaterialLoader() {
5018
- return Loader.apply(this, arguments);
5025
+ return Loader1.apply(this, arguments);
5019
5026
  }
5020
5027
  var _proto = MaterialLoader.prototype;
5021
5028
  _proto.load = function load(item, resourceManager) {
@@ -5080,10 +5087,10 @@ MaterialLoader = __decorate([
5080
5087
  ])
5081
5088
  ], MaterialLoader);
5082
5089
 
5083
- var MeshLoader = /*#__PURE__*/ function(Loader) {
5084
- _inherits(MeshLoader, Loader);
5090
+ var MeshLoader = /*#__PURE__*/ function(Loader1) {
5091
+ _inherits(MeshLoader, Loader1);
5085
5092
  function MeshLoader() {
5086
- return Loader.apply(this, arguments);
5093
+ return Loader1.apply(this, arguments);
5087
5094
  }
5088
5095
  var _proto = MeshLoader.prototype;
5089
5096
  _proto.load = function load(item, resourceManager) {
@@ -5106,10 +5113,10 @@ MeshLoader = __decorate([
5106
5113
  ])
5107
5114
  ], MeshLoader);
5108
5115
 
5109
- var SourceFontLoader = /*#__PURE__*/ function(Loader) {
5110
- _inherits(SourceFontLoader, Loader);
5116
+ var SourceFontLoader = /*#__PURE__*/ function(Loader1) {
5117
+ _inherits(SourceFontLoader, Loader1);
5111
5118
  function SourceFontLoader() {
5112
- return Loader.apply(this, arguments);
5119
+ return Loader1.apply(this, arguments);
5113
5120
  }
5114
5121
  var _proto = SourceFontLoader.prototype;
5115
5122
  _proto.load = function load(item, resourceManager) {
@@ -5155,11 +5162,11 @@ SourceFontLoader = __decorate([
5155
5162
  ], false)
5156
5163
  ], SourceFontLoader);
5157
5164
 
5158
- var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
5159
- _inherits(SpriteAtlasLoader, Loader);
5165
+ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader1) {
5166
+ _inherits(SpriteAtlasLoader, Loader1);
5160
5167
  function SpriteAtlasLoader() {
5161
5168
  var _this;
5162
- _this = Loader.apply(this, arguments) || this;
5169
+ _this = Loader1.apply(this, arguments) || this;
5163
5170
  _this._tempRect = new engineMath.Rect();
5164
5171
  _this._tempVec2 = new engineMath.Vector2();
5165
5172
  _this._tempVec4 = new engineMath.Vector4();
@@ -5247,10 +5254,10 @@ SpriteAtlasLoader = __decorate([
5247
5254
  ], false)
5248
5255
  ], SpriteAtlasLoader);
5249
5256
 
5250
- var SpriteLoader = /*#__PURE__*/ function(Loader) {
5251
- _inherits(SpriteLoader, Loader);
5257
+ var SpriteLoader = /*#__PURE__*/ function(Loader1) {
5258
+ _inherits(SpriteLoader, Loader1);
5252
5259
  function SpriteLoader() {
5253
- return Loader.apply(this, arguments);
5260
+ return Loader1.apply(this, arguments);
5254
5261
  }
5255
5262
  var _proto = SpriteLoader.prototype;
5256
5263
  _proto.load = function load(item, resourceManager) {
@@ -5285,11 +5292,11 @@ SpriteLoader = __decorate([
5285
5292
 
5286
5293
  /**
5287
5294
  * @internal
5288
- */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
5289
- _inherits(Texture2DContentRestorer, ContentRestorer);
5295
+ */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
5296
+ _inherits(Texture2DContentRestorer, ContentRestorer1);
5290
5297
  function Texture2DContentRestorer(resource, url, requestConfig) {
5291
5298
  var _this;
5292
- _this = ContentRestorer.call(this, resource) || this;
5299
+ _this = ContentRestorer1.call(this, resource) || this;
5293
5300
  _this.url = url;
5294
5301
  _this.requestConfig = requestConfig;
5295
5302
  return _this;
@@ -5307,10 +5314,10 @@ SpriteLoader = __decorate([
5307
5314
  return Texture2DContentRestorer;
5308
5315
  }(engineCore.ContentRestorer);
5309
5316
 
5310
- var Texture2DLoader = /*#__PURE__*/ function(Loader) {
5311
- _inherits(Texture2DLoader, Loader);
5317
+ var Texture2DLoader = /*#__PURE__*/ function(Loader1) {
5318
+ _inherits(Texture2DLoader, Loader1);
5312
5319
  function Texture2DLoader() {
5313
- return Loader.apply(this, arguments);
5320
+ return Loader1.apply(this, arguments);
5314
5321
  }
5315
5322
  var _proto = Texture2DLoader.prototype;
5316
5323
  _proto.load = function load(item, resourceManager) {
@@ -5321,8 +5328,9 @@ var Texture2DLoader = /*#__PURE__*/ function(Loader) {
5321
5328
  type: "image"
5322
5329
  });
5323
5330
  _this.request(url, requestConfig).then(function(image) {
5331
+ var _params, _params1;
5324
5332
  var params = item.params;
5325
- var texture = new engineCore.Texture2D(resourceManager.engine, image.width, image.height, params == null ? void 0 : params.format, params == null ? void 0 : params.mipmap);
5333
+ var texture = new engineCore.Texture2D(resourceManager.engine, image.width, image.height, (_params = params) == null ? void 0 : _params.format, (_params1 = params) == null ? void 0 : _params1.mipmap);
5326
5334
  texture.setImageSource(image);
5327
5335
  texture.generateMipmaps();
5328
5336
  if (url.indexOf("data:") !== 0) {
@@ -5349,11 +5357,11 @@ Texture2DLoader = __decorate([
5349
5357
 
5350
5358
  /**
5351
5359
  * @internal
5352
- */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
5353
- _inherits(TextureCubeContentRestorer, ContentRestorer);
5360
+ */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
5361
+ _inherits(TextureCubeContentRestorer, ContentRestorer1);
5354
5362
  function TextureCubeContentRestorer(resource, urls, requestConfig) {
5355
5363
  var _this;
5356
- _this = ContentRestorer.call(this, resource) || this;
5364
+ _this = ContentRestorer1.call(this, resource) || this;
5357
5365
  _this.urls = urls;
5358
5366
  _this.requestConfig = requestConfig;
5359
5367
  return _this;
@@ -5379,10 +5387,10 @@ Texture2DLoader = __decorate([
5379
5387
  return TextureCubeContentRestorer;
5380
5388
  }(engineCore.ContentRestorer);
5381
5389
 
5382
- var TextureCubeLoader = /*#__PURE__*/ function(Loader) {
5383
- _inherits(TextureCubeLoader, Loader);
5390
+ var TextureCubeLoader = /*#__PURE__*/ function(Loader1) {
5391
+ _inherits(TextureCubeLoader, Loader1);
5384
5392
  function TextureCubeLoader() {
5385
- return Loader.apply(this, arguments);
5393
+ return Loader1.apply(this, arguments);
5386
5394
  }
5387
5395
  var _proto = TextureCubeLoader.prototype;
5388
5396
  _proto.load = function load(item, resourceManager) {
@@ -5420,10 +5428,10 @@ TextureCubeLoader = __decorate([
5420
5428
  ])
5421
5429
  ], TextureCubeLoader);
5422
5430
 
5423
- var SceneLoader = /*#__PURE__*/ function(Loader) {
5424
- _inherits(SceneLoader, Loader);
5431
+ var SceneLoader = /*#__PURE__*/ function(Loader1) {
5432
+ _inherits(SceneLoader, Loader1);
5425
5433
  function SceneLoader() {
5426
- return Loader.apply(this, arguments);
5434
+ return Loader1.apply(this, arguments);
5427
5435
  }
5428
5436
  var _proto = SceneLoader.prototype;
5429
5437
  _proto.load = function load(item, resourceManager) {
@@ -5517,7 +5525,7 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
5517
5525
  }(engineCore.Loader);
5518
5526
  SceneLoader = __decorate([
5519
5527
  engineCore.resourceLoader(engineCore.AssetType.Scene, [
5520
- "prefab"
5528
+ "scene"
5521
5529
  ], true)
5522
5530
  ], SceneLoader);
5523
5531
  ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
@@ -5536,10 +5544,10 @@ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _asy
5536
5544
  }));
5537
5545
 
5538
5546
  var _KHR_draco_mesh_compression;
5539
- var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ function(GLTFExtensionParser) {
5540
- _inherits(KHR_draco_mesh_compression1, GLTFExtensionParser);
5547
+ var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ function(GLTFExtensionParser1) {
5548
+ _inherits(KHR_draco_mesh_compression1, GLTFExtensionParser1);
5541
5549
  function KHR_draco_mesh_compression1() {
5542
- return GLTFExtensionParser.apply(this, arguments);
5550
+ return GLTFExtensionParser1.apply(this, arguments);
5543
5551
  }
5544
5552
  var _proto = KHR_draco_mesh_compression1.prototype;
5545
5553
  _proto.createAndParse = function createAndParse(context, schema, glTFPrimitive, glTFMesh) {
@@ -5699,10 +5707,10 @@ KHR_draco_mesh_compression = __decorate([
5699
5707
  registerGLTFExtension("KHR_draco_mesh_compression", exports.GLTFExtensionMode.CreateAndParse)
5700
5708
  ], KHR_draco_mesh_compression);
5701
5709
 
5702
- var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser) {
5703
- _inherits(KHR_lights_punctual, GLTFExtensionParser);
5710
+ var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser1) {
5711
+ _inherits(KHR_lights_punctual, GLTFExtensionParser1);
5704
5712
  function KHR_lights_punctual() {
5705
- return GLTFExtensionParser.apply(this, arguments);
5713
+ return GLTFExtensionParser1.apply(this, arguments);
5706
5714
  }
5707
5715
  var _proto = KHR_lights_punctual.prototype;
5708
5716
  _proto.additiveParse = function additiveParse(context, entity, extensionSchema) {
@@ -5740,10 +5748,10 @@ KHR_lights_punctual = __decorate([
5740
5748
  registerGLTFExtension("KHR_lights_punctual", exports.GLTFExtensionMode.AdditiveParse)
5741
5749
  ], KHR_lights_punctual);
5742
5750
 
5743
- var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser) {
5744
- _inherits(KHR_materials_clearcoat, GLTFExtensionParser);
5751
+ var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser1) {
5752
+ _inherits(KHR_materials_clearcoat, GLTFExtensionParser1);
5745
5753
  function KHR_materials_clearcoat() {
5746
- return GLTFExtensionParser.apply(this, arguments);
5754
+ return GLTFExtensionParser1.apply(this, arguments);
5747
5755
  }
5748
5756
  var _proto = KHR_materials_clearcoat.prototype;
5749
5757
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -5775,10 +5783,10 @@ KHR_materials_clearcoat = __decorate([
5775
5783
  registerGLTFExtension("KHR_materials_clearcoat", exports.GLTFExtensionMode.AdditiveParse)
5776
5784
  ], KHR_materials_clearcoat);
5777
5785
 
5778
- var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser) {
5779
- _inherits(KHR_materials_ior, GLTFExtensionParser);
5786
+ var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser1) {
5787
+ _inherits(KHR_materials_ior, GLTFExtensionParser1);
5780
5788
  function KHR_materials_ior() {
5781
- return GLTFExtensionParser.apply(this, arguments);
5789
+ return GLTFExtensionParser1.apply(this, arguments);
5782
5790
  }
5783
5791
  var _proto = KHR_materials_ior.prototype;
5784
5792
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -5791,10 +5799,10 @@ KHR_materials_ior = __decorate([
5791
5799
  registerGLTFExtension("KHR_materials_ior", exports.GLTFExtensionMode.AdditiveParse)
5792
5800
  ], KHR_materials_ior);
5793
5801
 
5794
- var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser) {
5795
- _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser);
5802
+ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser1) {
5803
+ _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser1);
5796
5804
  function KHR_materials_pbrSpecularGlossiness() {
5797
- return GLTFExtensionParser.apply(this, arguments);
5805
+ return GLTFExtensionParser1.apply(this, arguments);
5798
5806
  }
5799
5807
  var _proto = KHR_materials_pbrSpecularGlossiness.prototype;
5800
5808
  _proto.createAndParse = function createAndParse(context, schema, ownerSchema) {
@@ -5832,10 +5840,10 @@ KHR_materials_pbrSpecularGlossiness = __decorate([
5832
5840
  registerGLTFExtension("KHR_materials_pbrSpecularGlossiness", exports.GLTFExtensionMode.CreateAndParse)
5833
5841
  ], KHR_materials_pbrSpecularGlossiness);
5834
5842
 
5835
- var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser) {
5836
- _inherits(KHR_materials_unlit, GLTFExtensionParser);
5843
+ var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser1) {
5844
+ _inherits(KHR_materials_unlit, GLTFExtensionParser1);
5837
5845
  function KHR_materials_unlit() {
5838
- return GLTFExtensionParser.apply(this, arguments);
5846
+ return GLTFExtensionParser1.apply(this, arguments);
5839
5847
  }
5840
5848
  var _proto = KHR_materials_unlit.prototype;
5841
5849
  _proto.createAndParse = function createAndParse(context, _, ownerSchema) {
@@ -5851,10 +5859,10 @@ KHR_materials_unlit = __decorate([
5851
5859
  registerGLTFExtension("KHR_materials_unlit", exports.GLTFExtensionMode.CreateAndParse)
5852
5860
  ], KHR_materials_unlit);
5853
5861
 
5854
- var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser) {
5855
- _inherits(KHR_materials_variants, GLTFExtensionParser);
5862
+ var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser1) {
5863
+ _inherits(KHR_materials_variants, GLTFExtensionParser1);
5856
5864
  function KHR_materials_variants() {
5857
- return GLTFExtensionParser.apply(this, arguments);
5865
+ return GLTFExtensionParser1.apply(this, arguments);
5858
5866
  }
5859
5867
  var _proto = KHR_materials_variants.prototype;
5860
5868
  _proto.additiveParse = function additiveParse(context, renderer, schema) {
@@ -5884,10 +5892,10 @@ KHR_materials_variants = __decorate([
5884
5892
  registerGLTFExtension("KHR_materials_variants", exports.GLTFExtensionMode.AdditiveParse)
5885
5893
  ], KHR_materials_variants);
5886
5894
 
5887
- var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser) {
5888
- _inherits(KHR_mesh_quantization, GLTFExtensionParser);
5895
+ var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser1) {
5896
+ _inherits(KHR_mesh_quantization, GLTFExtensionParser1);
5889
5897
  function KHR_mesh_quantization() {
5890
- return GLTFExtensionParser.apply(this, arguments);
5898
+ return GLTFExtensionParser1.apply(this, arguments);
5891
5899
  }
5892
5900
  return KHR_mesh_quantization;
5893
5901
  }(GLTFExtensionParser);
@@ -5895,10 +5903,10 @@ KHR_mesh_quantization = __decorate([
5895
5903
  registerGLTFExtension("KHR_mesh_quantization", exports.GLTFExtensionMode.AdditiveParse)
5896
5904
  ], KHR_mesh_quantization);
5897
5905
 
5898
- var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser) {
5899
- _inherits(KHR_texture_basisu, GLTFExtensionParser);
5906
+ var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser1) {
5907
+ _inherits(KHR_texture_basisu, GLTFExtensionParser1);
5900
5908
  function KHR_texture_basisu() {
5901
- return GLTFExtensionParser.apply(this, arguments);
5909
+ return GLTFExtensionParser1.apply(this, arguments);
5902
5910
  }
5903
5911
  var _proto = KHR_texture_basisu.prototype;
5904
5912
  _proto.createAndParse = function createAndParse(context, schema, textureInfo) {
@@ -5958,10 +5966,10 @@ KHR_texture_basisu = __decorate([
5958
5966
  registerGLTFExtension("KHR_texture_basisu", exports.GLTFExtensionMode.CreateAndParse)
5959
5967
  ], KHR_texture_basisu);
5960
5968
 
5961
- var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser) {
5962
- _inherits(KHR_texture_transform, GLTFExtensionParser);
5969
+ var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser1) {
5970
+ _inherits(KHR_texture_transform, GLTFExtensionParser1);
5963
5971
  function KHR_texture_transform() {
5964
- return GLTFExtensionParser.apply(this, arguments);
5972
+ return GLTFExtensionParser1.apply(this, arguments);
5965
5973
  }
5966
5974
  var _proto = KHR_texture_transform.prototype;
5967
5975
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -5987,10 +5995,10 @@ KHR_texture_transform = __decorate([
5987
5995
  registerGLTFExtension("KHR_texture_transform", exports.GLTFExtensionMode.AdditiveParse)
5988
5996
  ], KHR_texture_transform);
5989
5997
 
5990
- var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser) {
5991
- _inherits(GALACEAN_materials_remap, GLTFExtensionParser);
5998
+ var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser1) {
5999
+ _inherits(GALACEAN_materials_remap, GLTFExtensionParser1);
5992
6000
  function GALACEAN_materials_remap() {
5993
- return GLTFExtensionParser.apply(this, arguments);
6001
+ return GLTFExtensionParser1.apply(this, arguments);
5994
6002
  }
5995
6003
  var _proto = GALACEAN_materials_remap.prototype;
5996
6004
  _proto.createAndParse = function createAndParse(context, schema) {
@@ -6004,10 +6012,10 @@ GALACEAN_materials_remap = __decorate([
6004
6012
  registerGLTFExtension("GALACEAN_materials_remap", exports.GLTFExtensionMode.CreateAndParse)
6005
6013
  ], GALACEAN_materials_remap);
6006
6014
 
6007
- var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser) {
6008
- _inherits(GALACEAN_animation_event, GLTFExtensionParser);
6015
+ var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser1) {
6016
+ _inherits(GALACEAN_animation_event, GLTFExtensionParser1);
6009
6017
  function GALACEAN_animation_event() {
6010
- return GLTFExtensionParser.apply(this, arguments);
6018
+ return GLTFExtensionParser1.apply(this, arguments);
6011
6019
  }
6012
6020
  var _proto = GALACEAN_animation_event.prototype;
6013
6021
  _proto.additiveParse = function additiveParse(context, animationClip, schema) {