@galacean/engine-loader 1.3.23 → 1.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -39,6 +39,12 @@ function _inherits(subClass, superClass) {
39
39
  if (superClass) _set_prototype_of(subClass, superClass);
40
40
  }
41
41
 
42
+ function _type_of(obj) {
43
+ "@swc/helpers - typeof";
44
+
45
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
46
+ }
47
+
42
48
  /******************************************************************************
43
49
  Copyright (c) Microsoft Corporation.
44
50
 
@@ -62,8 +68,8 @@ function __decorate(decorators, target, key, desc) {
62
68
  }
63
69
 
64
70
  function __generator(thisArg, body) {
65
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
66
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
71
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
72
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
67
73
  function verb(n) { return function (v) { return step([n, v]); }; }
68
74
  function step(op) {
69
75
  if (f) throw new TypeError("Generator is already executing.");
@@ -493,17 +499,18 @@ exports.Texture2DDecoder = __decorate([
493
499
  ], exports.Texture2DDecoder);
494
500
 
495
501
  function _is_native_reflect_construct() {
496
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
497
- if (Reflect.construct.sham) return false;
498
- if (typeof Proxy === "function") return true;
499
-
502
+ // Since Reflect.construct can't be properly polyfilled, some
503
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
504
+ // Those polyfills don't allow us to subclass built-ins, so we need to
505
+ // use our fallback implementation.
500
506
  try {
501
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
502
-
503
- return true;
504
- } catch (e) {
505
- return false;
506
- }
507
+ // If the internal slots aren't set, this throws an error similar to
508
+ // TypeError: this is not a Boolean object.
509
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
510
+ } catch (_) {}
511
+ return (_is_native_reflect_construct = function() {
512
+ return !!result;
513
+ })();
507
514
  }
508
515
 
509
516
  function _construct(Parent, args, Class) {
@@ -524,11 +531,11 @@ function _construct(Parent, args, Class) {
524
531
  return _construct.apply(null, arguments);
525
532
  }
526
533
 
527
- exports.ParserType = void 0;
528
- (function(ParserType) {
534
+ var ParserType = /*#__PURE__*/ function(ParserType) {
529
535
  ParserType[ParserType["Prefab"] = 0] = "Prefab";
530
536
  ParserType[ParserType["Scene"] = 1] = "Scene";
531
- })(exports.ParserType || (exports.ParserType = {}));
537
+ return ParserType;
538
+ }({});
532
539
  /**
533
540
  * Parser context
534
541
  * @export
@@ -579,7 +586,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
579
586
  var _entityConfig_layer;
580
587
  entity.layer = (_entityConfig_layer = entityConfig.layer) != null ? _entityConfig_layer : entity.layer;
581
588
  // @ts-ignore
582
- _this._context.type === exports.ParserType.Prefab && entity._markAsTemplate(_this._context.resource);
589
+ _this._context.type === ParserType.Prefab && entity._markAsTemplate(_this._context.resource);
583
590
  return entity;
584
591
  });
585
592
  };
@@ -607,14 +614,14 @@ var ReflectionParser = /*#__PURE__*/ function() {
607
614
  }
608
615
  }
609
616
  if (item.props) {
610
- var _this = this, _loop = function(key) {
617
+ var _this, _loop = function(key) {
611
618
  var value = item.props[key];
612
619
  var promise = _this.parseBasicType(value, instance[key]).then(function(v) {
613
620
  return instance[key] = v;
614
621
  });
615
622
  promises.push(promise);
616
623
  };
617
- for(var key in item.props)_loop(key);
624
+ for(var key in item.props)_this = this, _loop(key);
618
625
  }
619
626
  return Promise.all(promises).then(function() {
620
627
  var handle = ReflectionParser.customParseComponentHandles[instance.constructor.name];
@@ -637,7 +644,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
637
644
  return Promise.all(value.map(function(item) {
638
645
  return _this.parseBasicType(item);
639
646
  }));
640
- } else if (typeof value === "object" && value != null) {
647
+ } else if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value != null) {
641
648
  if (ReflectionParser._isClass(value)) {
642
649
  // class object
643
650
  return this.parseClassObject(value);
@@ -646,7 +653,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
646
653
  // reference object
647
654
  // @ts-ignore
648
655
  return context.resourceManager.getResourceByRef(value).then(function(resource) {
649
- if (context.type === exports.ParserType.Prefab) {
656
+ if (context.type === ParserType.Prefab) {
650
657
  // @ts-ignore
651
658
  context.resource._addDependenceAsset(resource);
652
659
  }
@@ -656,7 +663,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
656
663
  // entity reference
657
664
  return Promise.resolve(this._context.entityMap.get(value.entityId));
658
665
  } else if (originValue) {
659
- var _this2 = this, _loop = function(key) {
666
+ var _this2, _loop = function(key) {
660
667
  if (key === "methods") {
661
668
  var methods = value[key];
662
669
  for(var methodName in methods){
@@ -674,7 +681,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
674
681
  }
675
682
  };
676
683
  var promises = [];
677
- for(var key in value)_loop(key);
684
+ for(var key in value)_this2 = this, _loop(key);
678
685
  return Promise.all(promises).then(function() {
679
686
  return originValue;
680
687
  });
@@ -697,7 +704,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
697
704
  }).then(function(entity) {
698
705
  // @ts-ignore
699
706
  var resource = engine.resourceManager._objectPool[assetRefId];
700
- if (_this._context.type === exports.ParserType.Prefab) {
707
+ if (_this._context.type === ParserType.Prefab) {
701
708
  // @ts-ignore
702
709
  _this._context.resource._addDependenceAsset(resource);
703
710
  }
@@ -723,12 +730,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
723
730
  };
724
731
  return ReflectionParser;
725
732
  }();
726
- (function() {
727
- ReflectionParser.customParseComponentHandles = new Map();
728
- })();
733
+ ReflectionParser.customParseComponentHandles = new Map();
729
734
 
730
- exports.InterpolableValueType = void 0;
731
- (function(InterpolableValueType) {
735
+ var InterpolableValueType = /*#__PURE__*/ function(InterpolableValueType) {
732
736
  InterpolableValueType[InterpolableValueType["Float"] = 0] = "Float";
733
737
  InterpolableValueType[InterpolableValueType["FloatArray"] = 1] = "FloatArray";
734
738
  InterpolableValueType[InterpolableValueType["Vector2"] = 2] = "Vector2";
@@ -740,7 +744,8 @@ exports.InterpolableValueType = void 0;
740
744
  InterpolableValueType[InterpolableValueType["Boolean"] = 8] = "Boolean";
741
745
  InterpolableValueType[InterpolableValueType["Rect"] = 9] = "Rect";
742
746
  InterpolableValueType[InterpolableValueType["ReferResource"] = 10] = "ReferResource";
743
- })(exports.InterpolableValueType || (exports.InterpolableValueType = {}));
747
+ return InterpolableValueType;
748
+ }({});
744
749
  exports.AnimationClipDecoder = /*#__PURE__*/ function() {
745
750
  function AnimationClipDecoder() {}
746
751
  AnimationClipDecoder.decode = function decode(engine, bufferReader) {
@@ -932,8 +937,7 @@ exports.AnimationClipDecoder = __decorate([
932
937
  decoder("AnimationClip")
933
938
  ], exports.AnimationClipDecoder);
934
939
 
935
- exports.MaterialLoaderType = void 0;
936
- (function(MaterialLoaderType) {
940
+ var MaterialLoaderType = /*#__PURE__*/ function(MaterialLoaderType) {
937
941
  MaterialLoaderType["Vector2"] = "Vector2";
938
942
  MaterialLoaderType["Vector3"] = "Vector3";
939
943
  MaterialLoaderType["Vector4"] = "Vector4";
@@ -942,13 +946,14 @@ exports.MaterialLoaderType = void 0;
942
946
  MaterialLoaderType["Texture"] = "Texture";
943
947
  MaterialLoaderType["Boolean"] = "Boolean";
944
948
  MaterialLoaderType["Integer"] = "Integer";
945
- })(exports.MaterialLoaderType || (exports.MaterialLoaderType = {}));
949
+ return MaterialLoaderType;
950
+ }({});
946
951
 
947
- exports.SpecularMode = void 0;
948
- (function(SpecularMode) {
952
+ var SpecularMode = /*#__PURE__*/ function(SpecularMode) {
949
953
  SpecularMode["Sky"] = "Sky";
950
954
  SpecularMode["Custom"] = "Custom";
951
- })(exports.SpecularMode || (exports.SpecularMode = {}));
955
+ return SpecularMode;
956
+ }({});
952
957
 
953
958
  function _instanceof(left, right) {
954
959
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -997,13 +1002,11 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
997
1002
 
998
1003
  /**
999
1004
  * The Prefab resource.
1000
- */ var PrefabResource = /*#__PURE__*/ function(ReferResource1) {
1001
- _inherits(PrefabResource, ReferResource1);
1005
+ */ var PrefabResource = /*#__PURE__*/ function(ReferResource) {
1006
+ _inherits(PrefabResource, ReferResource);
1002
1007
  function PrefabResource(engine, url) {
1003
1008
  var _this;
1004
- _this = ReferResource1.call(this, engine) || this;
1005
- _this.url = url;
1006
- _this._dependenceAssets = new Set();
1009
+ _this = ReferResource.call(this, engine) || this, _this.url = url, _this._dependenceAssets = new Set();
1007
1010
  return _this;
1008
1011
  }
1009
1012
  var _proto = PrefabResource.prototype;
@@ -1023,7 +1026,7 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1023
1026
  };
1024
1027
  _proto._onDestroy = function _onDestroy() {
1025
1028
  var _this = this;
1026
- ReferResource1.prototype._onDestroy.call(this);
1029
+ ReferResource.prototype._onDestroy.call(this);
1027
1030
  this._root.destroy();
1028
1031
  this._dependenceAssets.forEach(function(asset) {
1029
1032
  // @ts-ignore
@@ -1098,10 +1101,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1098
1101
  };
1099
1102
  _proto._parsePrefabModification = function _parsePrefabModification() {
1100
1103
  var _loop = function(i, l) {
1101
- var _modifications;
1102
1104
  var entityConfig = entitiesConfig[i];
1103
1105
  var id = entityConfig.id, modifications = entityConfig.modifications;
1104
- if ((_modifications = modifications) == null ? void 0 : _modifications.length) {
1106
+ if (modifications == null ? void 0 : modifications.length) {
1105
1107
  var _promises;
1106
1108
  var rootEntity = entityMap.get(id);
1107
1109
  (_promises = promises).push.apply(_promises, [].concat(modifications.map(function(modification) {
@@ -1130,10 +1132,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1130
1132
  };
1131
1133
  _proto._parsePrefabRemovedEntities = function _parsePrefabRemovedEntities() {
1132
1134
  var _loop = function(i, l) {
1133
- var _removedEntities;
1134
1135
  var entityConfig = entitiesConfig[i];
1135
1136
  var id = entityConfig.id, removedEntities = entityConfig.removedEntities;
1136
- if ((_removedEntities = removedEntities) == null ? void 0 : _removedEntities.length) {
1137
+ if (removedEntities == null ? void 0 : removedEntities.length) {
1137
1138
  var _promises;
1138
1139
  var rootEntity = entityMap.get(id);
1139
1140
  (_promises = promises).push.apply(_promises, [].concat(removedEntities.map(function(target) {
@@ -1155,10 +1156,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1155
1156
  };
1156
1157
  _proto._parsePrefabRemovedComponents = function _parsePrefabRemovedComponents() {
1157
1158
  var _loop = function(i, l) {
1158
- var _removedComponents;
1159
1159
  var entityConfig = entitiesConfig[i];
1160
1160
  var id = entityConfig.id, removedComponents = entityConfig.removedComponents;
1161
- if ((_removedComponents = removedComponents) == null ? void 0 : _removedComponents.length) {
1161
+ if (removedComponents == null ? void 0 : removedComponents.length) {
1162
1162
  var _promises;
1163
1163
  var rootEntity = entityMap.get(id);
1164
1164
  (_promises = promises).concat.apply(_promises, [].concat(removedComponents.map(function(target) {
@@ -1216,7 +1216,7 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1216
1216
  refId: assetRefId
1217
1217
  }).then(function(prefabResource) {
1218
1218
  var entity = _instanceof(prefabResource, PrefabResource) ? prefabResource.instantiate() : prefabResource.instantiateSceneRoot();
1219
- var instanceContext = new ParserContext(engine, exports.ParserType.Prefab, null);
1219
+ var instanceContext = new ParserContext(engine, ParserType.Prefab, null);
1220
1220
  if (!entityConfig.parent) _this.context.rootIds.push(entityConfig.id);
1221
1221
  _this._generateInstanceContext(entity, instanceContext, "");
1222
1222
  _this._prefabContextMap.set(entity, instanceContext);
@@ -1295,12 +1295,11 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1295
1295
  return HierarchyParser;
1296
1296
  }();
1297
1297
 
1298
- /** @Internal */ var SceneParser = /*#__PURE__*/ function(HierarchyParser1) {
1299
- _inherits(SceneParser, HierarchyParser1);
1298
+ /** @Internal */ var SceneParser = /*#__PURE__*/ function(HierarchyParser) {
1299
+ _inherits(SceneParser, HierarchyParser);
1300
1300
  function SceneParser(data, context, scene) {
1301
1301
  var _this;
1302
- _this = HierarchyParser1.call(this, data, context) || this;
1303
- _this.scene = scene;
1302
+ _this = HierarchyParser.call(this, data, context) || this, _this.scene = scene;
1304
1303
  return _this;
1305
1304
  }
1306
1305
  var _proto = SceneParser.prototype;
@@ -1319,7 +1318,7 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1319
1318
  * @returns a promise of scene
1320
1319
  */ SceneParser.parse = function parse(engine, sceneData) {
1321
1320
  var scene = new engineCore.Scene(engine);
1322
- var context = new ParserContext(engine, exports.ParserType.Scene, scene);
1321
+ var context = new ParserContext(engine, ParserType.Scene, scene);
1323
1322
  var parser = new SceneParser(sceneData, context, scene);
1324
1323
  parser.start();
1325
1324
  return parser.promise.then(function() {
@@ -1329,10 +1328,10 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1329
1328
  return SceneParser;
1330
1329
  }(HierarchyParser);
1331
1330
 
1332
- exports.EditorTextureLoader = /*#__PURE__*/ function(Loader1) {
1333
- _inherits(EditorTextureLoader, Loader1);
1331
+ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader) {
1332
+ _inherits(EditorTextureLoader, Loader);
1334
1333
  function EditorTextureLoader() {
1335
- return Loader1.apply(this, arguments);
1334
+ return Loader.apply(this, arguments) || this;
1336
1335
  }
1337
1336
  var _proto = EditorTextureLoader.prototype;
1338
1337
  _proto.load = function load(item, resourceManager) {
@@ -1369,10 +1368,10 @@ exports.EditorTextureLoader = __decorate([
1369
1368
  });
1370
1369
  }
1371
1370
 
1372
- var AnimationClipLoader = /*#__PURE__*/ function(Loader1) {
1373
- _inherits(AnimationClipLoader, Loader1);
1371
+ var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
1372
+ _inherits(AnimationClipLoader, Loader);
1374
1373
  function AnimationClipLoader() {
1375
- return Loader1.apply(this, arguments);
1374
+ return Loader.apply(this, arguments) || this;
1376
1375
  }
1377
1376
  var _proto = AnimationClipLoader.prototype;
1378
1377
  _proto.load = function load(item, resourceManager) {
@@ -1400,9 +1399,8 @@ var AnimationClipLoader = /*#__PURE__*/ function(Loader1) {
1400
1399
  });
1401
1400
  };
1402
1401
  _proto._parseKeyframeValue = function _parseKeyframeValue(keyframe, resourceManager) {
1403
- var _value;
1404
1402
  var value = keyframe.value;
1405
- if (typeof value === "object" && ((_value = value) == null ? void 0 : _value.refId)) {
1403
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && (value == null ? void 0 : value.refId)) {
1406
1404
  return new Promise(function(resolve) {
1407
1405
  resourceManager// @ts-ignore
1408
1406
  .getResourceByRef(value).then(function(asset) {
@@ -1425,7 +1423,7 @@ AnimationClipLoader = __decorate([
1425
1423
  var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1426
1424
  _inherits(AnimatorControllerLoader, Loader1);
1427
1425
  function AnimatorControllerLoader() {
1428
- return Loader1.apply(this, arguments);
1426
+ return Loader1.apply(this, arguments) || this;
1429
1427
  }
1430
1428
  var _proto = AnimatorControllerLoader.prototype;
1431
1429
  _proto.load = function load(item, resourceManager) {
@@ -1493,7 +1491,11 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1493
1491
  animatorController.addLayer(layer);
1494
1492
  });
1495
1493
  parameters.forEach(function(parameterData) {
1496
- animatorController.addParameter(parameterData.name, parameterData.defaultValue);
1494
+ if (parameterData.isTrigger) {
1495
+ animatorController.addTriggerParameter(parameterData.name);
1496
+ } else {
1497
+ animatorController.addParameter(parameterData.name, parameterData.defaultValue);
1498
+ }
1497
1499
  });
1498
1500
  Promise.all(promises).then(function(clipData) {
1499
1501
  clipData.forEach(function(data) {
@@ -1507,6 +1509,8 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1507
1509
  };
1508
1510
  _proto._createTransition = function _createTransition(transitionData, destinationState) {
1509
1511
  var transition = new engineCore.AnimatorStateTransition();
1512
+ transition.hasExitTime = transitionData.hasExitTime;
1513
+ transition.isFixedDuration = transitionData.isFixedDuration;
1510
1514
  transition.duration = transitionData.duration;
1511
1515
  transition.offset = transitionData.offset;
1512
1516
  transition.exitTime = transitionData.exitTime;
@@ -1516,7 +1520,7 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1516
1520
  transition._isExit = transitionData.isExit;
1517
1521
  transition.destinationState = destinationState;
1518
1522
  transitionData.conditions.forEach(function(conditionData) {
1519
- transition.addCondition(conditionData.mode, conditionData.parameterName, conditionData.threshold);
1523
+ transition.addCondition(conditionData.parameterName, conditionData.mode, conditionData.threshold);
1520
1524
  });
1521
1525
  return transition;
1522
1526
  };
@@ -1531,10 +1535,10 @@ AnimatorControllerLoader = __decorate([
1531
1535
  function isBase64(url) {
1532
1536
  return /^data:(.+?);base64,/.test(url);
1533
1537
  }
1534
- var BufferLoader = /*#__PURE__*/ function(Loader1) {
1535
- _inherits(BufferLoader, Loader1);
1538
+ var BufferLoader = /*#__PURE__*/ function(Loader) {
1539
+ _inherits(BufferLoader, Loader);
1536
1540
  function BufferLoader() {
1537
- return Loader1.apply(this, arguments);
1541
+ return Loader.apply(this, arguments) || this;
1538
1542
  }
1539
1543
  var _proto = BufferLoader.prototype;
1540
1544
  _proto.load = function load(item, resourceManager) {
@@ -1562,10 +1566,10 @@ BufferLoader = __decorate([
1562
1566
  ], false)
1563
1567
  ], BufferLoader);
1564
1568
 
1565
- var EnvLoader = /*#__PURE__*/ function(Loader1) {
1566
- _inherits(EnvLoader, Loader1);
1569
+ var EnvLoader = /*#__PURE__*/ function(Loader) {
1570
+ _inherits(EnvLoader, Loader);
1567
1571
  function EnvLoader() {
1568
- return Loader1.apply(this, arguments);
1572
+ return Loader.apply(this, arguments) || this;
1569
1573
  }
1570
1574
  var _proto = EnvLoader.prototype;
1571
1575
  _proto.load = function load(item, resourceManager) {
@@ -1644,10 +1648,10 @@ function _async_to_generator(fn) {
1644
1648
  };
1645
1649
  }
1646
1650
 
1647
- var FontLoader = /*#__PURE__*/ function(Loader1) {
1648
- _inherits(FontLoader, Loader1);
1651
+ var FontLoader = /*#__PURE__*/ function(Loader) {
1652
+ _inherits(FontLoader, Loader);
1649
1653
  function FontLoader() {
1650
- return Loader1.apply(this, arguments);
1654
+ return Loader.apply(this, arguments) || this;
1651
1655
  }
1652
1656
  var _proto = FontLoader.prototype;
1653
1657
  _proto.load = function load(item, resourceManager) {
@@ -1705,11 +1709,11 @@ FontLoader = __decorate([
1705
1709
 
1706
1710
  /**
1707
1711
  * The glTF resource.
1708
- */ var GLTFResource = /*#__PURE__*/ function(ReferResource1) {
1709
- _inherits(GLTFResource, ReferResource1);
1712
+ */ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
1713
+ _inherits(GLTFResource, ReferResource);
1710
1714
  function GLTFResource(engine, url) {
1711
1715
  var _this;
1712
- _this = ReferResource1.call(this, engine) || this;
1716
+ _this = ReferResource.call(this, engine) || this;
1713
1717
  _this.url = url;
1714
1718
  return _this;
1715
1719
  }
@@ -1723,7 +1727,7 @@ FontLoader = __decorate([
1723
1727
  return sceneRoot.clone();
1724
1728
  };
1725
1729
  _proto._onDestroy = function _onDestroy() {
1726
- ReferResource1.prototype._onDestroy.call(this);
1730
+ ReferResource.prototype._onDestroy.call(this);
1727
1731
  var _this = this, textures = _this.textures, materials = _this.materials, meshes = _this.meshes;
1728
1732
  textures && this._disassociationSuperResource(textures);
1729
1733
  materials && this._disassociationSuperResource(materials);
@@ -1772,150 +1776,159 @@ FontLoader = __decorate([
1772
1776
 
1773
1777
  /**
1774
1778
  * Module for glTF 2.0 Interface
1775
- */ var AccessorComponentType;
1776
- (function(AccessorComponentType) {
1777
- AccessorComponentType[AccessorComponentType[/**
1779
+ */ /**
1780
+ * The datatype of the components in the attribute
1781
+ */ var AccessorComponentType = /*#__PURE__*/ function(AccessorComponentType) {
1782
+ /**
1778
1783
  * Byte
1779
- */ "BYTE"] = 5120] = "BYTE";
1780
- AccessorComponentType[AccessorComponentType[/**
1784
+ */ AccessorComponentType[AccessorComponentType["BYTE"] = 5120] = "BYTE";
1785
+ /**
1781
1786
  * Unsigned Byte
1782
- */ "UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
1783
- AccessorComponentType[AccessorComponentType[/**
1787
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
1788
+ /**
1784
1789
  * Short
1785
- */ "SHORT"] = 5122] = "SHORT";
1786
- AccessorComponentType[AccessorComponentType[/**
1790
+ */ AccessorComponentType[AccessorComponentType["SHORT"] = 5122] = "SHORT";
1791
+ /**
1787
1792
  * Unsigned Short
1788
- */ "UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
1789
- AccessorComponentType[AccessorComponentType[/**
1793
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
1794
+ /**
1790
1795
  * Unsigned Int
1791
- */ "UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
1792
- AccessorComponentType[AccessorComponentType[/**
1796
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
1797
+ /**
1793
1798
  * Float
1794
- */ "FLOAT"] = 5126] = "FLOAT";
1795
- })(AccessorComponentType || (AccessorComponentType = {}));
1796
- exports.AccessorType = void 0;
1797
- (function(AccessorType) {
1798
- AccessorType[/**
1799
+ */ AccessorComponentType[AccessorComponentType["FLOAT"] = 5126] = "FLOAT";
1800
+ return AccessorComponentType;
1801
+ }({});
1802
+ /**
1803
+ * Specifies if the attirbute is a scalar, vector, or matrix
1804
+ */ var AccessorType = /*#__PURE__*/ function(AccessorType) {
1805
+ /**
1799
1806
  * Scalar
1800
- */ "SCALAR"] = "SCALAR";
1801
- AccessorType[/**
1807
+ */ AccessorType["SCALAR"] = "SCALAR";
1808
+ /**
1802
1809
  * Vector2
1803
- */ "VEC2"] = "VEC2";
1804
- AccessorType[/**
1810
+ */ AccessorType["VEC2"] = "VEC2";
1811
+ /**
1805
1812
  * Vector3
1806
- */ "VEC3"] = "VEC3";
1807
- AccessorType[/**
1813
+ */ AccessorType["VEC3"] = "VEC3";
1814
+ /**
1808
1815
  * Vector4
1809
- */ "VEC4"] = "VEC4";
1810
- AccessorType[/**
1816
+ */ AccessorType["VEC4"] = "VEC4";
1817
+ /**
1811
1818
  * Matrix2x2
1812
- */ "MAT2"] = "MAT2";
1813
- AccessorType[/**
1819
+ */ AccessorType["MAT2"] = "MAT2";
1820
+ /**
1814
1821
  * Matrix3x3
1815
- */ "MAT3"] = "MAT3";
1816
- AccessorType[/**
1822
+ */ AccessorType["MAT3"] = "MAT3";
1823
+ /**
1817
1824
  * Matrix4x4
1818
- */ "MAT4"] = "MAT4";
1819
- })(exports.AccessorType || (exports.AccessorType = {}));
1820
- var AnimationChannelTargetPath;
1821
- (function(AnimationChannelTargetPath) {
1822
- AnimationChannelTargetPath[/**
1825
+ */ AccessorType["MAT4"] = "MAT4";
1826
+ return AccessorType;
1827
+ }({});
1828
+ /**
1829
+ * The name of the node's TRS property to modify, or the weights of the Morph Targets it instantiates
1830
+ */ var AnimationChannelTargetPath = /*#__PURE__*/ function(AnimationChannelTargetPath) {
1831
+ /**
1823
1832
  * Translation
1824
- */ "TRANSLATION"] = "translation";
1825
- AnimationChannelTargetPath[/**
1833
+ */ AnimationChannelTargetPath["TRANSLATION"] = "translation";
1834
+ /**
1826
1835
  * Rotation
1827
- */ "ROTATION"] = "rotation";
1828
- AnimationChannelTargetPath[/**
1836
+ */ AnimationChannelTargetPath["ROTATION"] = "rotation";
1837
+ /**
1829
1838
  * Scale
1830
- */ "SCALE"] = "scale";
1831
- AnimationChannelTargetPath[/**
1839
+ */ AnimationChannelTargetPath["SCALE"] = "scale";
1840
+ /**
1832
1841
  * Weights
1833
- */ "WEIGHTS"] = "weights";
1834
- })(AnimationChannelTargetPath || (AnimationChannelTargetPath = {}));
1835
- var AnimationSamplerInterpolation;
1836
- (function(AnimationSamplerInterpolation) {
1837
- AnimationSamplerInterpolation[/**
1842
+ */ AnimationChannelTargetPath["WEIGHTS"] = "weights";
1843
+ return AnimationChannelTargetPath;
1844
+ }({});
1845
+ /**
1846
+ * Interpolation algorithm
1847
+ */ var AnimationSamplerInterpolation = /*#__PURE__*/ function(AnimationSamplerInterpolation) {
1848
+ /**
1838
1849
  * The animated values are linearly interpolated between keyframes
1839
- */ "Linear"] = "LINEAR";
1840
- AnimationSamplerInterpolation[/**
1850
+ */ AnimationSamplerInterpolation["Linear"] = "LINEAR";
1851
+ /**
1841
1852
  * The animated values remain constant to the output of the first keyframe, until the next keyframe
1842
- */ "Step"] = "STEP";
1843
- AnimationSamplerInterpolation[/**
1853
+ */ AnimationSamplerInterpolation["Step"] = "STEP";
1854
+ /**
1844
1855
  * The animation's interpolation is computed using a cubic spline with specified tangents
1845
- */ "CubicSpine"] = "CUBICSPLINE";
1846
- })(AnimationSamplerInterpolation || (AnimationSamplerInterpolation = {}));
1847
- var CameraType;
1848
- (function(CameraType) {
1849
- CameraType[/**
1856
+ */ AnimationSamplerInterpolation["CubicSpine"] = "CUBICSPLINE";
1857
+ return AnimationSamplerInterpolation;
1858
+ }({});
1859
+ /**
1860
+ * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene
1861
+ */ var CameraType = /*#__PURE__*/ function(CameraType) {
1862
+ /**
1850
1863
  * A perspective camera containing properties to create a perspective projection matrix
1851
- */ "PERSPECTIVE"] = "perspective";
1852
- CameraType[/**
1864
+ */ CameraType["PERSPECTIVE"] = "perspective";
1865
+ /**
1853
1866
  * An orthographic camera containing properties to create an orthographic projection matrix
1854
- */ "ORTHOGRAPHIC"] = "orthographic";
1855
- })(CameraType || (CameraType = {}));
1856
- var ImageMimeType;
1857
- (function(ImageMimeType) {
1858
- ImageMimeType[/**
1859
- * JPEG Mime-type
1860
- */ "JPEG"] = "image/jpeg";
1861
- ImageMimeType[/**
1862
- * PNG Mime-type
1863
- */ "PNG"] = "image/png";
1864
- })(ImageMimeType || (ImageMimeType = {}));
1865
- var MaterialAlphaMode;
1866
- (function(MaterialAlphaMode) {
1867
- MaterialAlphaMode[/**
1867
+ */ CameraType["ORTHOGRAPHIC"] = "orthographic";
1868
+ return CameraType;
1869
+ }({});
1870
+ /**
1871
+ * The alpha rendering mode of the material
1872
+ */ var MaterialAlphaMode = /*#__PURE__*/ function(MaterialAlphaMode) {
1873
+ /**
1868
1874
  * The alpha value is ignored and the rendered output is fully opaque
1869
- */ "OPAQUE"] = "OPAQUE";
1870
- MaterialAlphaMode[/**
1875
+ */ MaterialAlphaMode["OPAQUE"] = "OPAQUE";
1876
+ /**
1871
1877
  * The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value
1872
- */ "MASK"] = "MASK";
1873
- MaterialAlphaMode[/**
1878
+ */ MaterialAlphaMode["MASK"] = "MASK";
1879
+ /**
1874
1880
  * The alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator)
1875
- */ "BLEND"] = "BLEND";
1876
- })(MaterialAlphaMode || (MaterialAlphaMode = {}));
1877
- var TextureMagFilter;
1878
- (function(TextureMagFilter) {
1879
- TextureMagFilter[TextureMagFilter[/**
1881
+ */ MaterialAlphaMode["BLEND"] = "BLEND";
1882
+ return MaterialAlphaMode;
1883
+ }({});
1884
+ /**
1885
+ * Magnification filter. Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR)
1886
+ */ var TextureMagFilter = /*#__PURE__*/ function(TextureMagFilter) {
1887
+ /**
1880
1888
  * Nearest
1881
- */ "NEAREST"] = 9728] = "NEAREST";
1882
- TextureMagFilter[TextureMagFilter[/**
1889
+ */ TextureMagFilter[TextureMagFilter["NEAREST"] = 9728] = "NEAREST";
1890
+ /**
1883
1891
  * Linear
1884
- */ "LINEAR"] = 9729] = "LINEAR";
1885
- })(TextureMagFilter || (TextureMagFilter = {}));
1886
- var TextureMinFilter;
1887
- (function(TextureMinFilter) {
1888
- TextureMinFilter[TextureMinFilter[/**
1892
+ */ TextureMagFilter[TextureMagFilter["LINEAR"] = 9729] = "LINEAR";
1893
+ return TextureMagFilter;
1894
+ }({});
1895
+ /**
1896
+ * Minification filter. All valid values correspond to WebGL enums
1897
+ */ var TextureMinFilter = /*#__PURE__*/ function(TextureMinFilter) {
1898
+ /**
1889
1899
  * Nearest
1890
- */ "NEAREST"] = 9728] = "NEAREST";
1891
- TextureMinFilter[TextureMinFilter[/**
1900
+ */ TextureMinFilter[TextureMinFilter["NEAREST"] = 9728] = "NEAREST";
1901
+ /**
1892
1902
  * Linear
1893
- */ "LINEAR"] = 9729] = "LINEAR";
1894
- TextureMinFilter[TextureMinFilter[/**
1903
+ */ TextureMinFilter[TextureMinFilter["LINEAR"] = 9729] = "LINEAR";
1904
+ /**
1895
1905
  * Nearest Mip-Map Nearest
1896
- */ "NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
1897
- TextureMinFilter[TextureMinFilter[/**
1906
+ */ TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
1907
+ /**
1898
1908
  * Linear Mipmap Nearest
1899
- */ "LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
1900
- TextureMinFilter[TextureMinFilter[/**
1909
+ */ TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
1910
+ /**
1901
1911
  * Nearest Mipmap Linear
1902
- */ "NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
1903
- TextureMinFilter[TextureMinFilter[/**
1912
+ */ TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
1913
+ /**
1904
1914
  * Linear Mipmap Linear
1905
- */ "LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
1906
- })(TextureMinFilter || (TextureMinFilter = {}));
1907
- var TextureWrapMode;
1908
- (function(TextureWrapMode) {
1909
- TextureWrapMode[TextureWrapMode[/**
1915
+ */ TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
1916
+ return TextureMinFilter;
1917
+ }({});
1918
+ /**
1919
+ * S (U) wrapping mode. All valid values correspond to WebGL enums
1920
+ */ var TextureWrapMode = /*#__PURE__*/ function(TextureWrapMode) {
1921
+ /**
1910
1922
  * Clamp to Edge
1911
- */ "CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
1912
- TextureWrapMode[TextureWrapMode[/**
1923
+ */ TextureWrapMode[TextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
1924
+ /**
1913
1925
  * Mirrored Repeat
1914
- */ "MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
1915
- TextureWrapMode[TextureWrapMode[/**
1926
+ */ TextureWrapMode[TextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
1927
+ /**
1916
1928
  * Repeat
1917
- */ "REPEAT"] = 10497] = "REPEAT";
1918
- })(TextureWrapMode || (TextureWrapMode = {}));
1929
+ */ TextureWrapMode[TextureWrapMode["REPEAT"] = 10497] = "REPEAT";
1930
+ return TextureWrapMode;
1931
+ }({});
1919
1932
 
1920
1933
  /**
1921
1934
  * @internal
@@ -2060,9 +2073,7 @@ var TextureWrapMode;
2060
2073
  };
2061
2074
  return GLTFParserContext;
2062
2075
  }();
2063
- (function() {
2064
- GLTFParserContext._parsers = {};
2065
- })();
2076
+ GLTFParserContext._parsers = {};
2066
2077
  /**
2067
2078
  * @internal
2068
2079
  */ var BufferInfo = function BufferInfo(data, interleaved, stride) {
@@ -2071,8 +2082,7 @@ var TextureWrapMode;
2071
2082
  this.stride = stride;
2072
2083
  this.vertexBindingInfos = {};
2073
2084
  };
2074
- exports.GLTFParserType = void 0;
2075
- (function(GLTFParserType) {
2085
+ var GLTFParserType = /*#__PURE__*/ function(GLTFParserType) {
2076
2086
  GLTFParserType[GLTFParserType["Schema"] = 0] = "Schema";
2077
2087
  GLTFParserType[GLTFParserType["Validator"] = 1] = "Validator";
2078
2088
  GLTFParserType[GLTFParserType["Scene"] = 2] = "Scene";
@@ -2085,9 +2095,10 @@ exports.GLTFParserType = void 0;
2085
2095
  GLTFParserType[GLTFParserType["Skin"] = 9] = "Skin";
2086
2096
  GLTFParserType[GLTFParserType["Animation"] = 10] = "Animation";
2087
2097
  GLTFParserType[GLTFParserType["AnimatorController"] = 11] = "AnimatorController";
2088
- })(exports.GLTFParserType || (exports.GLTFParserType = {}));
2089
- var _obj;
2090
- var glTFSchemaMap = (_obj = {}, _obj[2] = "scenes", _obj[3] = "buffers", _obj[5] = "textures", _obj[6] = "materials", _obj[7] = "meshes", _obj[8] = "nodes", _obj[9] = "skins", _obj[10] = "animations", _obj[4] = "bufferViews", _obj);
2098
+ return GLTFParserType;
2099
+ }({});
2100
+ var _obj$3;
2101
+ var glTFSchemaMap = (_obj$3 = {}, _obj$3[2] = "scenes", _obj$3[3] = "buffers", _obj$3[5] = "textures", _obj$3[6] = "materials", _obj$3[7] = "meshes", _obj$3[8] = "nodes", _obj$3[9] = "skins", _obj$3[10] = "animations", _obj$3[4] = "bufferViews", _obj$3);
2091
2102
  var _obj1;
2092
2103
  var glTFResourceMap = (_obj1 = {}, _obj1[2] = "_sceneRoots", _obj1[5] = "textures", _obj1[6] = "materials", _obj1[7] = "meshes", _obj1[8] = "entities", _obj1[9] = "skins", _obj1[10] = "animations", _obj1[11] = "animatorController", _obj1);
2093
2104
  function registerGLTFParser(pipeline) {
@@ -2143,19 +2154,19 @@ function registerGLTFParser(pipeline) {
2143
2154
  * Get the number of bytes occupied by accessor type.
2144
2155
  */ GLTFUtils.getAccessorTypeSize = function getAccessorTypeSize(accessorType) {
2145
2156
  switch(accessorType){
2146
- case exports.AccessorType.SCALAR:
2157
+ case AccessorType.SCALAR:
2147
2158
  return 1;
2148
- case exports.AccessorType.VEC2:
2159
+ case AccessorType.VEC2:
2149
2160
  return 2;
2150
- case exports.AccessorType.VEC3:
2161
+ case AccessorType.VEC3:
2151
2162
  return 3;
2152
- case exports.AccessorType.VEC4:
2163
+ case AccessorType.VEC4:
2153
2164
  return 4;
2154
- case exports.AccessorType.MAT2:
2165
+ case AccessorType.MAT2:
2155
2166
  return 4;
2156
- case exports.AccessorType.MAT3:
2167
+ case AccessorType.MAT3:
2157
2168
  return 9;
2158
- case exports.AccessorType.MAT4:
2169
+ case AccessorType.MAT4:
2159
2170
  return 16;
2160
2171
  }
2161
2172
  };
@@ -2203,7 +2214,7 @@ function registerGLTFParser(pipeline) {
2203
2214
  if (accessor.bufferView !== undefined) {
2204
2215
  var bufferViewIndex = accessor.bufferView;
2205
2216
  var bufferView = bufferViews[bufferViewIndex];
2206
- promise = context.get(exports.GLTFParserType.BufferView, accessor.bufferView).then(function(bufferViewData) {
2217
+ promise = context.get(GLTFParserType.BufferView, accessor.bufferView).then(function(bufferViewData) {
2207
2218
  var bufferIndex = bufferView.buffer;
2208
2219
  var _bufferViewData_byteOffset;
2209
2220
  var bufferByteOffset = (_bufferViewData_byteOffset = bufferViewData.byteOffset) != null ? _bufferViewData_byteOffset : 0;
@@ -2274,8 +2285,8 @@ function registerGLTFParser(pipeline) {
2274
2285
  var indicesBufferView = bufferViews[indices.bufferView];
2275
2286
  var valuesBufferView = bufferViews[values.bufferView];
2276
2287
  return Promise.all([
2277
- context.get(exports.GLTFParserType.BufferView, indices.bufferView),
2278
- context.get(exports.GLTFParserType.BufferView, values.bufferView)
2288
+ context.get(GLTFParserType.BufferView, indices.bufferView),
2289
+ context.get(GLTFParserType.BufferView, values.bufferView)
2279
2290
  ]).then(function(param) {
2280
2291
  var indicesUint8Array = param[0], valuesUin8Array = param[1];
2281
2292
  var _indices_byteOffset, _indicesUint8Array_byteOffset;
@@ -2480,23 +2491,13 @@ function registerGLTFParser(pipeline) {
2480
2491
  return GLTFUtils;
2481
2492
  }();
2482
2493
 
2483
- var DFDTransferFunction;
2484
- (function(DFDTransferFunction) {
2485
- DFDTransferFunction[DFDTransferFunction["linear"] = 1] = "linear";
2486
- DFDTransferFunction[DFDTransferFunction["sRGB"] = 2] = "sRGB";
2487
- })(DFDTransferFunction || (DFDTransferFunction = {}));
2488
- var ColorModel;
2489
- (function(ColorModel) {
2490
- ColorModel[ColorModel["ETC1S"] = 163] = "ETC1S";
2491
- ColorModel[ColorModel["UASTC"] = 166] = "UASTC";
2492
- })(ColorModel || (ColorModel = {}));
2493
- var SupercompressionScheme;
2494
- (function(SupercompressionScheme) {
2494
+ var SupercompressionScheme = /*#__PURE__*/ function(SupercompressionScheme) {
2495
2495
  SupercompressionScheme[SupercompressionScheme["None"] = 0] = "None";
2496
2496
  SupercompressionScheme[SupercompressionScheme["BasisLZ"] = 1] = "BasisLZ";
2497
2497
  SupercompressionScheme[SupercompressionScheme["Zstd"] = 2] = "Zstd";
2498
2498
  SupercompressionScheme[SupercompressionScheme["ZLib"] = 3] = "ZLib";
2499
- })(SupercompressionScheme || (SupercompressionScheme = {}));
2499
+ return SupercompressionScheme;
2500
+ }({});
2500
2501
  /** @internal */ var KTX2Container = /*#__PURE__*/ function() {
2501
2502
  function KTX2Container(buffer) {
2502
2503
  this.vkFormat = 0;
@@ -2666,17 +2667,17 @@ var SupercompressionScheme;
2666
2667
 
2667
2668
  /**
2668
2669
  * KTX2 transcode target format.
2669
- */ exports.KTX2TargetFormat = void 0;
2670
- (function(KTX2TargetFormat) {
2671
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "ASTC"] = 0] = "ASTC";
2672
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "BC7"] = 1] = "BC7";
2673
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 4 bits per pixel if no alpha channel, 8 bits per pixel if has alpha channel. */ "BC1_BC3"] = 2] = "BC1_BC3";
2674
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 4 bits per pixel. */ "PVRTC"] = 3] = "PVRTC";
2675
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 4 bits per pixel if no alpha channel, 8 bits per pixel if has alpha channel. */ "ETC"] = 4] = "ETC";
2676
- KTX2TargetFormat[KTX2TargetFormat[/** R format, 8 bits per pixel. */ "R8"] = 5] = "R8";
2677
- KTX2TargetFormat[KTX2TargetFormat[/** RG format, 16 bits per pixel. */ "R8G8"] = 6] = "R8G8";
2678
- KTX2TargetFormat[KTX2TargetFormat[/** RGBA format, 32 bits per pixel. */ "R8G8B8A8"] = 7] = "R8G8B8A8";
2679
- })(exports.KTX2TargetFormat || (exports.KTX2TargetFormat = {}));
2670
+ */ var KTX2TargetFormat = /*#__PURE__*/ function(KTX2TargetFormat) {
2671
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ KTX2TargetFormat[KTX2TargetFormat["ASTC"] = 0] = "ASTC";
2672
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ KTX2TargetFormat[KTX2TargetFormat["BC7"] = 1] = "BC7";
2673
+ /** RGB(A) compressed format, 4 bits per pixel if no alpha channel, 8 bits per pixel if has alpha channel. */ KTX2TargetFormat[KTX2TargetFormat["BC1_BC3"] = 2] = "BC1_BC3";
2674
+ /** RGB(A) compressed format, 4 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["PVRTC"] = 3] = "PVRTC";
2675
+ /** RGB(A) compressed format, 4 bits per pixel if no alpha channel, 8 bits per pixel if has alpha channel. */ KTX2TargetFormat[KTX2TargetFormat["ETC"] = 4] = "ETC";
2676
+ /** R format, 8 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8"] = 5] = "R8";
2677
+ /** RG format, 16 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8G8"] = 6] = "R8G8";
2678
+ /** RGBA format, 32 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8G8B8A8"] = 7] = "R8G8B8A8";
2679
+ return KTX2TargetFormat;
2680
+ }({});
2680
2681
 
2681
2682
  /**
2682
2683
  * @internal
@@ -2890,7 +2891,7 @@ var _init = function init() {
2890
2891
  };
2891
2892
  var init = _init();
2892
2893
  function transcode(buffer, targetFormat, KTX2File) {
2893
- var getTranscodeFormatFromTarget = function getTranscodeFormatFromTarget(target, hasAlpha) {
2894
+ function getTranscodeFormatFromTarget(target, hasAlpha) {
2894
2895
  switch(target){
2895
2896
  case 2:
2896
2897
  return hasAlpha ? 3 : 2;
@@ -2905,8 +2906,8 @@ function transcode(buffer, targetFormat, KTX2File) {
2905
2906
  case 1:
2906
2907
  return 7;
2907
2908
  }
2908
- };
2909
- var concat = function concat(arrays) {
2909
+ }
2910
+ function concat(arrays) {
2910
2911
  if (arrays.length === 1) return arrays[0];
2911
2912
  var totalByteLength = 0;
2912
2913
  for(var i = 0; i < arrays.length; i++){
@@ -2919,37 +2920,12 @@ function transcode(buffer, targetFormat, KTX2File) {
2919
2920
  byteOffset += arrays[i1].byteLength;
2920
2921
  }
2921
2922
  return result;
2922
- };
2923
- var cleanup = function cleanup() {
2923
+ }
2924
+ var ktx2File = new KTX2File(new Uint8Array(buffer));
2925
+ function cleanup() {
2924
2926
  ktx2File.close();
2925
2927
  ktx2File.delete();
2926
- };
2927
- var BasisFormat;
2928
- (function(BasisFormat) {
2929
- BasisFormat[BasisFormat["ETC1"] = 0] = "ETC1";
2930
- BasisFormat[BasisFormat["ETC2"] = 1] = "ETC2";
2931
- BasisFormat[BasisFormat["BC1"] = 2] = "BC1";
2932
- BasisFormat[BasisFormat["BC3"] = 3] = "BC3";
2933
- BasisFormat[BasisFormat["BC4"] = 4] = "BC4";
2934
- BasisFormat[BasisFormat["BC5"] = 5] = "BC5";
2935
- BasisFormat[BasisFormat["BC7"] = 7] = "BC7";
2936
- BasisFormat[BasisFormat["PVRTC1_4_RGB"] = 8] = "PVRTC1_4_RGB";
2937
- BasisFormat[BasisFormat["PVRTC1_4_RGBA"] = 9] = "PVRTC1_4_RGBA";
2938
- BasisFormat[BasisFormat["ASTC_4x4"] = 10] = "ASTC_4x4";
2939
- BasisFormat[BasisFormat["RGBA8"] = 13] = "RGBA8";
2940
- })(BasisFormat || (BasisFormat = {}));
2941
- var TargetFormat;
2942
- (function(TargetFormat) {
2943
- TargetFormat[TargetFormat["ASTC"] = 0] = "ASTC";
2944
- TargetFormat[TargetFormat["BC7"] = 1] = "BC7";
2945
- TargetFormat[TargetFormat["BC1_BC3"] = 2] = "BC1_BC3";
2946
- TargetFormat[TargetFormat["PVRTC"] = 3] = "PVRTC";
2947
- TargetFormat[TargetFormat["ETC"] = 4] = "ETC";
2948
- TargetFormat[TargetFormat["R8"] = 5] = "R8";
2949
- TargetFormat[TargetFormat["RG8"] = 6] = "RG8";
2950
- TargetFormat[TargetFormat["RGBA8"] = 7] = "RGBA8";
2951
- })(TargetFormat || (TargetFormat = {}));
2952
- var ktx2File = new KTX2File(new Uint8Array(buffer));
2928
+ }
2953
2929
  if (!ktx2File.isValid()) {
2954
2930
  cleanup();
2955
2931
  throw new Error("Invalid or unsupported .ktx2 file");
@@ -3010,10 +2986,10 @@ function transcode(buffer, targetFormat, KTX2File) {
3010
2986
  };
3011
2987
  }
3012
2988
 
3013
- /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
3014
- _inherits(BinomialLLCTranscoder, AbstractTranscoder1);
2989
+ /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
2990
+ _inherits(BinomialLLCTranscoder, AbstractTranscoder);
3015
2991
  function BinomialLLCTranscoder(workerLimitCount) {
3016
- return AbstractTranscoder1.call(this, workerLimitCount);
2992
+ return AbstractTranscoder.call(this, workerLimitCount) || this;
3017
2993
  }
3018
2994
  var _proto = BinomialLLCTranscoder.prototype;
3019
2995
  _proto._initTranscodeWorkerPool = function _initTranscodeWorkerPool() {
@@ -3075,7 +3051,60 @@ function transcode(buffer, targetFormat, KTX2File) {
3075
3051
  }(AbstractTranscoder);
3076
3052
 
3077
3053
  function TranscodeWorkerCode() {
3078
- var transcodeASTCAndBC7 = function transcodeASTCAndBC7(wasmTranscoder, compressedData, width, height) {
3054
+ var wasmPromise;
3055
+ /**
3056
+ * ZSTD (Zstandard) decoder.
3057
+ */ var ZSTDDecoder = /*#__PURE__*/ function() {
3058
+ function ZSTDDecoder() {}
3059
+ var _proto = ZSTDDecoder.prototype;
3060
+ _proto.init = function init() {
3061
+ if (!this._initPromise) {
3062
+ this._initPromise = fetch(ZSTDDecoder.WasmModuleURL).then(function(response) {
3063
+ if (response.ok) {
3064
+ return response.arrayBuffer();
3065
+ }
3066
+ throw new Error("Could not fetch the wasm component for the Zstandard decompression lib: " + response.status + " - " + response.statusText);
3067
+ }).then(function(arrayBuffer) {
3068
+ return WebAssembly.instantiate(arrayBuffer, ZSTDDecoder.IMPORT_OBJECT);
3069
+ }).then(this._init);
3070
+ }
3071
+ return this._initPromise;
3072
+ };
3073
+ _proto._init = function _init(result) {
3074
+ ZSTDDecoder.instance = result.instance;
3075
+ ZSTDDecoder.IMPORT_OBJECT.env.emscripten_notify_memory_growth(); // initialize heap.
3076
+ };
3077
+ _proto.decode = function decode(array, uncompressedSize) {
3078
+ if (uncompressedSize === void 0) uncompressedSize = 0;
3079
+ if (!ZSTDDecoder.instance) {
3080
+ throw new Error("ZSTDDecoder: Await .init() before decoding.");
3081
+ }
3082
+ var exports = ZSTDDecoder.instance.exports;
3083
+ // Write compressed data into WASM memory
3084
+ var compressedSize = array.byteLength;
3085
+ var compressedPtr = exports.malloc(compressedSize);
3086
+ ZSTDDecoder.heap.set(array, compressedPtr);
3087
+ // Decompress into WASM memory
3088
+ uncompressedSize = uncompressedSize || Number(exports.ZSTD_findDecompressedSize(compressedPtr, compressedSize));
3089
+ var uncompressedPtr = exports.malloc(uncompressedSize);
3090
+ var actualSize = exports.ZSTD_decompress(uncompressedPtr, uncompressedSize, compressedPtr, compressedSize);
3091
+ // Read decompressed data and free WASM memory
3092
+ var dec = ZSTDDecoder.heap.slice(uncompressedPtr, uncompressedPtr + actualSize);
3093
+ exports.free(compressedPtr);
3094
+ exports.free(uncompressedPtr);
3095
+ return dec;
3096
+ };
3097
+ return ZSTDDecoder;
3098
+ }();
3099
+ ZSTDDecoder.IMPORT_OBJECT = {
3100
+ env: {
3101
+ emscripten_notify_memory_growth: function emscripten_notify_memory_growth() {
3102
+ ZSTDDecoder.heap = new Uint8Array(ZSTDDecoder.instance.exports.memory.buffer);
3103
+ }
3104
+ }
3105
+ };
3106
+ ZSTDDecoder.WasmModuleURL = "https://mdn.alipayobjects.com/rms/afts/file/A*awNJR7KqIAEAAAAAAAAAAAAAARQnAQ/zstddec.wasm";
3107
+ function transcodeASTCAndBC7(wasmTranscoder, compressedData, width, height) {
3079
3108
  var nBlocks = (width + 3 >> 2) * (height + 3 >> 2);
3080
3109
  var texMemoryPages = nBlocks * 16 + 65535 >> 16;
3081
3110
  var memory = wasmTranscoder.memory;
@@ -3084,8 +3113,8 @@ function TranscodeWorkerCode() {
3084
3113
  var textureView = new Uint8Array(memory.buffer, 65536, nBlocks * 16);
3085
3114
  textureView.set(compressedData);
3086
3115
  return wasmTranscoder.transcode(nBlocks) === 0 ? textureView : null;
3087
- };
3088
- var initWasm = function initWasm(buffer) {
3116
+ }
3117
+ function initWasm(buffer) {
3089
3118
  wasmPromise = WebAssembly.instantiate(buffer, {
3090
3119
  env: {
3091
3120
  memory: new WebAssembly.Memory({
@@ -3096,8 +3125,9 @@ function TranscodeWorkerCode() {
3096
3125
  return moduleWrapper.instance.exports;
3097
3126
  });
3098
3127
  return wasmPromise;
3099
- };
3100
- var transcode = function transcode(data, needZstd, wasmModule) {
3128
+ }
3129
+ var zstdDecoder = new ZSTDDecoder();
3130
+ function transcode(data, needZstd, wasmModule) {
3101
3131
  var faceCount = data.length;
3102
3132
  var result = new Array(faceCount);
3103
3133
  var promise = Promise.resolve();
@@ -3130,65 +3160,7 @@ function TranscodeWorkerCode() {
3130
3160
  }
3131
3161
  return result;
3132
3162
  });
3133
- };
3134
- var wasmPromise;
3135
- /**
3136
- * ZSTD (Zstandard) decoder.
3137
- */ var ZSTDDecoder = /*#__PURE__*/ function() {
3138
- function ZSTDDecoder() {}
3139
- var _proto = ZSTDDecoder.prototype;
3140
- _proto.init = function init() {
3141
- if (!this._initPromise) {
3142
- this._initPromise = fetch(ZSTDDecoder.WasmModuleURL).then(function(response) {
3143
- if (response.ok) {
3144
- return response.arrayBuffer();
3145
- }
3146
- throw new Error("Could not fetch the wasm component for the Zstandard decompression lib: " + response.status + " - " + response.statusText);
3147
- }).then(function(arrayBuffer) {
3148
- return WebAssembly.instantiate(arrayBuffer, ZSTDDecoder.IMPORT_OBJECT);
3149
- }).then(this._init);
3150
- }
3151
- return this._initPromise;
3152
- };
3153
- _proto._init = function _init(result) {
3154
- ZSTDDecoder.instance = result.instance;
3155
- ZSTDDecoder.IMPORT_OBJECT.env.emscripten_notify_memory_growth(); // initialize heap.
3156
- };
3157
- _proto.decode = function decode(array, uncompressedSize) {
3158
- if (uncompressedSize === void 0) uncompressedSize = 0;
3159
- if (!ZSTDDecoder.instance) {
3160
- throw new Error("ZSTDDecoder: Await .init() before decoding.");
3161
- }
3162
- var exports = ZSTDDecoder.instance.exports;
3163
- // Write compressed data into WASM memory
3164
- var compressedSize = array.byteLength;
3165
- var compressedPtr = exports.malloc(compressedSize);
3166
- ZSTDDecoder.heap.set(array, compressedPtr);
3167
- // Decompress into WASM memory
3168
- uncompressedSize = uncompressedSize || Number(exports.ZSTD_findDecompressedSize(compressedPtr, compressedSize));
3169
- var uncompressedPtr = exports.malloc(uncompressedSize);
3170
- var actualSize = exports.ZSTD_decompress(uncompressedPtr, uncompressedSize, compressedPtr, compressedSize);
3171
- // Read decompressed data and free WASM memory
3172
- var dec = ZSTDDecoder.heap.slice(uncompressedPtr, uncompressedPtr + actualSize);
3173
- exports.free(compressedPtr);
3174
- exports.free(uncompressedPtr);
3175
- return dec;
3176
- };
3177
- return ZSTDDecoder;
3178
- }();
3179
- (function() {
3180
- ZSTDDecoder.IMPORT_OBJECT = {
3181
- env: {
3182
- emscripten_notify_memory_growth: function emscripten_notify_memory_growth() {
3183
- ZSTDDecoder.heap = new Uint8Array(ZSTDDecoder.instance.exports.memory.buffer);
3184
- }
3185
- }
3186
- };
3187
- })();
3188
- (function() {
3189
- ZSTDDecoder.WasmModuleURL = "https://mdn.alipayobjects.com/rms/afts/file/A*awNJR7KqIAEAAAAAAAAAAAAAARQnAQ/zstddec.wasm";
3190
- })();
3191
- var zstdDecoder = new ZSTDDecoder();
3163
+ }
3192
3164
  self.onmessage = function onmessage(event) {
3193
3165
  var message = event.data;
3194
3166
  switch(message.type){
@@ -3216,12 +3188,11 @@ function TranscodeWorkerCode() {
3216
3188
  };
3217
3189
  }
3218
3190
 
3219
- /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
3220
- _inherits(KhronosTranscoder, AbstractTranscoder1);
3191
+ /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
3192
+ _inherits(KhronosTranscoder, AbstractTranscoder);
3221
3193
  function KhronosTranscoder(workerLimitCount, type) {
3222
3194
  var _this;
3223
- _this = AbstractTranscoder1.call(this, workerLimitCount) || this;
3224
- _this.type = type;
3195
+ _this = AbstractTranscoder.call(this, workerLimitCount) || this, _this.type = type;
3225
3196
  return _this;
3226
3197
  }
3227
3198
  var _proto = KhronosTranscoder.prototype;
@@ -3281,30 +3252,27 @@ function TranscodeWorkerCode() {
3281
3252
  };
3282
3253
  return KhronosTranscoder;
3283
3254
  }(AbstractTranscoder);
3284
- (function() {
3285
- var _obj;
3286
- KhronosTranscoder.transcoderMap = (_obj = {}, // TODO: support bc7
3287
- _obj[exports.KTX2TargetFormat.ASTC] = "https://mdn.alipayobjects.com/rms/afts/file/A*0jiKRK6D1-kAAAAAAAAAAAAAARQnAQ/uastc_astc.wasm", _obj);
3288
- })();
3289
-
3290
- var _KTX2Loader;
3291
- exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3292
- _inherits(KTX2Loader1, Loader1);
3293
- function KTX2Loader1() {
3294
- return Loader1.apply(this, arguments);
3255
+ var _obj$2;
3256
+ KhronosTranscoder.transcoderMap = (_obj$2 = {}, // TODO: support bc7
3257
+ _obj$2[KTX2TargetFormat.ASTC] = "https://mdn.alipayobjects.com/rms/afts/file/A*0jiKRK6D1-kAAAAAAAAAAAAAARQnAQ/uastc_astc.wasm", _obj$2);
3258
+
3259
+ exports.KTX2Loader = /*#__PURE__*/ function(Loader) {
3260
+ _inherits(KTX2Loader, Loader);
3261
+ function KTX2Loader() {
3262
+ return Loader.apply(this, arguments) || this;
3295
3263
  }
3296
- var _proto = KTX2Loader1.prototype;
3264
+ var _proto = KTX2Loader.prototype;
3297
3265
  _proto.initialize = function initialize(_, configuration) {
3298
3266
  if (configuration.ktx2Loader) {
3299
3267
  var options = configuration.ktx2Loader;
3300
3268
  if (options.priorityFormats) {
3301
- exports.KTX2Loader._priorityFormats["etc1s"] = options.priorityFormats;
3302
- exports.KTX2Loader._priorityFormats["uastc"] = options.priorityFormats;
3269
+ KTX2Loader._priorityFormats["etc1s"] = options.priorityFormats;
3270
+ KTX2Loader._priorityFormats["uastc"] = options.priorityFormats;
3303
3271
  }
3304
- if (options.transcoder === /** Khronos transcoder. */ 1) {
3305
- return exports.KTX2Loader._getKhronosTranscoder(options.workerCount).init();
3272
+ if (options.transcoder === 1) {
3273
+ return KTX2Loader._getKhronosTranscoder(options.workerCount).init();
3306
3274
  } else {
3307
- return exports.KTX2Loader._getBinomialLLCTranscoder(options.workerCount).init();
3275
+ return KTX2Loader._getBinomialLLCTranscoder(options.workerCount).init();
3308
3276
  }
3309
3277
  }
3310
3278
  };
@@ -3316,9 +3284,9 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3316
3284
  ._request(item.url, {
3317
3285
  type: "arraybuffer"
3318
3286
  }).onProgress(setTaskCompleteProgress, setTaskDetailProgress).then(function(buffer) {
3319
- return exports.KTX2Loader._parseBuffer(new Uint8Array(buffer), resourceManager.engine, item.params).then(function(param) {
3287
+ return KTX2Loader._parseBuffer(new Uint8Array(buffer), resourceManager.engine, item.params).then(function(param) {
3320
3288
  var engine = param.engine, result = param.result, targetFormat = param.targetFormat, params = param.params;
3321
- return exports.KTX2Loader._createTextureByBuffer(engine, result, targetFormat, params);
3289
+ return KTX2Loader._createTextureByBuffer(engine, result, targetFormat, params);
3322
3290
  });
3323
3291
  }).then(resolve).catch(reject);
3324
3292
  });
@@ -3326,27 +3294,26 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3326
3294
  /**
3327
3295
  * Release ktx2 transcoder worker.
3328
3296
  * @remarks If use loader after releasing, we should release again.
3329
- */ KTX2Loader1.release = function release() {
3297
+ */ KTX2Loader.release = function release() {
3330
3298
  if (this._binomialLLCTranscoder) this._binomialLLCTranscoder.destroy();
3331
3299
  if (this._khronosTranscoder) this._khronosTranscoder.destroy();
3332
3300
  this._binomialLLCTranscoder = null;
3333
3301
  this._khronosTranscoder = null;
3334
3302
  this._isBinomialInit = false;
3335
3303
  };
3336
- /** @internal */ KTX2Loader1._parseBuffer = function _parseBuffer(buffer, engine, params) {
3337
- var _params;
3304
+ /** @internal */ KTX2Loader._parseBuffer = function _parseBuffer(buffer, engine, params) {
3338
3305
  var ktx2Container = new KTX2Container(buffer);
3339
3306
  var _params_priorityFormats;
3340
- var formatPriorities = (_params_priorityFormats = (_params = params) == null ? void 0 : _params.priorityFormats) != null ? _params_priorityFormats : exports.KTX2Loader._priorityFormats[ktx2Container.isUASTC ? "uastc" : "etc1s"];
3341
- var targetFormat = exports.KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
3307
+ var formatPriorities = (_params_priorityFormats = params == null ? void 0 : params.priorityFormats) != null ? _params_priorityFormats : KTX2Loader._priorityFormats[ktx2Container.isUASTC ? "uastc" : "etc1s"];
3308
+ var targetFormat = KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
3342
3309
  var transcodeResultPromise;
3343
- if (exports.KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
3344
- var binomialLLCWorker = exports.KTX2Loader._getBinomialLLCTranscoder();
3310
+ if (KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
3311
+ var binomialLLCWorker = KTX2Loader._getBinomialLLCTranscoder();
3345
3312
  transcodeResultPromise = binomialLLCWorker.init().then(function() {
3346
3313
  return binomialLLCWorker.transcode(buffer, targetFormat);
3347
3314
  });
3348
3315
  } else {
3349
- var khronosWorker = exports.KTX2Loader._getKhronosTranscoder();
3316
+ var khronosWorker = KTX2Loader._getKhronosTranscoder();
3350
3317
  transcodeResultPromise = khronosWorker.init().then(function() {
3351
3318
  return khronosWorker.transcode(ktx2Container);
3352
3319
  });
@@ -3360,7 +3327,7 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3360
3327
  };
3361
3328
  });
3362
3329
  };
3363
- /** @internal */ KTX2Loader1._createTextureByBuffer = function _createTextureByBuffer(engine, transcodeResult, targetFormat, params) {
3330
+ /** @internal */ KTX2Loader._createTextureByBuffer = function _createTextureByBuffer(engine, transcodeResult, targetFormat, params) {
3364
3331
  var width = transcodeResult.width, height = transcodeResult.height, faces = transcodeResult.faces;
3365
3332
  var faceCount = faces.length;
3366
3333
  var mipmaps = faces[0];
@@ -3390,20 +3357,20 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3390
3357
  }
3391
3358
  return texture;
3392
3359
  };
3393
- KTX2Loader1._decideTargetFormat = function _decideTargetFormat(engine, ktx2Container, priorityFormats) {
3360
+ KTX2Loader._decideTargetFormat = function _decideTargetFormat(engine, ktx2Container, priorityFormats) {
3394
3361
  var renderer = engine._hardwareRenderer;
3395
3362
  var targetFormat = this._detectSupportedFormat(renderer, priorityFormats);
3396
- if (targetFormat === exports.KTX2TargetFormat.PVRTC && (!engineMath.MathUtil.isPowerOf2(ktx2Container.pixelWidth) || !engineMath.MathUtil.isPowerOf2(ktx2Container.pixelHeight) || ktx2Container.pixelWidth !== ktx2Container.pixelHeight)) {
3363
+ if (targetFormat === KTX2TargetFormat.PVRTC && (!engineMath.MathUtil.isPowerOf2(ktx2Container.pixelWidth) || !engineMath.MathUtil.isPowerOf2(ktx2Container.pixelHeight) || ktx2Container.pixelWidth !== ktx2Container.pixelHeight)) {
3397
3364
  engineCore.Logger.warn("PVRTC image need power of 2 and width===height, downgrade to RGBA8");
3398
- return exports.KTX2TargetFormat.R8G8B8A8;
3365
+ return KTX2TargetFormat.R8G8B8A8;
3399
3366
  }
3400
3367
  if (targetFormat === null) {
3401
3368
  engineCore.Logger.warn("Can't support any compressed texture, downgrade to RGBA8");
3402
- return exports.KTX2TargetFormat.R8G8B8A8;
3369
+ return KTX2TargetFormat.R8G8B8A8;
3403
3370
  }
3404
3371
  return targetFormat;
3405
3372
  };
3406
- KTX2Loader1._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
3373
+ KTX2Loader._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
3407
3374
  for(var i = 0; i < priorityFormats.length; i++){
3408
3375
  var format = priorityFormats[i];
3409
3376
  var capabilities = this._supportedMap[format];
@@ -3415,101 +3382,94 @@ exports.KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3415
3382
  }
3416
3383
  } else {
3417
3384
  switch(priorityFormats[i]){
3418
- case exports.KTX2TargetFormat.R8G8B8A8:
3385
+ case KTX2TargetFormat.R8G8B8A8:
3419
3386
  return format;
3420
- case exports.KTX2TargetFormat.R8:
3421
- case exports.KTX2TargetFormat.R8G8:
3387
+ case KTX2TargetFormat.R8:
3388
+ case KTX2TargetFormat.R8G8:
3422
3389
  if (renderer.isWebGL2) return format;
3423
3390
  }
3424
3391
  }
3425
3392
  }
3426
3393
  return null;
3427
3394
  };
3428
- KTX2Loader1._getBinomialLLCTranscoder = function _getBinomialLLCTranscoder(workerCount) {
3395
+ KTX2Loader._getBinomialLLCTranscoder = function _getBinomialLLCTranscoder(workerCount) {
3429
3396
  if (workerCount === void 0) workerCount = 4;
3430
- exports.KTX2Loader._isBinomialInit = true;
3397
+ KTX2Loader._isBinomialInit = true;
3431
3398
  var _this__binomialLLCTranscoder;
3432
3399
  return (_this__binomialLLCTranscoder = this._binomialLLCTranscoder) != null ? _this__binomialLLCTranscoder : this._binomialLLCTranscoder = new BinomialLLCTranscoder(workerCount);
3433
3400
  };
3434
- KTX2Loader1._getKhronosTranscoder = function _getKhronosTranscoder(workerCount) {
3401
+ KTX2Loader._getKhronosTranscoder = function _getKhronosTranscoder(workerCount) {
3435
3402
  if (workerCount === void 0) workerCount = 4;
3436
3403
  var _this__khronosTranscoder;
3437
- return (_this__khronosTranscoder = this._khronosTranscoder) != null ? _this__khronosTranscoder : this._khronosTranscoder = new KhronosTranscoder(workerCount, exports.KTX2TargetFormat.ASTC);
3404
+ return (_this__khronosTranscoder = this._khronosTranscoder) != null ? _this__khronosTranscoder : this._khronosTranscoder = new KhronosTranscoder(workerCount, KTX2TargetFormat.ASTC);
3438
3405
  };
3439
- KTX2Loader1._getEngineTextureFormat = function _getEngineTextureFormat(basisFormat, transcodeResult) {
3406
+ KTX2Loader._getEngineTextureFormat = function _getEngineTextureFormat(basisFormat, transcodeResult) {
3440
3407
  var hasAlpha = transcodeResult.hasAlpha;
3441
3408
  switch(basisFormat){
3442
- case exports.KTX2TargetFormat.ASTC:
3409
+ case KTX2TargetFormat.ASTC:
3443
3410
  return engineCore.TextureFormat.ASTC_4x4;
3444
- case exports.KTX2TargetFormat.ETC:
3411
+ case KTX2TargetFormat.ETC:
3445
3412
  return hasAlpha ? engineCore.TextureFormat.ETC2_RGBA8 : engineCore.TextureFormat.ETC2_RGB;
3446
- case exports.KTX2TargetFormat.BC7:
3413
+ case KTX2TargetFormat.BC7:
3447
3414
  return engineCore.TextureFormat.BC7;
3448
- case exports.KTX2TargetFormat.BC1_BC3:
3415
+ case KTX2TargetFormat.BC1_BC3:
3449
3416
  return hasAlpha ? engineCore.TextureFormat.BC3 : engineCore.TextureFormat.BC1;
3450
- case exports.KTX2TargetFormat.PVRTC:
3417
+ case KTX2TargetFormat.PVRTC:
3451
3418
  return hasAlpha ? engineCore.TextureFormat.PVRTC_RGBA4 : engineCore.TextureFormat.PVRTC_RGB4;
3452
- case exports.KTX2TargetFormat.R8G8B8A8:
3419
+ case KTX2TargetFormat.R8G8B8A8:
3453
3420
  return engineCore.TextureFormat.R8G8B8A8;
3454
3421
  }
3455
3422
  };
3456
- return KTX2Loader1;
3457
- }(engineCore.Loader), function() {
3458
- _KTX2Loader._isBinomialInit = false;
3459
- }(), function() {
3460
- _KTX2Loader._priorityFormats = {
3461
- etc1s: [
3462
- exports.KTX2TargetFormat.ETC,
3463
- exports.KTX2TargetFormat.BC7,
3464
- exports.KTX2TargetFormat.ASTC,
3465
- exports.KTX2TargetFormat.BC1_BC3,
3466
- exports.KTX2TargetFormat.PVRTC
3467
- ],
3468
- uastc: [
3469
- exports.KTX2TargetFormat.ASTC,
3470
- exports.KTX2TargetFormat.BC7,
3471
- exports.KTX2TargetFormat.ETC,
3472
- exports.KTX2TargetFormat.BC1_BC3,
3473
- exports.KTX2TargetFormat.PVRTC
3474
- ]
3475
- };
3476
- }(), function() {
3477
- var _obj;
3478
- _KTX2Loader._supportedMap = (_obj = {}, _obj[exports.KTX2TargetFormat.ASTC] = [
3479
- engineCore.GLCapabilityType.astc
3480
- ], _obj[exports.KTX2TargetFormat.ETC] = [
3481
- engineCore.GLCapabilityType.etc
3482
- ], _obj[exports.KTX2TargetFormat.BC7] = [
3483
- engineCore.GLCapabilityType.bptc
3484
- ], _obj[exports.KTX2TargetFormat.BC1_BC3] = [
3485
- engineCore.GLCapabilityType.s3tc
3486
- ], _obj[exports.KTX2TargetFormat.PVRTC] = [
3487
- engineCore.GLCapabilityType.pvrtc,
3488
- engineCore.GLCapabilityType.pvrtc_webkit
3489
- ], _obj);
3490
- }(), _KTX2Loader);
3423
+ return KTX2Loader;
3424
+ }(engineCore.Loader);
3425
+ exports.KTX2Loader._isBinomialInit = false;
3426
+ exports.KTX2Loader._priorityFormats = {
3427
+ etc1s: [
3428
+ KTX2TargetFormat.ETC,
3429
+ KTX2TargetFormat.BC7,
3430
+ KTX2TargetFormat.ASTC,
3431
+ KTX2TargetFormat.BC1_BC3,
3432
+ KTX2TargetFormat.PVRTC
3433
+ ],
3434
+ uastc: [
3435
+ KTX2TargetFormat.ASTC,
3436
+ KTX2TargetFormat.BC7,
3437
+ KTX2TargetFormat.ETC,
3438
+ KTX2TargetFormat.BC1_BC3,
3439
+ KTX2TargetFormat.PVRTC
3440
+ ]
3441
+ };
3442
+ var _obj$1;
3443
+ exports.KTX2Loader._supportedMap = (_obj$1 = {}, _obj$1[KTX2TargetFormat.ASTC] = [
3444
+ engineCore.GLCapabilityType.astc
3445
+ ], _obj$1[KTX2TargetFormat.ETC] = [
3446
+ engineCore.GLCapabilityType.etc
3447
+ ], _obj$1[KTX2TargetFormat.BC7] = [
3448
+ engineCore.GLCapabilityType.bptc
3449
+ ], _obj$1[KTX2TargetFormat.BC1_BC3] = [
3450
+ engineCore.GLCapabilityType.s3tc
3451
+ ], _obj$1[KTX2TargetFormat.PVRTC] = [
3452
+ engineCore.GLCapabilityType.pvrtc,
3453
+ engineCore.GLCapabilityType.pvrtc_webkit
3454
+ ], _obj$1);
3491
3455
  exports.KTX2Loader = __decorate([
3492
3456
  engineCore.resourceLoader(engineCore.AssetType.KTX2, [
3493
3457
  "ktx2"
3494
3458
  ])
3495
3459
  ], exports.KTX2Loader);
3496
- exports.KTX2Transcoder = void 0;
3497
- (function(KTX2Transcoder) {
3498
- KTX2Transcoder[KTX2Transcoder[/** BinomialLLC transcoder. */ "BinomialLLC"] = 0] = "BinomialLLC";
3499
- KTX2Transcoder[KTX2Transcoder["Khronos"] = 1] = "Khronos";
3500
- })(exports.KTX2Transcoder || (exports.KTX2Transcoder = {}));
3460
+ /** Used for initialize KTX2 transcoder. */ var KTX2Transcoder = /*#__PURE__*/ function(KTX2Transcoder) {
3461
+ /** BinomialLLC transcoder. */ KTX2Transcoder[KTX2Transcoder["BinomialLLC"] = 0] = "BinomialLLC";
3462
+ /** Khronos transcoder. */ KTX2Transcoder[KTX2Transcoder["Khronos"] = 1] = "Khronos";
3463
+ return KTX2Transcoder;
3464
+ }({});
3501
3465
 
3502
3466
  /**
3503
3467
  * @internal
3504
- */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
3505
- _inherits(GLTFContentRestorer, ContentRestorer1);
3468
+ */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
3469
+ _inherits(GLTFContentRestorer, ContentRestorer);
3506
3470
  function GLTFContentRestorer() {
3507
3471
  var _this;
3508
- _this = ContentRestorer1.apply(this, arguments) || this;
3509
- _this.bufferRequests = [];
3510
- _this.glbBufferSlices = [];
3511
- _this.bufferTextures = [];
3512
- _this.meshes = [];
3472
+ _this = ContentRestorer.apply(this, arguments) || this, _this.bufferRequests = [], _this.glbBufferSlices = [], _this.bufferTextures = [], _this.meshes = [];
3513
3473
  return _this;
3514
3474
  }
3515
3475
  var _proto = GLTFContentRestorer.prototype;
@@ -3712,16 +3672,18 @@ exports.KTX2Transcoder = void 0;
3712
3672
  };
3713
3673
  return GLTFExtensionParser;
3714
3674
  }();
3715
- exports.GLTFExtensionMode = void 0;
3716
- (function(GLTFExtensionMode) {
3717
- GLTFExtensionMode[GLTFExtensionMode[/**
3675
+ /**
3676
+ * glTF Extension mode.
3677
+ */ var GLTFExtensionMode = /*#__PURE__*/ function(GLTFExtensionMode) {
3678
+ /**
3718
3679
  * Cerate instance and parse mode.
3719
3680
  * @remarks
3720
3681
  * If the glTF property has multiple extensions of `CreateAndParse` mode, only execute the last one.
3721
3682
  * If this method is registered, the default pipeline processing will be ignored.
3722
- */ "CreateAndParse"] = 0] = "CreateAndParse";
3723
- GLTFExtensionMode[GLTFExtensionMode[/** Additive parse mode. */ "AdditiveParse"] = 1] = "AdditiveParse";
3724
- })(exports.GLTFExtensionMode || (exports.GLTFExtensionMode = {}));
3683
+ */ GLTFExtensionMode[GLTFExtensionMode["CreateAndParse"] = 0] = "CreateAndParse";
3684
+ /** Additive parse mode. */ GLTFExtensionMode[GLTFExtensionMode["AdditiveParse"] = 1] = "AdditiveParse";
3685
+ return GLTFExtensionMode;
3686
+ }({});
3725
3687
 
3726
3688
  /**
3727
3689
  * Base class of glTF parser.
@@ -3745,7 +3707,12 @@ exports.GLTFExtensionMode = void 0;
3745
3707
  var _GLTFParser;
3746
3708
  var extensionName = extensionArray[i];
3747
3709
  var extensionSchema = extensions[extensionName];
3748
- resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [].concat(extensionName, context, extensionSchema, ownerSchema, extra));
3710
+ resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [].concat([
3711
+ extensionName,
3712
+ context,
3713
+ extensionSchema,
3714
+ ownerSchema
3715
+ ], extra));
3749
3716
  if (resource) {
3750
3717
  return resource;
3751
3718
  }
@@ -3765,7 +3732,13 @@ exports.GLTFExtensionMode = void 0;
3765
3732
  for(var extensionName in extensions){
3766
3733
  var _GLTFParser;
3767
3734
  var extensionSchema = extensions[extensionName];
3768
- (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [].concat(extensionName, context, parseResource, extensionSchema, ownerSchema, extra));
3735
+ (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [].concat([
3736
+ extensionName,
3737
+ context,
3738
+ parseResource,
3739
+ extensionSchema,
3740
+ ownerSchema
3741
+ ], extra));
3769
3742
  }
3770
3743
  };
3771
3744
  /**
@@ -3782,9 +3755,8 @@ exports.GLTFExtensionMode = void 0;
3782
3755
  * @param mode - GLTF extension mode
3783
3756
  * @returns GLTF extension parser
3784
3757
  */ GLTFParser.getExtensionParser = function getExtensionParser(extensionName, mode) {
3785
- var _parsers;
3786
3758
  var parsers = GLTFParser._extensionParsers[extensionName];
3787
- var length = (_parsers = parsers) == null ? void 0 : _parsers.length;
3759
+ var length = parsers == null ? void 0 : parsers.length;
3788
3760
  if (length) {
3789
3761
  // only use the last parser.
3790
3762
  for(var i = length - 1; i >= 0; --i){
@@ -3807,27 +3779,34 @@ exports.GLTFExtensionMode = void 0;
3807
3779
  for(var _len = arguments.length, extra = new Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++){
3808
3780
  extra[_key - 4] = arguments[_key];
3809
3781
  }
3810
- var parser = GLTFParser.getExtensionParser(extensionName, exports.GLTFExtensionMode.CreateAndParse);
3782
+ var parser = GLTFParser.getExtensionParser(extensionName, GLTFExtensionMode.CreateAndParse);
3811
3783
  if (parser) {
3812
3784
  var _parser;
3813
- return (_parser = parser).createAndParse.apply(_parser, [].concat(context, extensionSchema, ownerSchema, extra));
3785
+ return (_parser = parser).createAndParse.apply(_parser, [].concat([
3786
+ context,
3787
+ extensionSchema,
3788
+ ownerSchema
3789
+ ], extra));
3814
3790
  }
3815
3791
  };
3816
3792
  GLTFParser._additiveParse = function _additiveParse(extensionName, context, parseResource, extensionSchema, ownerSchema) {
3817
3793
  for(var _len = arguments.length, extra = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++){
3818
3794
  extra[_key - 5] = arguments[_key];
3819
3795
  }
3820
- var parser = GLTFParser.getExtensionParser(extensionName, exports.GLTFExtensionMode.AdditiveParse);
3796
+ var parser = GLTFParser.getExtensionParser(extensionName, GLTFExtensionMode.AdditiveParse);
3821
3797
  if (parser) {
3822
3798
  var _parser;
3823
- (_parser = parser).additiveParse.apply(_parser, [].concat(context, parseResource, extensionSchema, ownerSchema, extra));
3799
+ (_parser = parser).additiveParse.apply(_parser, [].concat([
3800
+ context,
3801
+ parseResource,
3802
+ extensionSchema,
3803
+ ownerSchema
3804
+ ], extra));
3824
3805
  }
3825
3806
  };
3826
3807
  return GLTFParser;
3827
3808
  }();
3828
- (function() {
3829
- GLTFParser._extensionParsers = {};
3830
- })();
3809
+ GLTFParser._extensionParsers = {};
3831
3810
  /**
3832
3811
  * Declare ExtensionParser's decorator.
3833
3812
  * @param extensionName - Extension name
@@ -3839,10 +3818,10 @@ exports.GLTFExtensionMode = void 0;
3839
3818
  };
3840
3819
  }
3841
3820
 
3842
- exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3843
- _inherits(GLTFSchemaParser, GLTFParser1);
3821
+ exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser) {
3822
+ _inherits(GLTFSchemaParser, GLTFParser);
3844
3823
  function GLTFSchemaParser() {
3845
- return GLTFParser1.apply(this, arguments);
3824
+ return GLTFParser.apply(this, arguments) || this;
3846
3825
  }
3847
3826
  var _proto = GLTFSchemaParser.prototype;
3848
3827
  _proto.parse = function parse(context) {
@@ -3856,16 +3835,14 @@ exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3856
3835
  var remoteUrl = resourceManager._getRemoteUrl(url);
3857
3836
  return resourceManager// @ts-ignore
3858
3837
  ._requestByRemoteUrl(remoteUrl, requestConfig).onProgress(undefined, context._onTaskDetail).then(function(buffer) {
3859
- var _parseResult;
3860
3838
  var parseResult = GLTFUtils.parseGLB(context, buffer);
3861
3839
  // If the buffer is a GLB file, we need to restore the buffer data
3862
- if ((_parseResult = parseResult) == null ? void 0 : _parseResult.glTF) {
3840
+ if (parseResult == null ? void 0 : parseResult.glTF) {
3863
3841
  restoreBufferRequests.push(new BufferRequestInfo(remoteUrl, requestConfig));
3864
3842
  }
3865
3843
  return parseResult;
3866
3844
  }).then(function(result) {
3867
- var _result;
3868
- if ((_result = result) == null ? void 0 : _result.glTF) {
3845
+ if (result == null ? void 0 : result.glTF) {
3869
3846
  contentRestorer.isGLB = true;
3870
3847
  context.buffers = result.buffers;
3871
3848
  return result.glTF;
@@ -3878,19 +3855,19 @@ exports.GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3878
3855
  return GLTFSchemaParser;
3879
3856
  }(GLTFParser);
3880
3857
  exports.GLTFSchemaParser = __decorate([
3881
- registerGLTFParser(exports.GLTFParserType.Schema)
3858
+ registerGLTFParser(GLTFParserType.Schema)
3882
3859
  ], exports.GLTFSchemaParser);
3883
3860
 
3884
3861
  exports.GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3885
- _inherits(GLTFAnimationParser1, GLTFParser1);
3886
- function GLTFAnimationParser1() {
3887
- return GLTFParser1.apply(this, arguments);
3862
+ _inherits(GLTFAnimationParser, GLTFParser1);
3863
+ function GLTFAnimationParser() {
3864
+ return GLTFParser1.apply(this, arguments) || this;
3888
3865
  }
3889
- var _proto = GLTFAnimationParser1.prototype;
3866
+ var _proto = GLTFAnimationParser.prototype;
3890
3867
  _proto.parse = function parse(context, index) {
3891
3868
  var animationInfo = context.glTF.animations[index];
3892
3869
  var _animationInfo_name = animationInfo.name, name = _animationInfo_name === void 0 ? "AnimationClip" + index : _animationInfo_name;
3893
- var animationClipPromise = GLTFParser.executeExtensionsCreateAndParse(animationInfo.extensions, context, animationInfo) || exports.GLTFAnimationParser._parseStandardProperty(context, new engineCore.AnimationClip(name), animationInfo);
3870
+ var animationClipPromise = GLTFParser.executeExtensionsCreateAndParse(animationInfo.extensions, context, animationInfo) || GLTFAnimationParser._parseStandardProperty(context, new engineCore.AnimationClip(name), animationInfo);
3894
3871
  return Promise.resolve(animationClipPromise).then(function(animationClip) {
3895
3872
  GLTFParser.executeExtensionsAdditiveAndParse(animationInfo.extensions, context, animationClip, animationInfo);
3896
3873
  return animationClip;
@@ -3898,7 +3875,7 @@ exports.GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3898
3875
  };
3899
3876
  /**
3900
3877
  * @internal
3901
- */ GLTFAnimationParser1._parseStandardProperty = function _parseStandardProperty(context, animationClip, animationInfo) {
3878
+ */ GLTFAnimationParser._parseStandardProperty = function _parseStandardProperty(context, animationClip, animationInfo) {
3902
3879
  var _loop = function(j, m) {
3903
3880
  var glTFSampler = samplers[j];
3904
3881
  var inputAccessor = accessors[glTFSampler.input];
@@ -3949,11 +3926,11 @@ exports.GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3949
3926
  var channels = animationInfo.channels, samplers = animationInfo.samplers;
3950
3927
  var len = samplers.length;
3951
3928
  var sampleDataCollection = new Array(len);
3952
- var entities = context.get(exports.GLTFParserType.Entity);
3929
+ var entities = context.get(GLTFParserType.Entity);
3953
3930
  var promises = new Array();
3954
3931
  // parse samplers
3955
3932
  for(var j = 0, m = len; j < m; j++)_loop(j);
3956
- promises.push(context.get(exports.GLTFParserType.Scene));
3933
+ promises.push(context.get(GLTFParserType.Scene));
3957
3934
  return Promise.all(promises).then(function() {
3958
3935
  for(var j = 0, m = channels.length; j < m; j++){
3959
3936
  var glTFChannel = channels[j];
@@ -4002,7 +3979,7 @@ exports.GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
4002
3979
  return animationClip;
4003
3980
  });
4004
3981
  };
4005
- GLTFAnimationParser1._addCurve = function _addCurve(animationChannelTargetPath, glTFChannel, sampleDataCollection) {
3982
+ GLTFAnimationParser._addCurve = function _addCurve(animationChannelTargetPath, glTFChannel, sampleDataCollection) {
4006
3983
  var sampleData = sampleDataCollection[glTFChannel.sampler];
4007
3984
  var input = sampleData.input, output = sampleData.output, outputSize = sampleData.outputSize;
4008
3985
  switch(animationChannelTargetPath){
@@ -4070,16 +4047,16 @@ exports.GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
4070
4047
  }
4071
4048
  }
4072
4049
  };
4073
- return GLTFAnimationParser1;
4050
+ return GLTFAnimationParser;
4074
4051
  }(GLTFParser);
4075
4052
  exports.GLTFAnimationParser = __decorate([
4076
- registerGLTFParser(exports.GLTFParserType.Animation)
4053
+ registerGLTFParser(GLTFParserType.Animation)
4077
4054
  ], exports.GLTFAnimationParser);
4078
4055
 
4079
- exports.GLTFBufferParser = /*#__PURE__*/ function(GLTFParser1) {
4080
- _inherits(GLTFBufferParser, GLTFParser1);
4056
+ exports.GLTFBufferParser = /*#__PURE__*/ function(GLTFParser) {
4057
+ _inherits(GLTFBufferParser, GLTFParser);
4081
4058
  function GLTFBufferParser() {
4082
- return GLTFParser1.apply(this, arguments);
4059
+ return GLTFParser.apply(this, arguments) || this;
4083
4060
  }
4084
4061
  var _proto = GLTFBufferParser.prototype;
4085
4062
  _proto.parse = function parse(context, index) {
@@ -4105,13 +4082,13 @@ exports.GLTFBufferParser = /*#__PURE__*/ function(GLTFParser1) {
4105
4082
  return GLTFBufferParser;
4106
4083
  }(GLTFParser);
4107
4084
  exports.GLTFBufferParser = __decorate([
4108
- registerGLTFParser(exports.GLTFParserType.Buffer)
4085
+ registerGLTFParser(GLTFParserType.Buffer)
4109
4086
  ], exports.GLTFBufferParser);
4110
4087
 
4111
4088
  exports.GLTFEntityParser = /*#__PURE__*/ function(GLTFParser1) {
4112
4089
  _inherits(GLTFEntityParser, GLTFParser1);
4113
4090
  function GLTFEntityParser() {
4114
- return GLTFParser1.apply(this, arguments);
4091
+ return GLTFParser1.apply(this, arguments) || this;
4115
4092
  }
4116
4093
  var _proto = GLTFEntityParser.prototype;
4117
4094
  _proto.parse = function parse(context, index) {
@@ -4142,7 +4119,7 @@ exports.GLTFEntityParser = /*#__PURE__*/ function(GLTFParser1) {
4142
4119
  if (children) {
4143
4120
  for(var i = 0; i < children.length; i++){
4144
4121
  var childIndex = children[i];
4145
- var childEntity = context.get(exports.GLTFParserType.Entity, childIndex);
4122
+ var childEntity = context.get(GLTFParserType.Entity, childIndex);
4146
4123
  entity.addChild(childEntity);
4147
4124
  }
4148
4125
  }
@@ -4152,15 +4129,15 @@ exports.GLTFEntityParser = /*#__PURE__*/ function(GLTFParser1) {
4152
4129
  return GLTFEntityParser;
4153
4130
  }(GLTFParser);
4154
4131
  exports.GLTFEntityParser = __decorate([
4155
- registerGLTFParser(exports.GLTFParserType.Entity)
4132
+ registerGLTFParser(GLTFParserType.Entity)
4156
4133
  ], exports.GLTFEntityParser);
4157
4134
 
4158
4135
  exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4159
- _inherits(GLTFMaterialParser1, GLTFParser1);
4160
- function GLTFMaterialParser1() {
4161
- return GLTFParser1.apply(this, arguments);
4136
+ _inherits(GLTFMaterialParser, GLTFParser1);
4137
+ function GLTFMaterialParser() {
4138
+ return GLTFParser1.apply(this, arguments) || this;
4162
4139
  }
4163
- var _proto = GLTFMaterialParser1.prototype;
4140
+ var _proto = GLTFMaterialParser.prototype;
4164
4141
  _proto.parse = function parse(context, index) {
4165
4142
  var materialInfo = context.glTF.materials[index];
4166
4143
  var glTFResource = context.glTFResource;
@@ -4169,23 +4146,23 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4169
4146
  if (!material) {
4170
4147
  material = new engineCore.PBRMaterial(engine);
4171
4148
  material.name = materialInfo.name;
4172
- exports.GLTFMaterialParser._parseStandardProperty(context, material, materialInfo);
4149
+ GLTFMaterialParser._parseStandardProperty(context, material, materialInfo);
4173
4150
  }
4174
4151
  return Promise.resolve(material).then(function(material) {
4175
- material || (material = exports.GLTFMaterialParser._getDefaultMaterial(engine));
4152
+ material || (material = GLTFMaterialParser._getDefaultMaterial(engine));
4176
4153
  GLTFParser.executeExtensionsAdditiveAndParse(materialInfo.extensions, context, material, materialInfo);
4177
4154
  // @ts-ignore
4178
4155
  material._associationSuperResource(glTFResource);
4179
4156
  return material;
4180
4157
  });
4181
4158
  };
4182
- /** @internal */ GLTFMaterialParser1._getDefaultMaterial = function _getDefaultMaterial(engine) {
4159
+ /** @internal */ GLTFMaterialParser._getDefaultMaterial = function _getDefaultMaterial(engine) {
4183
4160
  var _GLTFMaterialParser;
4184
- return (_GLTFMaterialParser = exports.GLTFMaterialParser)._defaultMaterial || (_GLTFMaterialParser._defaultMaterial = new engineCore.BlinnPhongMaterial(engine));
4161
+ return (_GLTFMaterialParser = GLTFMaterialParser)._defaultMaterial || (_GLTFMaterialParser._defaultMaterial = new engineCore.BlinnPhongMaterial(engine));
4185
4162
  };
4186
4163
  /**
4187
4164
  * @internal
4188
- */ GLTFMaterialParser1._checkOtherTextureTransform = function _checkOtherTextureTransform(texture, textureName) {
4165
+ */ GLTFMaterialParser._checkOtherTextureTransform = function _checkOtherTextureTransform(texture, textureName) {
4189
4166
  var _texture_extensions;
4190
4167
  if ((_texture_extensions = texture.extensions) == null ? void 0 : _texture_extensions.KHR_texture_transform) {
4191
4168
  engineCore.Logger.warn("" + textureName + " texture always use the KHR_texture_transform of the base texture.");
@@ -4193,7 +4170,7 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4193
4170
  };
4194
4171
  /**
4195
4172
  * @internal
4196
- */ GLTFMaterialParser1._parseStandardProperty = function _parseStandardProperty(context, material, materialInfo) {
4173
+ */ GLTFMaterialParser._parseStandardProperty = function _parseStandardProperty(context, material, materialInfo) {
4197
4174
  var pbrMetallicRoughness = materialInfo.pbrMetallicRoughness, normalTexture = materialInfo.normalTexture, occlusionTexture = materialInfo.occlusionTexture, emissiveTexture = materialInfo.emissiveTexture, emissiveFactor = materialInfo.emissiveFactor, alphaMode = materialInfo.alphaMode, alphaCutoff = materialInfo.alphaCutoff, doubleSided = materialInfo.doubleSided;
4198
4175
  if (pbrMetallicRoughness) {
4199
4176
  var baseColorFactor = pbrMetallicRoughness.baseColorFactor, baseColorTexture = pbrMetallicRoughness.baseColorTexture, metallicFactor = pbrMetallicRoughness.metallicFactor, roughnessFactor = pbrMetallicRoughness.roughnessFactor, metallicRoughnessTexture = pbrMetallicRoughness.metallicRoughnessTexture;
@@ -4201,7 +4178,7 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4201
4178
  material.baseColor = new engineMath.Color(engineMath.Color.linearToGammaSpace(baseColorFactor[0]), engineMath.Color.linearToGammaSpace(baseColorFactor[1]), engineMath.Color.linearToGammaSpace(baseColorFactor[2]), baseColorFactor[3]);
4202
4179
  }
4203
4180
  if (baseColorTexture) {
4204
- context.get(exports.GLTFParserType.Texture, baseColorTexture.index).then(function(texture) {
4181
+ context.get(GLTFParserType.Texture, baseColorTexture.index).then(function(texture) {
4205
4182
  material.baseTexture = texture;
4206
4183
  GLTFParser.executeExtensionsAdditiveAndParse(baseColorTexture.extensions, context, material, baseColorTexture);
4207
4184
  });
@@ -4210,8 +4187,8 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4210
4187
  material.metallic = metallicFactor != null ? metallicFactor : 1;
4211
4188
  material.roughness = roughnessFactor != null ? roughnessFactor : 1;
4212
4189
  if (metallicRoughnessTexture) {
4213
- exports.GLTFMaterialParser._checkOtherTextureTransform(metallicRoughnessTexture, "Roughness metallic");
4214
- context.get(exports.GLTFParserType.Texture, metallicRoughnessTexture.index).then(function(texture) {
4190
+ GLTFMaterialParser._checkOtherTextureTransform(metallicRoughnessTexture, "Roughness metallic");
4191
+ context.get(GLTFParserType.Texture, metallicRoughnessTexture.index).then(function(texture) {
4215
4192
  material.roughnessMetallicTexture = texture;
4216
4193
  });
4217
4194
  }
@@ -4219,8 +4196,8 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4219
4196
  }
4220
4197
  if (material.constructor === engineCore.PBRMaterial || material.constructor === engineCore.PBRSpecularMaterial) {
4221
4198
  if (emissiveTexture) {
4222
- exports.GLTFMaterialParser._checkOtherTextureTransform(emissiveTexture, "Emissive");
4223
- context.get(exports.GLTFParserType.Texture, emissiveTexture.index).then(function(texture) {
4199
+ GLTFMaterialParser._checkOtherTextureTransform(emissiveTexture, "Emissive");
4200
+ context.get(GLTFParserType.Texture, emissiveTexture.index).then(function(texture) {
4224
4201
  material.emissiveTexture = texture;
4225
4202
  });
4226
4203
  }
@@ -4229,8 +4206,8 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4229
4206
  }
4230
4207
  if (normalTexture) {
4231
4208
  var index = normalTexture.index, scale = normalTexture.scale;
4232
- exports.GLTFMaterialParser._checkOtherTextureTransform(normalTexture, "Normal");
4233
- context.get(exports.GLTFParserType.Texture, index).then(function(texture) {
4209
+ GLTFMaterialParser._checkOtherTextureTransform(normalTexture, "Normal");
4210
+ context.get(GLTFParserType.Texture, index).then(function(texture) {
4234
4211
  material.normalTexture = texture;
4235
4212
  });
4236
4213
  if (scale !== undefined) {
@@ -4239,8 +4216,8 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4239
4216
  }
4240
4217
  if (occlusionTexture) {
4241
4218
  var index1 = occlusionTexture.index, strength = occlusionTexture.strength, texCoord = occlusionTexture.texCoord;
4242
- exports.GLTFMaterialParser._checkOtherTextureTransform(occlusionTexture, "Occlusion");
4243
- context.get(exports.GLTFParserType.Texture, index1).then(function(texture) {
4219
+ GLTFMaterialParser._checkOtherTextureTransform(occlusionTexture, "Occlusion");
4220
+ context.get(GLTFParserType.Texture, index1).then(function(texture) {
4244
4221
  material.occlusionTexture = texture;
4245
4222
  });
4246
4223
  if (strength !== undefined) {
@@ -4270,19 +4247,18 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4270
4247
  break;
4271
4248
  }
4272
4249
  };
4273
- return GLTFMaterialParser1;
4250
+ return GLTFMaterialParser;
4274
4251
  }(GLTFParser);
4275
4252
  exports.GLTFMaterialParser = __decorate([
4276
- registerGLTFParser(exports.GLTFParserType.Material)
4253
+ registerGLTFParser(GLTFParserType.Material)
4277
4254
  ], exports.GLTFMaterialParser);
4278
4255
 
4279
- var _GLTFMeshParser;
4280
- exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4281
- _inherits(GLTFMeshParser1, GLTFParser1);
4282
- function GLTFMeshParser1() {
4283
- return GLTFParser1.apply(this, arguments);
4256
+ exports.GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4257
+ _inherits(GLTFMeshParser, GLTFParser1);
4258
+ function GLTFMeshParser() {
4259
+ return GLTFParser1.apply(this, arguments) || this;
4284
4260
  }
4285
- var _proto = GLTFMeshParser1.prototype;
4261
+ var _proto = GLTFMeshParser.prototype;
4286
4262
  _proto.parse = function parse(context, index) {
4287
4263
  var _loop = function(i, length) {
4288
4264
  var gltfPrimitive = meshInfo.primitives[i];
@@ -4307,7 +4283,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4307
4283
  var meshRestoreInfo = new ModelMeshRestoreInfo();
4308
4284
  meshRestoreInfo.mesh = mesh1;
4309
4285
  context.contentRestorer.meshes.push(meshRestoreInfo);
4310
- exports.GLTFMeshParser._parseMeshFromGLTFPrimitive(context, mesh1, meshRestoreInfo, meshInfo, gltfPrimitive, glTF, context.params.keepMeshData).then(resolve);
4286
+ GLTFMeshParser._parseMeshFromGLTFPrimitive(context, mesh1, meshRestoreInfo, meshInfo, gltfPrimitive, glTF, context.params.keepMeshData).then(resolve);
4311
4287
  }
4312
4288
  });
4313
4289
  };
@@ -4320,7 +4296,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4320
4296
  };
4321
4297
  /**
4322
4298
  * @internal
4323
- */ GLTFMeshParser1._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, keepMeshData) {
4299
+ */ GLTFMeshParser._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, keepMeshData) {
4324
4300
  var _loop = function(attribute) {
4325
4301
  var accessor = accessors[attributes[attribute]];
4326
4302
  var promise = GLTFUtils.getAccessorBuffer(context, gltf.bufferViews, accessor).then(function(accessorBuffer) {
@@ -4371,7 +4347,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4371
4347
  min.copyFromArray(accessor.min);
4372
4348
  max.copyFromArray(accessor.max);
4373
4349
  } else {
4374
- var position = exports.GLTFMeshParser._tempVector3;
4350
+ var position = GLTFMeshParser._tempVector3;
4375
4351
  min.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
4376
4352
  max.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
4377
4353
  var baseOffset = elementOffset / vertices.BYTES_PER_ELEMENT;
@@ -4415,7 +4391,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4415
4391
  }
4416
4392
  // BlendShapes
4417
4393
  if (targets) {
4418
- promises.push(exports.GLTFMeshParser._createBlendShape(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, targets));
4394
+ promises.push(GLTFMeshParser._createBlendShape(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, targets));
4419
4395
  }
4420
4396
  return Promise.all(promises).then(function() {
4421
4397
  mesh.uploadData(!keepMeshData);
@@ -4423,7 +4399,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4423
4399
  });
4424
4400
  });
4425
4401
  };
4426
- GLTFMeshParser1._getBlendShapeData = function _getBlendShapeData(context, glTF, accessor) {
4402
+ GLTFMeshParser._getBlendShapeData = function _getBlendShapeData(context, glTF, accessor) {
4427
4403
  return GLTFUtils.getAccessorBuffer(context, glTF.bufferViews, accessor).then(function(bufferInfo) {
4428
4404
  var buffer = bufferInfo.data;
4429
4405
  var _accessor_byteOffset;
@@ -4439,8 +4415,8 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4439
4415
  };
4440
4416
  /**
4441
4417
  * @internal
4442
- */ GLTFMeshParser1._createBlendShape = function _createBlendShape(context, mesh, meshRestoreInfo, glTFMesh, gltfPrimitive, glTFTargets) {
4443
- var _this = this, _loop = function(i) {
4418
+ */ GLTFMeshParser._createBlendShape = function _createBlendShape(context, mesh, meshRestoreInfo, glTFMesh, gltfPrimitive, glTFTargets) {
4419
+ var _this, _loop = function(i) {
4444
4420
  var blendShapeData = {};
4445
4421
  blendShapeCollection[i] = blendShapeData;
4446
4422
  var name = blendShapeNames ? blendShapeNames[i] : "blendShape" + i;
@@ -4454,12 +4430,11 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4454
4430
  hasNormal ? _this._getBlendShapeData(context, glTF, accessors[normalTarget]) : null,
4455
4431
  hasTangent ? _this._getBlendShapeData(context, glTF, accessors[tangentTarget]) : null
4456
4432
  ]).then(function(vertices) {
4457
- var _tangentData;
4458
4433
  var positionData = vertices[0], normalData = vertices[1], tangentData = vertices[2];
4459
4434
  var blendShape = new engineCore.BlendShape(name);
4460
4435
  blendShape.addFrame(1.0, positionData.vertices, hasNormal ? normalData.vertices : null, hasTangent ? tangentData.vertices : null);
4461
4436
  blendShapeData.blendShape = blendShape;
4462
- blendShapeData.restoreInfo = new BlendShapeRestoreInfo(blendShape, positionData.restoreInfo, hasNormal ? normalData.restoreInfo : null, hasTangent ? (_tangentData = tangentData) == null ? void 0 : _tangentData.restoreInfo : null);
4437
+ blendShapeData.restoreInfo = new BlendShapeRestoreInfo(blendShape, positionData.restoreInfo, hasNormal ? normalData.restoreInfo : null, hasTangent ? tangentData == null ? void 0 : tangentData.restoreInfo : null);
4463
4438
  });
4464
4439
  promises.push(promise);
4465
4440
  };
@@ -4469,7 +4444,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4469
4444
  var promises = new Array();
4470
4445
  var blendShapeCount = glTFTargets.length;
4471
4446
  var blendShapeCollection = new Array(blendShapeCount);
4472
- for(var i = 0; i < blendShapeCount; i++)_loop(i);
4447
+ for(var i = 0; i < blendShapeCount; i++)_this = this, _loop(i);
4473
4448
  return Promise.all(promises).then(function() {
4474
4449
  for(var _iterator = _create_for_of_iterator_helper_loose(blendShapeCollection), _step; !(_step = _iterator()).done;){
4475
4450
  var blendShape = _step.value;
@@ -4478,18 +4453,17 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
4478
4453
  }
4479
4454
  });
4480
4455
  };
4481
- return GLTFMeshParser1;
4482
- }(GLTFParser), function() {
4483
- _GLTFMeshParser._tempVector3 = new engineMath.Vector3();
4484
- }(), _GLTFMeshParser);
4456
+ return GLTFMeshParser;
4457
+ }(GLTFParser);
4458
+ exports.GLTFMeshParser._tempVector3 = new engineMath.Vector3();
4485
4459
  exports.GLTFMeshParser = __decorate([
4486
- registerGLTFParser(exports.GLTFParserType.Mesh)
4460
+ registerGLTFParser(GLTFParserType.Mesh)
4487
4461
  ], exports.GLTFMeshParser);
4488
4462
 
4489
4463
  exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4490
4464
  _inherits(GLTFSceneParser, GLTFParser1);
4491
4465
  function GLTFSceneParser() {
4492
- return GLTFParser1.apply(this, arguments);
4466
+ return GLTFParser1.apply(this, arguments) || this;
4493
4467
  }
4494
4468
  var _proto = GLTFSceneParser.prototype;
4495
4469
  _proto.parse = function parse(context, index) {
@@ -4501,13 +4475,13 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4501
4475
  var sceneNodes = sceneInfo.nodes || [];
4502
4476
  var sceneRoot;
4503
4477
  if (sceneNodes.length === 1) {
4504
- sceneRoot = context.get(exports.GLTFParserType.Entity, sceneNodes[0]);
4478
+ sceneRoot = context.get(GLTFParserType.Entity, sceneNodes[0]);
4505
4479
  } else {
4506
4480
  sceneRoot = new engineCore.Entity(engine, "GLTF_ROOT");
4507
4481
  // @ts-ignore
4508
4482
  sceneRoot._markAsTemplate(glTFResource);
4509
4483
  for(var i = 0; i < sceneNodes.length; i++){
4510
- var childEntity = context.get(exports.GLTFParserType.Entity, sceneNodes[i]);
4484
+ var childEntity = context.get(GLTFParserType.Entity, sceneNodes[i]);
4511
4485
  sceneRoot.addChild(childEntity);
4512
4486
  }
4513
4487
  }
@@ -4528,7 +4502,7 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4528
4502
  var glTF = context.glTF, glTFResource = context.glTFResource;
4529
4503
  var entityInfo = glTF.nodes[index];
4530
4504
  var cameraID = entityInfo.camera, meshID = entityInfo.mesh;
4531
- var entity = context.get(exports.GLTFParserType.Entity, index);
4505
+ var entity = context.get(GLTFParserType.Entity, index);
4532
4506
  var promise;
4533
4507
  if (cameraID !== undefined) {
4534
4508
  this._createCamera(glTFResource, glTF.cameras[cameraID], entity);
@@ -4591,11 +4565,11 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4591
4565
  var materialPromises = new Array(rendererCount);
4592
4566
  for(var i = 0; i < rendererCount; i++){
4593
4567
  var _glTFMeshPrimitives_i_material;
4594
- materialPromises[i] = context.get(exports.GLTFParserType.Material, (_glTFMeshPrimitives_i_material = glTFMeshPrimitives[i].material) != null ? _glTFMeshPrimitives_i_material : -1);
4568
+ materialPromises[i] = context.get(GLTFParserType.Material, (_glTFMeshPrimitives_i_material = glTFMeshPrimitives[i].material) != null ? _glTFMeshPrimitives_i_material : -1);
4595
4569
  }
4596
4570
  return Promise.all([
4597
- context.get(exports.GLTFParserType.Mesh, meshID),
4598
- skinID !== undefined && context.get(exports.GLTFParserType.Skin, skinID),
4571
+ context.get(GLTFParserType.Mesh, meshID),
4572
+ skinID !== undefined && context.get(GLTFParserType.Skin, skinID),
4599
4573
  Promise.all(materialPromises)
4600
4574
  ]).then(function(param) {
4601
4575
  var _loop = function(i) {
@@ -4666,13 +4640,13 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4666
4640
  return GLTFSceneParser;
4667
4641
  }(GLTFParser);
4668
4642
  exports.GLTFSceneParser = __decorate([
4669
- registerGLTFParser(exports.GLTFParserType.Scene)
4643
+ registerGLTFParser(GLTFParserType.Scene)
4670
4644
  ], exports.GLTFSceneParser);
4671
4645
 
4672
- exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser1) {
4673
- _inherits(GLTFSkinParser, GLTFParser1);
4646
+ exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser) {
4647
+ _inherits(GLTFSkinParser, GLTFParser);
4674
4648
  function GLTFSkinParser() {
4675
- return GLTFParser1.apply(this, arguments);
4649
+ return GLTFParser.apply(this, arguments) || this;
4676
4650
  }
4677
4651
  var _proto = GLTFSkinParser.prototype;
4678
4652
  _proto.parse = function parse(context, index) {
@@ -4687,7 +4661,7 @@ exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser1) {
4687
4661
  // parse IBM
4688
4662
  var accessor = glTF.accessors[inverseBindMatrices];
4689
4663
  var skinPromise = GLTFUtils.getAccessorBuffer(context, glTF.bufferViews, accessor).then(function(bufferInfo) {
4690
- var entities = context.get(exports.GLTFParserType.Entity);
4664
+ var entities = context.get(GLTFParserType.Entity);
4691
4665
  var buffer = bufferInfo.data;
4692
4666
  for(var i = 0; i < jointCount; i++){
4693
4667
  var inverseBindMatrix = new engineMath.Matrix();
@@ -4746,23 +4720,22 @@ exports.GLTFSkinParser = /*#__PURE__*/ function(GLTFParser1) {
4746
4720
  return GLTFSkinParser;
4747
4721
  }(GLTFParser);
4748
4722
  exports.GLTFSkinParser = __decorate([
4749
- registerGLTFParser(exports.GLTFParserType.Skin)
4723
+ registerGLTFParser(GLTFParserType.Skin)
4750
4724
  ], exports.GLTFSkinParser);
4751
4725
 
4752
- var _GLTFTextureParser;
4753
- exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
4754
- _inherits(GLTFTextureParser1, GLTFParser1);
4755
- function GLTFTextureParser1() {
4756
- return GLTFParser1.apply(this, arguments);
4726
+ exports.GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
4727
+ _inherits(GLTFTextureParser, GLTFParser1);
4728
+ function GLTFTextureParser() {
4729
+ return GLTFParser1.apply(this, arguments) || this;
4757
4730
  }
4758
- var _proto = GLTFTextureParser1.prototype;
4731
+ var _proto = GLTFTextureParser.prototype;
4759
4732
  _proto.parse = function parse(context, textureIndex) {
4760
4733
  var textureInfo = context.glTF.textures[textureIndex];
4761
4734
  var glTFResource = context.glTFResource;
4762
4735
  var sampler = textureInfo.sampler, tmp = textureInfo.source, imageIndex = tmp === void 0 ? 0 : tmp, textureName = textureInfo.name, extensions = textureInfo.extensions;
4763
4736
  var texture = GLTFParser.executeExtensionsCreateAndParse(extensions, context, textureInfo, textureIndex);
4764
4737
  if (!texture) {
4765
- texture = exports.GLTFTextureParser._parseTexture(context, imageIndex, textureIndex, sampler, textureName);
4738
+ texture = GLTFTextureParser._parseTexture(context, imageIndex, textureIndex, sampler, textureName);
4766
4739
  }
4767
4740
  return Promise.resolve(texture).then(function(texture) {
4768
4741
  GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, texture, textureInfo);
@@ -4771,7 +4744,7 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4771
4744
  return texture;
4772
4745
  });
4773
4746
  };
4774
- /** @internal */ GLTFTextureParser1._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
4747
+ /** @internal */ GLTFTextureParser._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
4775
4748
  var glTFResource = context.glTFResource, glTF = context.glTF;
4776
4749
  var engine = glTFResource.engine, url = glTFResource.url;
4777
4750
  var _glTF_images_imageIndex = glTF.images[imageIndex], uri = _glTF_images_imageIndex.uri, bufferViewIndex = _glTF_images_imageIndex.bufferView, mimeType = _glTF_images_imageIndex.mimeType, imageName = _glTF_images_imageIndex.name;
@@ -4779,7 +4752,6 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4779
4752
  var samplerInfo = useSampler && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
4780
4753
  var texture;
4781
4754
  if (uri) {
4782
- var _samplerInfo;
4783
4755
  var extIndex = uri.lastIndexOf(".");
4784
4756
  var ext = uri.substring(extIndex + 1);
4785
4757
  var type = ext.startsWith("ktx") ? engineCore.AssetType.KTX : engineCore.AssetType.Texture2D;
@@ -4787,7 +4759,7 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4787
4759
  url: engineCore.Utils.resolveAbsoluteUrl(url, uri),
4788
4760
  type: type,
4789
4761
  params: {
4790
- mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
4762
+ mipmap: samplerInfo == null ? void 0 : samplerInfo.mipmap
4791
4763
  }
4792
4764
  }).onProgress(undefined, context._onTaskDetail).then(function(texture) {
4793
4765
  texture.name = textureName || imageName || texture.name || "texture_" + textureIndex;
@@ -4797,12 +4769,11 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4797
4769
  context._addTaskCompletePromise(texture);
4798
4770
  } else {
4799
4771
  var bufferView = glTF.bufferViews[bufferViewIndex];
4800
- texture = context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
4772
+ texture = context.get(GLTFParserType.Buffer).then(function(buffers) {
4801
4773
  var buffer = buffers[bufferView.buffer];
4802
4774
  var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
4803
4775
  return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
4804
- var _samplerInfo;
4805
- var texture = new engineCore.Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
4776
+ var texture = new engineCore.Texture2D(engine, image.width, image.height, undefined, samplerInfo == null ? void 0 : samplerInfo.mipmap);
4806
4777
  texture.setImageSource(image);
4807
4778
  texture.generateMipmaps();
4808
4779
  texture.name = textureName || imageName || "texture_" + textureIndex;
@@ -4815,19 +4786,18 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
4815
4786
  }
4816
4787
  return texture;
4817
4788
  };
4818
- return GLTFTextureParser1;
4819
- }(GLTFParser), function() {
4820
- var _obj;
4821
- /** @internal */ _GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = engineCore.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = engineCore.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = engineCore.TextureWrapMode.Repeat, _obj);
4822
- }(), _GLTFTextureParser);
4789
+ return GLTFTextureParser;
4790
+ }(GLTFParser);
4791
+ var _obj;
4792
+ /** @internal */ exports.GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = engineCore.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = engineCore.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = engineCore.TextureWrapMode.Repeat, _obj);
4823
4793
  exports.GLTFTextureParser = __decorate([
4824
- registerGLTFParser(exports.GLTFParserType.Texture)
4794
+ registerGLTFParser(GLTFParserType.Texture)
4825
4795
  ], exports.GLTFTextureParser);
4826
4796
 
4827
4797
  exports.GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
4828
4798
  _inherits(GLTFValidator, GLTFParser1);
4829
4799
  function GLTFValidator() {
4830
- return GLTFParser1.apply(this, arguments);
4800
+ return GLTFParser1.apply(this, arguments) || this;
4831
4801
  }
4832
4802
  var _proto = GLTFValidator.prototype;
4833
4803
  _proto.parse = function parse(context) {
@@ -4859,32 +4829,32 @@ exports.GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
4859
4829
  return GLTFValidator;
4860
4830
  }(GLTFParser);
4861
4831
  exports.GLTFValidator = __decorate([
4862
- registerGLTFParser(exports.GLTFParserType.Validator)
4832
+ registerGLTFParser(GLTFParserType.Validator)
4863
4833
  ], exports.GLTFValidator);
4864
4834
 
4865
4835
  exports.GLTFBufferViewParser = /*#__PURE__*/ function(GLTFParser1) {
4866
4836
  _inherits(GLTFBufferViewParser, GLTFParser1);
4867
4837
  function GLTFBufferViewParser() {
4868
- return GLTFParser1.apply(this, arguments);
4838
+ return GLTFParser1.apply(this, arguments) || this;
4869
4839
  }
4870
4840
  var _proto = GLTFBufferViewParser.prototype;
4871
4841
  _proto.parse = function parse(context, index) {
4872
4842
  var bufferView = context.glTF.bufferViews[index];
4873
4843
  var extensions = bufferView.extensions, _bufferView_byteOffset = bufferView.byteOffset, byteOffset = _bufferView_byteOffset === void 0 ? 0 : _bufferView_byteOffset, byteLength = bufferView.byteLength, bufferIndex = bufferView.buffer;
4874
- return extensions ? GLTFParser.executeExtensionsCreateAndParse(extensions, context, bufferView) : context.get(exports.GLTFParserType.Buffer, bufferIndex).then(function(buffer) {
4844
+ return extensions ? GLTFParser.executeExtensionsCreateAndParse(extensions, context, bufferView) : context.get(GLTFParserType.Buffer, bufferIndex).then(function(buffer) {
4875
4845
  return new Uint8Array(buffer, byteOffset, byteLength);
4876
4846
  });
4877
4847
  };
4878
4848
  return GLTFBufferViewParser;
4879
4849
  }(GLTFParser);
4880
4850
  exports.GLTFBufferViewParser = __decorate([
4881
- registerGLTFParser(exports.GLTFParserType.BufferView)
4851
+ registerGLTFParser(GLTFParserType.BufferView)
4882
4852
  ], exports.GLTFBufferViewParser);
4883
4853
 
4884
- exports.GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser1) {
4885
- _inherits(GLTFAnimatorControllerParser, GLTFParser1);
4854
+ exports.GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser) {
4855
+ _inherits(GLTFAnimatorControllerParser, GLTFParser);
4886
4856
  function GLTFAnimatorControllerParser() {
4887
- return GLTFParser1.apply(this, arguments);
4857
+ return GLTFParser.apply(this, arguments) || this;
4888
4858
  }
4889
4859
  var _proto = GLTFAnimatorControllerParser.prototype;
4890
4860
  _proto.parse = function parse(context) {
@@ -4892,7 +4862,7 @@ exports.GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser1) {
4892
4862
  if (!context.needAnimatorController) {
4893
4863
  return Promise.resolve(null);
4894
4864
  }
4895
- return context.get(exports.GLTFParserType.Animation).then(function(animations) {
4865
+ return context.get(GLTFParserType.Animation).then(function(animations) {
4896
4866
  var animatorController = _this._createAnimatorController(context, animations);
4897
4867
  return Promise.resolve(animatorController);
4898
4868
  });
@@ -4922,95 +4892,12 @@ exports.GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser1) {
4922
4892
  return GLTFAnimatorControllerParser;
4923
4893
  }(GLTFParser);
4924
4894
  exports.GLTFAnimatorControllerParser = __decorate([
4925
- registerGLTFParser(exports.GLTFParserType.AnimatorController)
4895
+ registerGLTFParser(GLTFParserType.AnimatorController)
4926
4896
  ], exports.GLTFAnimatorControllerParser);
4927
4897
 
4928
4898
  // Source: https://github.com/zeux/meshoptimizer/blob/master/js/meshopt_decoder.js
4929
4899
  var ready;
4930
4900
  function getMeshoptDecoder() {
4931
- var unpack = function unpack(data) {
4932
- var result = new Uint8Array(data.length);
4933
- for(var i = 0; i < data.length; ++i){
4934
- var ch = data.charCodeAt(i);
4935
- result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
4936
- }
4937
- var write = 0;
4938
- for(var i1 = 0; i1 < data.length; ++i1){
4939
- result[write++] = result[i1] < 60 ? wasmpack[result[i1]] : (result[i1] - 60) * 64 + result[++i1];
4940
- }
4941
- return result.buffer.slice(0, write);
4942
- };
4943
- var decode = function decode(fun, target, count, size, source, filter) {
4944
- var sbrk = instance.exports.sbrk;
4945
- var count4 = count + 3 & ~3;
4946
- var tp = sbrk(count4 * size);
4947
- var sp = sbrk(source.length);
4948
- var heap = new Uint8Array(instance.exports.memory.buffer);
4949
- heap.set(source, sp);
4950
- var res = fun(tp, count, size, sp, source.length);
4951
- if (res == 0 && filter) {
4952
- filter(tp, count4, size);
4953
- }
4954
- target.set(heap.subarray(tp, tp + count * size));
4955
- sbrk(tp - sbrk(0));
4956
- if (res != 0) {
4957
- throw new Error("Malformed buffer data: " + res);
4958
- }
4959
- };
4960
- var createWorker = function createWorker(url) {
4961
- var worker = {
4962
- object: new Worker(url),
4963
- pending: 0,
4964
- requests: {}
4965
- };
4966
- worker.object.onmessage = function(event) {
4967
- var data = event.data;
4968
- worker.pending -= data.count;
4969
- worker.requests[data.id][data.action](data.value);
4970
- delete worker.requests[data.id];
4971
- };
4972
- return worker;
4973
- };
4974
- var initWorkers = function initWorkers(count) {
4975
- var source = "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(unpack(wasm)) + "]), {})" + ".then(function(result) {instance = result.instance; instance.exports.__wasm_call_ctors();});\n" + "self.onmessage = workerProcess;\n" + 'function decode(fun, target, count, size, source, filter) {\n const sbrk = instance.exports.sbrk;\n const count4 = (count + 3) & ~3;\n const tp = sbrk(count4 * size);\n const sp = sbrk(source.length);\n const heap = new Uint8Array(instance.exports.memory.buffer);\n heap.set(source, sp);\n const res = fun(tp, count, size, sp, source.length);\n if (res == 0 && filter) {\n filter(tp, count4, size);\n }\n target.set(heap.subarray(tp, tp + count * size));\n sbrk(tp - sbrk(0));\n if (res != 0) {\n throw new Error("Malformed buffer data: " + res);\n }\n }\n' + 'function workerProcess(event) {\n ready.then(function () {\n const data = event.data;\n try {\n const target = new Uint8Array(data.count * data.size);\n decode(instance.exports[data.mode], target, data.count, data.size, data.source, instance.exports[data.filter]);\n self.postMessage({ id: data.id, count: data.count, action: "resolve", value: target }, [target.buffer]);\n } catch (error) {\n self.postMessage({\n id: data.id,\n count: data.count,\n action: "reject",\n value: error\n });\n }\n });\n }';
4976
- var blob = new Blob([
4977
- source
4978
- ], {
4979
- type: "text/javascript"
4980
- });
4981
- var url = URL.createObjectURL(blob);
4982
- for(var i = 0; i < count; ++i){
4983
- workers[i] = createWorker(url);
4984
- }
4985
- URL.revokeObjectURL(url);
4986
- };
4987
- var decodeWorker = function decodeWorker(count, size, source, mode, filter) {
4988
- var worker = workers[0];
4989
- for(var i = 1; i < workers.length; ++i){
4990
- if (workers[i].pending < worker.pending) {
4991
- worker = workers[i];
4992
- }
4993
- }
4994
- return new Promise(function(resolve, reject) {
4995
- var data = new Uint8Array(source);
4996
- var id = requestId++;
4997
- worker.pending += count;
4998
- worker.requests[id] = {
4999
- resolve: resolve,
5000
- reject: reject
5001
- };
5002
- worker.object.postMessage({
5003
- id: id,
5004
- count: count,
5005
- size: size,
5006
- source: data,
5007
- mode: mode,
5008
- filter: filter
5009
- }, [
5010
- data.buffer
5011
- ]);
5012
- });
5013
- };
5014
4901
  if (ready) return ready;
5015
4902
  var wasm_base = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb";
5016
4903
  var wasm_simd = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb";
@@ -5106,6 +4993,35 @@ function getMeshoptDecoder() {
5106
4993
  }
5107
4994
  };
5108
4995
  });
4996
+ function unpack(data) {
4997
+ var result = new Uint8Array(data.length);
4998
+ for(var i = 0; i < data.length; ++i){
4999
+ var ch = data.charCodeAt(i);
5000
+ result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
5001
+ }
5002
+ var write = 0;
5003
+ for(var i1 = 0; i1 < data.length; ++i1){
5004
+ result[write++] = result[i1] < 60 ? wasmpack[result[i1]] : (result[i1] - 60) * 64 + result[++i1];
5005
+ }
5006
+ return result.buffer.slice(0, write);
5007
+ }
5008
+ function decode(fun, target, count, size, source, filter) {
5009
+ var sbrk = instance.exports.sbrk;
5010
+ var count4 = count + 3 & ~3;
5011
+ var tp = sbrk(count4 * size);
5012
+ var sp = sbrk(source.length);
5013
+ var heap = new Uint8Array(instance.exports.memory.buffer);
5014
+ heap.set(source, sp);
5015
+ var res = fun(tp, count, size, sp, source.length);
5016
+ if (res == 0 && filter) {
5017
+ filter(tp, count4, size);
5018
+ }
5019
+ target.set(heap.subarray(tp, tp + count * size));
5020
+ sbrk(tp - sbrk(0));
5021
+ if (res != 0) {
5022
+ throw new Error("Malformed buffer data: " + res);
5023
+ }
5024
+ }
5109
5025
  var filters = {
5110
5026
  NONE: "",
5111
5027
  OCTAHEDRAL: "meshopt_decodeFilterOct",
@@ -5119,13 +5035,67 @@ function getMeshoptDecoder() {
5119
5035
  };
5120
5036
  var workers = [];
5121
5037
  var requestId = 0;
5038
+ function createWorker(url) {
5039
+ var worker = {
5040
+ object: new Worker(url),
5041
+ pending: 0,
5042
+ requests: {}
5043
+ };
5044
+ worker.object.onmessage = function(event) {
5045
+ var data = event.data;
5046
+ worker.pending -= data.count;
5047
+ worker.requests[data.id][data.action](data.value);
5048
+ delete worker.requests[data.id];
5049
+ };
5050
+ return worker;
5051
+ }
5052
+ function initWorkers(count) {
5053
+ var source = "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(unpack(wasm)) + "]), {})" + ".then(function(result) {instance = result.instance; instance.exports.__wasm_call_ctors();});\n" + "self.onmessage = workerProcess;\n" + 'function decode(fun, target, count, size, source, filter) {\n const sbrk = instance.exports.sbrk;\n const count4 = (count + 3) & ~3;\n const tp = sbrk(count4 * size);\n const sp = sbrk(source.length);\n const heap = new Uint8Array(instance.exports.memory.buffer);\n heap.set(source, sp);\n const res = fun(tp, count, size, sp, source.length);\n if (res == 0 && filter) {\n filter(tp, count4, size);\n }\n target.set(heap.subarray(tp, tp + count * size));\n sbrk(tp - sbrk(0));\n if (res != 0) {\n throw new Error("Malformed buffer data: " + res);\n }\n }\n' + 'function workerProcess(event) {\n ready.then(function () {\n const data = event.data;\n try {\n const target = new Uint8Array(data.count * data.size);\n decode(instance.exports[data.mode], target, data.count, data.size, data.source, instance.exports[data.filter]);\n self.postMessage({ id: data.id, count: data.count, action: "resolve", value: target }, [target.buffer]);\n } catch (error) {\n self.postMessage({\n id: data.id,\n count: data.count,\n action: "reject",\n value: error\n });\n }\n });\n }';
5054
+ var blob = new Blob([
5055
+ source
5056
+ ], {
5057
+ type: "text/javascript"
5058
+ });
5059
+ var url = URL.createObjectURL(blob);
5060
+ for(var i = 0; i < count; ++i){
5061
+ workers[i] = createWorker(url);
5062
+ }
5063
+ URL.revokeObjectURL(url);
5064
+ }
5065
+ function decodeWorker(count, size, source, mode, filter) {
5066
+ var worker = workers[0];
5067
+ for(var i = 1; i < workers.length; ++i){
5068
+ if (workers[i].pending < worker.pending) {
5069
+ worker = workers[i];
5070
+ }
5071
+ }
5072
+ return new Promise(function(resolve, reject) {
5073
+ var data = new Uint8Array(source);
5074
+ var id = requestId++;
5075
+ worker.pending += count;
5076
+ worker.requests[id] = {
5077
+ resolve: resolve,
5078
+ reject: reject
5079
+ };
5080
+ worker.object.postMessage({
5081
+ id: id,
5082
+ count: count,
5083
+ size: size,
5084
+ source: data,
5085
+ mode: mode,
5086
+ filter: filter
5087
+ }, [
5088
+ data.buffer
5089
+ ]);
5090
+ });
5091
+ }
5122
5092
  return ready;
5123
5093
  }
5124
5094
 
5125
- exports.GLTFLoader = /*#__PURE__*/ function(Loader1) {
5126
- _inherits(GLTFLoader, Loader1);
5095
+ exports.GLTFLoader = /*#__PURE__*/ function(Loader) {
5096
+ _inherits(GLTFLoader, Loader);
5127
5097
  function GLTFLoader() {
5128
- return Loader1.apply(this, arguments);
5098
+ return Loader.apply(this, arguments) || this;
5129
5099
  }
5130
5100
  var _proto = GLTFLoader.prototype;
5131
5101
  _proto.initialize = function initialize(_, configuration) {
@@ -5170,12 +5140,11 @@ exports.GLTFLoader = __decorate([
5170
5140
  ])
5171
5141
  ], exports.GLTFLoader);
5172
5142
 
5173
- var PrefabParser = /*#__PURE__*/ function(HierarchyParser1) {
5174
- _inherits(PrefabParser, HierarchyParser1);
5143
+ var PrefabParser = /*#__PURE__*/ function(HierarchyParser) {
5144
+ _inherits(PrefabParser, HierarchyParser);
5175
5145
  function PrefabParser(data, context, prefabResource) {
5176
5146
  var _this;
5177
- _this = HierarchyParser1.call(this, data, context) || this;
5178
- _this.prefabResource = prefabResource;
5147
+ _this = HierarchyParser.call(this, data, context) || this, _this.prefabResource = prefabResource;
5179
5148
  return _this;
5180
5149
  }
5181
5150
  var _proto = PrefabParser.prototype;
@@ -5188,7 +5157,7 @@ var PrefabParser = /*#__PURE__*/ function(HierarchyParser1) {
5188
5157
  };
5189
5158
  PrefabParser.parse = function parse(engine, url, data) {
5190
5159
  var prefabResource = new PrefabResource(engine, url);
5191
- var context = new ParserContext(engine, exports.ParserType.Prefab, prefabResource);
5160
+ var context = new ParserContext(engine, ParserType.Prefab, prefabResource);
5192
5161
  var parser = new PrefabParser(data, context, prefabResource);
5193
5162
  parser.start();
5194
5163
  return parser.promise.then(function() {
@@ -5198,10 +5167,10 @@ var PrefabParser = /*#__PURE__*/ function(HierarchyParser1) {
5198
5167
  return PrefabParser;
5199
5168
  }(HierarchyParser);
5200
5169
 
5201
- var PrefabLoader = /*#__PURE__*/ function(Loader1) {
5202
- _inherits(PrefabLoader, Loader1);
5170
+ var PrefabLoader = /*#__PURE__*/ function(Loader) {
5171
+ _inherits(PrefabLoader, Loader);
5203
5172
  function PrefabLoader() {
5204
- return Loader1.apply(this, arguments);
5173
+ return Loader.apply(this, arguments) || this;
5205
5174
  }
5206
5175
  var _proto = PrefabLoader.prototype;
5207
5176
  _proto.load = function load(item, resourceManager) {
@@ -5223,15 +5192,14 @@ PrefabLoader = __decorate([
5223
5192
  ])
5224
5193
  ], PrefabLoader);
5225
5194
 
5226
- var _HDRLoader;
5227
5195
  var PI = Math.PI;
5228
- var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/HDR_Image_Reader.shtml
5229
- /*#__PURE__*/ function(Loader1) {
5230
- _inherits(HDRLoader1, Loader1);
5231
- function HDRLoader1() {
5232
- return Loader1.apply(this, arguments);
5196
+ // referenece: https://www.flipcode.com/archives/HDR_Image_Reader.shtml
5197
+ var HDRLoader = /*#__PURE__*/ function(Loader) {
5198
+ _inherits(HDRLoader, Loader);
5199
+ function HDRLoader() {
5200
+ return Loader.apply(this, arguments) || this;
5233
5201
  }
5234
- var _proto = HDRLoader1.prototype;
5202
+ var _proto = HDRLoader.prototype;
5235
5203
  _proto.load = function load(item, resourceManager) {
5236
5204
  return new engineCore.AssetPromise(function(resolve, reject) {
5237
5205
  var engine = resourceManager.engine;
@@ -5248,7 +5216,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5248
5216
  };
5249
5217
  /**
5250
5218
  * @internal
5251
- */ HDRLoader1._setTextureByBuffer = function _setTextureByBuffer(engine, buffer, texture) {
5219
+ */ HDRLoader._setTextureByBuffer = function _setTextureByBuffer(engine, buffer, texture) {
5252
5220
  var bufferArray = new Uint8Array(buffer);
5253
5221
  var _HDRLoader__parseHeader = HDRLoader._parseHeader(bufferArray), width = _HDRLoader__parseHeader.width, height = _HDRLoader__parseHeader.height, dataPosition = _HDRLoader__parseHeader.dataPosition;
5254
5222
  var cubeSize = height >> 1;
@@ -5261,7 +5229,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5261
5229
  texture.generateMipmaps();
5262
5230
  return texture;
5263
5231
  };
5264
- HDRLoader1._convertToCubemap = function _convertToCubemap(pixels, inputWidth, inputHeight, size) {
5232
+ HDRLoader._convertToCubemap = function _convertToCubemap(pixels, inputWidth, inputHeight, size) {
5265
5233
  if (!pixels) {
5266
5234
  throw "ConvertPanoramaToCubemap: input cannot be null";
5267
5235
  }
@@ -5283,7 +5251,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5283
5251
  textureBack
5284
5252
  ];
5285
5253
  };
5286
- HDRLoader1._createCubemapData = function _createCubemapData(texSize, faceData, pixels, inputWidth, inputHeight) {
5254
+ HDRLoader._createCubemapData = function _createCubemapData(texSize, faceData, pixels, inputWidth, inputHeight) {
5287
5255
  var textureArray = new Uint8ClampedArray(texSize * texSize * 4);
5288
5256
  var rotDX1 = this._tempVector3.set(0, 0, 0).add(faceData[1]).subtract(faceData[0]).scale(1 / texSize);
5289
5257
  var rotDX2 = this._temp2Vector3.set(0, 0, 0).add(faceData[3]).subtract(faceData[2]).scale(1 / texSize);
@@ -5311,7 +5279,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5311
5279
  }
5312
5280
  return textureArray;
5313
5281
  };
5314
- HDRLoader1._calcProjectionSpherical = function _calcProjectionSpherical(vDir, pixels, inputWidth, inputHeight) {
5282
+ HDRLoader._calcProjectionSpherical = function _calcProjectionSpherical(vDir, pixels, inputWidth, inputHeight) {
5315
5283
  var theta = Math.atan2(vDir.z, vDir.x);
5316
5284
  var phi = Math.acos(vDir.y);
5317
5285
  while(theta < -PI){
@@ -5344,7 +5312,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5344
5312
  var a = pixels[index + 3];
5345
5313
  return new engineMath.Color(r, g, b, a);
5346
5314
  };
5347
- HDRLoader1._readStringLine = function _readStringLine(uint8array, startIndex) {
5315
+ HDRLoader._readStringLine = function _readStringLine(uint8array, startIndex) {
5348
5316
  var line = "";
5349
5317
  var character = "";
5350
5318
  for(var i = startIndex; i < uint8array.length - startIndex; i++){
@@ -5356,7 +5324,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5356
5324
  }
5357
5325
  return line;
5358
5326
  };
5359
- HDRLoader1._parseHeader = function _parseHeader(uint8array) {
5327
+ HDRLoader._parseHeader = function _parseHeader(uint8array) {
5360
5328
  var height = 0;
5361
5329
  var width = 0;
5362
5330
  var line = this._readStringLine(uint8array, 0);
@@ -5398,7 +5366,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5398
5366
  dataPosition: lineIndex
5399
5367
  };
5400
5368
  };
5401
- HDRLoader1._readPixels = function _readPixels(buffer, width, height) {
5369
+ HDRLoader._readPixels = function _readPixels(buffer, width, height) {
5402
5370
  var scanLineWidth = width;
5403
5371
  var byteLength = buffer.byteLength;
5404
5372
  var dataRGBA = new Uint8Array(4 * width * height);
@@ -5460,14 +5428,14 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5460
5428
  }
5461
5429
  return dataRGBA;
5462
5430
  };
5463
- HDRLoader1._RGBEToLinear = function _RGBEToLinear(color) {
5431
+ HDRLoader._RGBEToLinear = function _RGBEToLinear(color) {
5464
5432
  var scaleFactor = Math.pow(2, color.a - 128) / 255;
5465
5433
  color.r *= scaleFactor;
5466
5434
  color.g *= scaleFactor;
5467
5435
  color.b *= scaleFactor;
5468
5436
  color.a = 1;
5469
5437
  };
5470
- HDRLoader1._linearToRGBM = function _linearToRGBM(color, maxRange) {
5438
+ HDRLoader._linearToRGBM = function _linearToRGBM(color, maxRange) {
5471
5439
  var maxRGB = Math.max(color.r, Math.max(color.g, color.b));
5472
5440
  var M = Math.min(maxRGB / maxRange, 1);
5473
5441
  M = Math.ceil(M * 255);
@@ -5477,76 +5445,57 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5477
5445
  color.b *= scaleFactor;
5478
5446
  color.a *= M;
5479
5447
  };
5480
- return HDRLoader1;
5481
- }(engineCore.Loader), function() {
5482
- _HDRLoader._rightBottomBack = new engineMath.Vector3(1.0, -1.0, -1.0);
5483
- }(), function() {
5484
- _HDRLoader._rightBottomFront = new engineMath.Vector3(1.0, -1.0, 1.0);
5485
- }(), function() {
5486
- _HDRLoader._rightUpBack = new engineMath.Vector3(1.0, 1.0, -1.0);
5487
- }(), function() {
5488
- _HDRLoader._rightUpFront = new engineMath.Vector3(1.0, 1.0, 1.0);
5489
- }(), function() {
5490
- _HDRLoader._leftBottomBack = new engineMath.Vector3(-1.0, -1.0, -1.0);
5491
- }(), function() {
5492
- _HDRLoader._leftBottomFront = new engineMath.Vector3(-1.0, -1.0, 1.0);
5493
- }(), function() {
5494
- _HDRLoader._leftUpBack = new engineMath.Vector3(-1.0, 1.0, -1.0);
5495
- }(), function() {
5496
- _HDRLoader._leftUpFront = new engineMath.Vector3(-1.0, 1.0, 1.0);
5497
- }(), function() {
5498
- _HDRLoader._faceRight = [
5499
- _HDRLoader._rightBottomBack,
5500
- _HDRLoader._rightBottomFront,
5501
- _HDRLoader._rightUpBack,
5502
- _HDRLoader._rightUpFront
5503
- ];
5504
- }(), function() {
5505
- _HDRLoader._faceLeft = [
5506
- _HDRLoader._leftBottomFront,
5507
- _HDRLoader._leftBottomBack,
5508
- _HDRLoader._leftUpFront,
5509
- _HDRLoader._leftUpBack
5510
- ];
5511
- }(), function() {
5512
- _HDRLoader._faceUp = [
5513
- _HDRLoader._leftBottomFront,
5514
- _HDRLoader._rightBottomFront,
5515
- _HDRLoader._leftBottomBack,
5516
- _HDRLoader._rightBottomBack
5517
- ];
5518
- }(), function() {
5519
- _HDRLoader._faceBottom = [
5520
- _HDRLoader._leftUpBack,
5521
- _HDRLoader._rightUpBack,
5522
- _HDRLoader._leftUpFront,
5523
- _HDRLoader._rightUpFront
5524
- ];
5525
- }(), function() {
5526
- _HDRLoader._faceFront = [
5527
- _HDRLoader._leftBottomBack,
5528
- _HDRLoader._rightBottomBack,
5529
- _HDRLoader._leftUpBack,
5530
- _HDRLoader._rightUpBack
5531
- ];
5532
- }(), function() {
5533
- _HDRLoader._faceBack = [
5534
- _HDRLoader._rightBottomFront,
5535
- _HDRLoader._leftBottomFront,
5536
- _HDRLoader._rightUpFront,
5537
- _HDRLoader._leftUpFront
5538
- ];
5539
- }(), function() {
5540
- _HDRLoader._tempVector3 = new engineMath.Vector3();
5541
- }(), function() {
5542
- _HDRLoader._temp2Vector3 = new engineMath.Vector3();
5543
- }(), function() {
5544
- _HDRLoader._temp3Vector3 = new engineMath.Vector3();
5545
- }(), function() {
5546
- _HDRLoader._temp4Vector3 = new engineMath.Vector3();
5547
- }(), function() {
5548
- _HDRLoader._temp5Vector3 = new engineMath.Vector3();
5549
- }(), _HDRLoader);
5448
+ return HDRLoader;
5449
+ }(engineCore.Loader);
5450
+ HDRLoader._rightBottomBack = new engineMath.Vector3(1.0, -1.0, -1.0);
5451
+ HDRLoader._rightBottomFront = new engineMath.Vector3(1.0, -1.0, 1.0);
5452
+ HDRLoader._rightUpBack = new engineMath.Vector3(1.0, 1.0, -1.0);
5453
+ HDRLoader._rightUpFront = new engineMath.Vector3(1.0, 1.0, 1.0);
5454
+ HDRLoader._leftBottomBack = new engineMath.Vector3(-1.0, -1.0, -1.0);
5455
+ HDRLoader._leftBottomFront = new engineMath.Vector3(-1.0, -1.0, 1.0);
5456
+ HDRLoader._leftUpBack = new engineMath.Vector3(-1.0, 1.0, -1.0);
5457
+ HDRLoader._leftUpFront = new engineMath.Vector3(-1.0, 1.0, 1.0);
5458
+ HDRLoader._faceRight = [
5459
+ HDRLoader._rightBottomBack,
5460
+ HDRLoader._rightBottomFront,
5461
+ HDRLoader._rightUpBack,
5462
+ HDRLoader._rightUpFront
5463
+ ];
5464
+ HDRLoader._faceLeft = [
5465
+ HDRLoader._leftBottomFront,
5466
+ HDRLoader._leftBottomBack,
5467
+ HDRLoader._leftUpFront,
5468
+ HDRLoader._leftUpBack
5469
+ ];
5470
+ HDRLoader._faceUp = [
5471
+ HDRLoader._leftBottomFront,
5472
+ HDRLoader._rightBottomFront,
5473
+ HDRLoader._leftBottomBack,
5474
+ HDRLoader._rightBottomBack
5475
+ ];
5476
+ HDRLoader._faceBottom = [
5477
+ HDRLoader._leftUpBack,
5478
+ HDRLoader._rightUpBack,
5479
+ HDRLoader._leftUpFront,
5480
+ HDRLoader._rightUpFront
5481
+ ];
5482
+ HDRLoader._faceFront = [
5483
+ HDRLoader._leftBottomBack,
5484
+ HDRLoader._rightBottomBack,
5485
+ HDRLoader._leftUpBack,
5486
+ HDRLoader._rightUpBack
5487
+ ];
5488
+ HDRLoader._faceBack = [
5489
+ HDRLoader._rightBottomFront,
5490
+ HDRLoader._leftBottomFront,
5491
+ HDRLoader._rightUpFront,
5492
+ HDRLoader._leftUpFront
5493
+ ];
5494
+ HDRLoader._tempVector3 = new engineMath.Vector3();
5495
+ HDRLoader._temp2Vector3 = new engineMath.Vector3();
5496
+ HDRLoader._temp3Vector3 = new engineMath.Vector3();
5497
+ HDRLoader._temp4Vector3 = new engineMath.Vector3();
5498
+ HDRLoader._temp5Vector3 = new engineMath.Vector3();
5550
5499
  HDRLoader = __decorate([
5551
5500
  engineCore.resourceLoader(engineCore.AssetType.HDR, [
5552
5501
  "hdr"
@@ -5554,13 +5503,11 @@ HDRLoader = __decorate([
5554
5503
  ], HDRLoader);
5555
5504
  /**
5556
5505
  * @internal
5557
- */ var HDRContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
5558
- _inherits(HDRContentRestorer, ContentRestorer1);
5506
+ */ var HDRContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
5507
+ _inherits(HDRContentRestorer, ContentRestorer);
5559
5508
  function HDRContentRestorer(resource, url, requestConfig) {
5560
5509
  var _this;
5561
- _this = ContentRestorer1.call(this, resource) || this;
5562
- _this.url = url;
5563
- _this.requestConfig = requestConfig;
5510
+ _this = ContentRestorer.call(this, resource) || this, _this.url = url, _this.requestConfig = requestConfig;
5564
5511
  return _this;
5565
5512
  }
5566
5513
  var _proto = HDRContentRestorer.prototype;
@@ -5576,10 +5523,10 @@ HDRLoader = __decorate([
5576
5523
  return HDRContentRestorer;
5577
5524
  }(engineCore.ContentRestorer);
5578
5525
 
5579
- var JSONLoader = /*#__PURE__*/ function(Loader1) {
5580
- _inherits(JSONLoader, Loader1);
5526
+ var JSONLoader = /*#__PURE__*/ function(Loader) {
5527
+ _inherits(JSONLoader, Loader);
5581
5528
  function JSONLoader() {
5582
- return Loader1.apply(this, arguments);
5529
+ return Loader.apply(this, arguments) || this;
5583
5530
  }
5584
5531
  var _proto = JSONLoader.prototype;
5585
5532
  _proto.load = function load(item, resourceManager) {
@@ -5781,10 +5728,10 @@ function parseCubeKTX(dataArray) {
5781
5728
  };
5782
5729
  }
5783
5730
 
5784
- var KTXCubeLoader = /*#__PURE__*/ function(Loader1) {
5785
- _inherits(KTXCubeLoader, Loader1);
5731
+ var KTXCubeLoader = /*#__PURE__*/ function(Loader) {
5732
+ _inherits(KTXCubeLoader, Loader);
5786
5733
  function KTXCubeLoader() {
5787
- return Loader1.apply(this, arguments);
5734
+ return Loader.apply(this, arguments) || this;
5788
5735
  }
5789
5736
  var _proto = KTXCubeLoader.prototype;
5790
5737
  _proto.load = function load(item, resourceManager) {
@@ -5818,10 +5765,10 @@ KTXCubeLoader = __decorate([
5818
5765
  engineCore.resourceLoader(engineCore.AssetType.KTXCube, [])
5819
5766
  ], KTXCubeLoader);
5820
5767
 
5821
- var KTXLoader = /*#__PURE__*/ function(Loader1) {
5822
- _inherits(KTXLoader, Loader1);
5768
+ var KTXLoader = /*#__PURE__*/ function(Loader) {
5769
+ _inherits(KTXLoader, Loader);
5823
5770
  function KTXLoader() {
5824
- return Loader1.apply(this, arguments);
5771
+ return Loader.apply(this, arguments) || this;
5825
5772
  }
5826
5773
  var _proto = KTXLoader.prototype;
5827
5774
  _proto.load = function load(item, resourceManager) {
@@ -5853,7 +5800,7 @@ KTXLoader = __decorate([
5853
5800
  ], KTXLoader);
5854
5801
 
5855
5802
  function parseProperty(object, key, value) {
5856
- if (typeof value === "object") {
5803
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") {
5857
5804
  for(var subKey in value){
5858
5805
  parseProperty(object[key], subKey, value[subKey]);
5859
5806
  }
@@ -5861,10 +5808,10 @@ function parseProperty(object, key, value) {
5861
5808
  object[key] = value;
5862
5809
  }
5863
5810
  }
5864
- var MaterialLoader = /*#__PURE__*/ function(Loader1) {
5865
- _inherits(MaterialLoader, Loader1);
5811
+ var MaterialLoader = /*#__PURE__*/ function(Loader) {
5812
+ _inherits(MaterialLoader, Loader);
5866
5813
  function MaterialLoader() {
5867
- return Loader1.apply(this, arguments);
5814
+ return Loader.apply(this, arguments) || this;
5868
5815
  }
5869
5816
  var _proto = MaterialLoader.prototype;
5870
5817
  _proto.load = function load(item, resourceManager) {
@@ -5892,31 +5839,31 @@ var MaterialLoader = /*#__PURE__*/ function(Loader1) {
5892
5839
  var _loop = function(key) {
5893
5840
  var _shaderData_key = shaderData[key], type = _shaderData_key.type, value = _shaderData_key.value;
5894
5841
  switch(type){
5895
- case exports.MaterialLoaderType.Vector2:
5842
+ case MaterialLoaderType.Vector2:
5896
5843
  materialShaderData.setVector2(key, new engineMath.Vector2(value.x, value.y));
5897
5844
  break;
5898
- case exports.MaterialLoaderType.Vector3:
5845
+ case MaterialLoaderType.Vector3:
5899
5846
  materialShaderData.setVector3(key, new engineMath.Vector3(value.x, value.y, value.z));
5900
5847
  break;
5901
- case exports.MaterialLoaderType.Vector4:
5848
+ case MaterialLoaderType.Vector4:
5902
5849
  materialShaderData.setVector4(key, new engineMath.Vector4(value.x, value.y, value.z, value.w));
5903
5850
  break;
5904
- case exports.MaterialLoaderType.Color:
5851
+ case MaterialLoaderType.Color:
5905
5852
  materialShaderData.setColor(key, new engineMath.Color(value.r, value.g, value.b, value.a));
5906
5853
  break;
5907
- case exports.MaterialLoaderType.Float:
5854
+ case MaterialLoaderType.Float:
5908
5855
  materialShaderData.setFloat(key, value);
5909
5856
  break;
5910
- case exports.MaterialLoaderType.Texture:
5857
+ case MaterialLoaderType.Texture:
5911
5858
  texturePromises.push(// @ts-ignore
5912
5859
  engine.resourceManager.getResourceByRef(value).then(function(texture) {
5913
5860
  materialShaderData.setTexture(key, texture);
5914
5861
  }));
5915
5862
  break;
5916
- case exports.MaterialLoaderType.Boolean:
5863
+ case MaterialLoaderType.Boolean:
5917
5864
  materialShaderData.setInt(key, value ? 1 : 0);
5918
5865
  break;
5919
- case exports.MaterialLoaderType.Integer:
5866
+ case MaterialLoaderType.Integer:
5920
5867
  materialShaderData.setInt(key, Number(value));
5921
5868
  break;
5922
5869
  }
@@ -5948,10 +5895,10 @@ MaterialLoader = __decorate([
5948
5895
  ])
5949
5896
  ], MaterialLoader);
5950
5897
 
5951
- var MeshLoader = /*#__PURE__*/ function(Loader1) {
5952
- _inherits(MeshLoader, Loader1);
5898
+ var MeshLoader = /*#__PURE__*/ function(Loader) {
5899
+ _inherits(MeshLoader, Loader);
5953
5900
  function MeshLoader() {
5954
- return Loader1.apply(this, arguments);
5901
+ return Loader.apply(this, arguments) || this;
5955
5902
  }
5956
5903
  var _proto = MeshLoader.prototype;
5957
5904
  _proto.load = function load(item, resourceManager) {
@@ -5974,10 +5921,10 @@ MeshLoader = __decorate([
5974
5921
  ])
5975
5922
  ], MeshLoader);
5976
5923
 
5977
- var PrimitiveMeshLoader = /*#__PURE__*/ function(Loader1) {
5978
- _inherits(PrimitiveMeshLoader, Loader1);
5924
+ var PrimitiveMeshLoader = /*#__PURE__*/ function(Loader) {
5925
+ _inherits(PrimitiveMeshLoader, Loader);
5979
5926
  function PrimitiveMeshLoader() {
5980
- return Loader1.apply(this, arguments);
5927
+ return Loader.apply(this, arguments) || this;
5981
5928
  }
5982
5929
  var _proto = PrimitiveMeshLoader.prototype;
5983
5930
  _proto.load = function load(item, resourceManager) {
@@ -6011,21 +5958,11 @@ PrimitiveMeshLoader = __decorate([
6011
5958
  "mesh"
6012
5959
  ], false)
6013
5960
  ], PrimitiveMeshLoader);
6014
- var /** @internal */ PrimitiveMeshType;
6015
- (function(PrimitiveMeshType) {
6016
- PrimitiveMeshType["Sphere"] = "sphere";
6017
- PrimitiveMeshType["Cuboid"] = "cuboid";
6018
- PrimitiveMeshType["Plane"] = "plane";
6019
- PrimitiveMeshType["Cylinder"] = "cylinder";
6020
- PrimitiveMeshType["Torus"] = "torus";
6021
- PrimitiveMeshType["Cone"] = "cone";
6022
- PrimitiveMeshType["Capsule"] = "capsule";
6023
- })(PrimitiveMeshType || (PrimitiveMeshType = {}));
6024
-
6025
- var ProjectLoader = /*#__PURE__*/ function(Loader1) {
6026
- _inherits(ProjectLoader, Loader1);
5961
+
5962
+ var ProjectLoader = /*#__PURE__*/ function(Loader) {
5963
+ _inherits(ProjectLoader, Loader);
6027
5964
  function ProjectLoader() {
6028
- return Loader1.apply(this, arguments);
5965
+ return Loader.apply(this, arguments) || this;
6029
5966
  }
6030
5967
  var _proto = ProjectLoader.prototype;
6031
5968
  _proto.load = function load(item, resourceManager) {
@@ -6055,10 +5992,10 @@ ProjectLoader = __decorate([
6055
5992
  ], false)
6056
5993
  ], ProjectLoader);
6057
5994
 
6058
- var SourceFontLoader = /*#__PURE__*/ function(Loader1) {
6059
- _inherits(SourceFontLoader, Loader1);
5995
+ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
5996
+ _inherits(SourceFontLoader, Loader);
6060
5997
  function SourceFontLoader() {
6061
- return Loader1.apply(this, arguments);
5998
+ return Loader.apply(this, arguments) || this;
6062
5999
  }
6063
6000
  var _proto = SourceFontLoader.prototype;
6064
6001
  _proto.load = function load(item, resourceManager) {
@@ -6105,14 +6042,11 @@ SourceFontLoader = __decorate([
6105
6042
  ], false)
6106
6043
  ], SourceFontLoader);
6107
6044
 
6108
- var SpriteAtlasLoader = /*#__PURE__*/ function(Loader1) {
6109
- _inherits(SpriteAtlasLoader, Loader1);
6045
+ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
6046
+ _inherits(SpriteAtlasLoader, Loader);
6110
6047
  function SpriteAtlasLoader() {
6111
6048
  var _this;
6112
- _this = Loader1.apply(this, arguments) || this;
6113
- _this._tempRect = new engineMath.Rect();
6114
- _this._tempVec2 = new engineMath.Vector2();
6115
- _this._tempVec4 = new engineMath.Vector4();
6049
+ _this = Loader.apply(this, arguments) || this, _this._tempRect = new engineMath.Rect(), _this._tempVec2 = new engineMath.Vector2(), _this._tempVec4 = new engineMath.Vector4();
6116
6050
  return _this;
6117
6051
  }
6118
6052
  var _proto = SpriteAtlasLoader.prototype;
@@ -6201,10 +6135,10 @@ SpriteAtlasLoader = __decorate([
6201
6135
  ], false)
6202
6136
  ], SpriteAtlasLoader);
6203
6137
 
6204
- var SpriteLoader = /*#__PURE__*/ function(Loader1) {
6205
- _inherits(SpriteLoader, Loader1);
6138
+ var SpriteLoader = /*#__PURE__*/ function(Loader) {
6139
+ _inherits(SpriteLoader, Loader);
6206
6140
  function SpriteLoader() {
6207
- return Loader1.apply(this, arguments);
6141
+ return Loader.apply(this, arguments) || this;
6208
6142
  }
6209
6143
  var _proto = SpriteLoader.prototype;
6210
6144
  _proto.load = function load(item, resourceManager) {
@@ -6253,13 +6187,11 @@ SpriteLoader = __decorate([
6253
6187
 
6254
6188
  /**
6255
6189
  * @internal
6256
- */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
6257
- _inherits(Texture2DContentRestorer, ContentRestorer1);
6190
+ */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
6191
+ _inherits(Texture2DContentRestorer, ContentRestorer);
6258
6192
  function Texture2DContentRestorer(resource, url, requestConfig) {
6259
6193
  var _this;
6260
- _this = ContentRestorer1.call(this, resource) || this;
6261
- _this.url = url;
6262
- _this.requestConfig = requestConfig;
6194
+ _this = ContentRestorer.call(this, resource) || this, _this.url = url, _this.requestConfig = requestConfig;
6263
6195
  return _this;
6264
6196
  }
6265
6197
  var _proto = Texture2DContentRestorer.prototype;
@@ -6275,10 +6207,10 @@ SpriteLoader = __decorate([
6275
6207
  return Texture2DContentRestorer;
6276
6208
  }(engineCore.ContentRestorer);
6277
6209
 
6278
- var Texture2DLoader = /*#__PURE__*/ function(Loader1) {
6279
- _inherits(Texture2DLoader, Loader1);
6210
+ var Texture2DLoader = /*#__PURE__*/ function(Loader) {
6211
+ _inherits(Texture2DLoader, Loader);
6280
6212
  function Texture2DLoader() {
6281
- return Loader1.apply(this, arguments);
6213
+ return Loader.apply(this, arguments) || this;
6282
6214
  }
6283
6215
  var _proto = Texture2DLoader.prototype;
6284
6216
  _proto.load = function load(item, resourceManager) {
@@ -6322,13 +6254,11 @@ Texture2DLoader = __decorate([
6322
6254
 
6323
6255
  /**
6324
6256
  * @internal
6325
- */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
6326
- _inherits(TextureCubeContentRestorer, ContentRestorer1);
6257
+ */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
6258
+ _inherits(TextureCubeContentRestorer, ContentRestorer);
6327
6259
  function TextureCubeContentRestorer(resource, urls, requestConfig) {
6328
6260
  var _this;
6329
- _this = ContentRestorer1.call(this, resource) || this;
6330
- _this.urls = urls;
6331
- _this.requestConfig = requestConfig;
6261
+ _this = ContentRestorer.call(this, resource) || this, _this.urls = urls, _this.requestConfig = requestConfig;
6332
6262
  return _this;
6333
6263
  }
6334
6264
  var _proto = TextureCubeContentRestorer.prototype;
@@ -6352,10 +6282,10 @@ Texture2DLoader = __decorate([
6352
6282
  return TextureCubeContentRestorer;
6353
6283
  }(engineCore.ContentRestorer);
6354
6284
 
6355
- var TextureCubeLoader = /*#__PURE__*/ function(Loader1) {
6356
- _inherits(TextureCubeLoader, Loader1);
6285
+ var TextureCubeLoader = /*#__PURE__*/ function(Loader) {
6286
+ _inherits(TextureCubeLoader, Loader);
6357
6287
  function TextureCubeLoader() {
6358
- return Loader1.apply(this, arguments);
6288
+ return Loader.apply(this, arguments) || this;
6359
6289
  }
6360
6290
  var _proto = TextureCubeLoader.prototype;
6361
6291
  _proto.load = function load(item, resourceManager) {
@@ -6393,13 +6323,12 @@ TextureCubeLoader = __decorate([
6393
6323
  ])
6394
6324
  ], TextureCubeLoader);
6395
6325
 
6396
- var _ShaderChunkLoader;
6397
- var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6398
- _inherits(ShaderChunkLoader1, Loader1);
6399
- function ShaderChunkLoader1() {
6400
- return Loader1.apply(this, arguments);
6326
+ var ShaderChunkLoader = /*#__PURE__*/ function(Loader) {
6327
+ _inherits(ShaderChunkLoader, Loader);
6328
+ function ShaderChunkLoader() {
6329
+ return Loader.apply(this, arguments) || this;
6401
6330
  }
6402
- var _proto = ShaderChunkLoader1.prototype;
6331
+ var _proto = ShaderChunkLoader.prototype;
6403
6332
  _proto.load = function load(item, resourceManager) {
6404
6333
  var url = item.url;
6405
6334
  // @ts-ignore
@@ -6412,7 +6341,7 @@ var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6412
6341
  };
6413
6342
  /**
6414
6343
  * @internal
6415
- */ ShaderChunkLoader1._loadChunksInCode = function _loadChunksInCode(code, basePath, resourceManager) {
6344
+ */ ShaderChunkLoader._loadChunksInCode = function _loadChunksInCode(code, basePath, resourceManager) {
6416
6345
  var shaderChunkPaths = new Array();
6417
6346
  var matches = code.matchAll(ShaderChunkLoader._shaderIncludeRegex);
6418
6347
  for(var _iterator = _create_for_of_iterator_helper_loose(matches), _step; !(_step = _iterator()).done;){
@@ -6429,23 +6358,21 @@ var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6429
6358
  });
6430
6359
  }));
6431
6360
  };
6432
- return ShaderChunkLoader1;
6433
- }(engineCore.Loader), function() {
6434
- _ShaderChunkLoader._shaderIncludeRegex = /\s#include\s+"([./][^\\"]+)"/gm;
6435
- }(), _ShaderChunkLoader);
6361
+ return ShaderChunkLoader;
6362
+ }(engineCore.Loader);
6363
+ ShaderChunkLoader._shaderIncludeRegex = /\s#include\s+"([./][^\\"]+)"/gm;
6436
6364
  ShaderChunkLoader = __decorate([
6437
6365
  engineCore.resourceLoader("ShaderChunk", [
6438
6366
  "glsl"
6439
6367
  ])
6440
6368
  ], ShaderChunkLoader);
6441
6369
 
6442
- var _ShaderLoader;
6443
- var ShaderLoader = (_ShaderLoader = /*#__PURE__*/ function(Loader1) {
6444
- _inherits(ShaderLoader1, Loader1);
6445
- function ShaderLoader1() {
6446
- return Loader1.apply(this, arguments);
6370
+ var ShaderLoader = /*#__PURE__*/ function(Loader) {
6371
+ _inherits(ShaderLoader, Loader);
6372
+ function ShaderLoader() {
6373
+ return Loader.apply(this, arguments) || this;
6447
6374
  }
6448
- var _proto = ShaderLoader1.prototype;
6375
+ var _proto = ShaderLoader.prototype;
6449
6376
  _proto.load = function load(item, resourceManager) {
6450
6377
  var _this = this;
6451
6378
  var url = item.url;
@@ -6469,10 +6396,9 @@ var ShaderLoader = (_ShaderLoader = /*#__PURE__*/ function(Loader1) {
6469
6396
  var match = code.match(ShaderLoader._builtinRegex);
6470
6397
  if (match && match[1]) return match[1];
6471
6398
  };
6472
- return ShaderLoader1;
6473
- }(engineCore.Loader), function() {
6474
- _ShaderLoader._builtinRegex = /^\s*\/\/\s*@builtin\s+(\w+)/;
6475
- }(), _ShaderLoader);
6399
+ return ShaderLoader;
6400
+ }(engineCore.Loader);
6401
+ ShaderLoader._builtinRegex = /^\s*\/\/\s*@builtin\s+(\w+)/;
6476
6402
  ShaderLoader = __decorate([
6477
6403
  engineCore.resourceLoader(engineCore.AssetType.Shader, [
6478
6404
  "gs",
@@ -6480,10 +6406,10 @@ ShaderLoader = __decorate([
6480
6406
  ])
6481
6407
  ], ShaderLoader);
6482
6408
 
6483
- var SceneLoader = /*#__PURE__*/ function(Loader1) {
6484
- _inherits(SceneLoader, Loader1);
6409
+ var SceneLoader = /*#__PURE__*/ function(Loader) {
6410
+ _inherits(SceneLoader, Loader);
6485
6411
  function SceneLoader() {
6486
- return Loader1.apply(this, arguments);
6412
+ return Loader.apply(this, arguments) || this;
6487
6413
  }
6488
6414
  var _proto = SceneLoader.prototype;
6489
6415
  _proto.load = function load(item, resourceManager) {
@@ -6498,7 +6424,7 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
6498
6424
  // parse ambient light
6499
6425
  var ambient = data.scene.ambient;
6500
6426
  if (ambient) {
6501
- var useCustomAmbient = ambient.specularMode === exports.SpecularMode.Custom;
6427
+ var useCustomAmbient = ambient.specularMode === SpecularMode.Custom;
6502
6428
  var useSH = ambient.diffuseMode === engineCore.DiffuseMode.SphericalHarmonics;
6503
6429
  scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
6504
6430
  scene.ambientLight.specularIntensity = ambient.specularIntensity;
@@ -6508,20 +6434,17 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
6508
6434
  if (useCustomAmbient && ambient.customAmbientLight) {
6509
6435
  promises.push(// @ts-ignore
6510
6436
  resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
6511
- var _ambientLight;
6512
- scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
6437
+ scene.ambientLight.specularTexture = ambientLight == null ? void 0 : ambientLight.specularTexture;
6513
6438
  }));
6514
6439
  }
6515
6440
  if (ambient.ambientLight && (!useCustomAmbient || useSH)) {
6516
6441
  promises.push(// @ts-ignore
6517
6442
  resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
6518
6443
  if (!useCustomAmbient) {
6519
- var _ambientLight;
6520
- scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
6444
+ scene.ambientLight.specularTexture = ambientLight == null ? void 0 : ambientLight.specularTexture;
6521
6445
  }
6522
6446
  if (useSH) {
6523
- var _ambientLight1;
6524
- scene.ambientLight.diffuseSphericalHarmonics = (_ambientLight1 = ambientLight) == null ? void 0 : _ambientLight1.diffuseSphericalHarmonics;
6447
+ scene.ambientLight.diffuseSphericalHarmonics = ambientLight == null ? void 0 : ambientLight.diffuseSphericalHarmonics;
6525
6448
  }
6526
6449
  }));
6527
6450
  }
@@ -6642,10 +6565,10 @@ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _asy
6642
6565
  });
6643
6566
  }));
6644
6567
 
6645
- var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser1) {
6646
- _inherits(KHR_lights_punctual, GLTFExtensionParser1);
6568
+ var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser) {
6569
+ _inherits(KHR_lights_punctual, GLTFExtensionParser);
6647
6570
  function KHR_lights_punctual() {
6648
- return GLTFExtensionParser1.apply(this, arguments);
6571
+ return GLTFExtensionParser.apply(this, arguments) || this;
6649
6572
  }
6650
6573
  var _proto = KHR_lights_punctual.prototype;
6651
6574
  _proto.additiveParse = function additiveParse(context, entity, extensionSchema) {
@@ -6680,13 +6603,13 @@ var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser1) {
6680
6603
  return KHR_lights_punctual;
6681
6604
  }(GLTFExtensionParser);
6682
6605
  KHR_lights_punctual = __decorate([
6683
- registerGLTFExtension("KHR_lights_punctual", exports.GLTFExtensionMode.AdditiveParse)
6606
+ registerGLTFExtension("KHR_lights_punctual", GLTFExtensionMode.AdditiveParse)
6684
6607
  ], KHR_lights_punctual);
6685
6608
 
6686
- var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser1) {
6687
- _inherits(KHR_materials_clearcoat, GLTFExtensionParser1);
6609
+ var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser) {
6610
+ _inherits(KHR_materials_clearcoat, GLTFExtensionParser);
6688
6611
  function KHR_materials_clearcoat() {
6689
- return GLTFExtensionParser1.apply(this, arguments);
6612
+ return GLTFExtensionParser.apply(this, arguments) || this;
6690
6613
  }
6691
6614
  var _proto = KHR_materials_clearcoat.prototype;
6692
6615
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6695,19 +6618,19 @@ var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser1) {
6695
6618
  material.clearCoatRoughness = clearcoatRoughnessFactor;
6696
6619
  if (clearcoatTexture) {
6697
6620
  exports.GLTFMaterialParser._checkOtherTextureTransform(clearcoatTexture, "Clear coat");
6698
- context.get(exports.GLTFParserType.Texture, clearcoatTexture.index).then(function(texture) {
6621
+ context.get(GLTFParserType.Texture, clearcoatTexture.index).then(function(texture) {
6699
6622
  material.clearCoatTexture = texture;
6700
6623
  });
6701
6624
  }
6702
6625
  if (clearcoatRoughnessTexture) {
6703
6626
  exports.GLTFMaterialParser._checkOtherTextureTransform(clearcoatRoughnessTexture, "Clear coat roughness");
6704
- context.get(exports.GLTFParserType.Texture, clearcoatRoughnessTexture.index).then(function(texture) {
6627
+ context.get(GLTFParserType.Texture, clearcoatRoughnessTexture.index).then(function(texture) {
6705
6628
  material.clearCoatRoughnessTexture = texture;
6706
6629
  });
6707
6630
  }
6708
6631
  if (clearcoatNormalTexture) {
6709
6632
  exports.GLTFMaterialParser._checkOtherTextureTransform(clearcoatNormalTexture, "Clear coat normal");
6710
- context.get(exports.GLTFParserType.Texture, clearcoatNormalTexture.index).then(function(texture) {
6633
+ context.get(GLTFParserType.Texture, clearcoatNormalTexture.index).then(function(texture) {
6711
6634
  material.clearCoatNormalTexture = texture;
6712
6635
  });
6713
6636
  }
@@ -6715,13 +6638,13 @@ var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser1) {
6715
6638
  return KHR_materials_clearcoat;
6716
6639
  }(GLTFExtensionParser);
6717
6640
  KHR_materials_clearcoat = __decorate([
6718
- registerGLTFExtension("KHR_materials_clearcoat", exports.GLTFExtensionMode.AdditiveParse)
6641
+ registerGLTFExtension("KHR_materials_clearcoat", GLTFExtensionMode.AdditiveParse)
6719
6642
  ], KHR_materials_clearcoat);
6720
6643
 
6721
- var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser1) {
6722
- _inherits(KHR_materials_ior, GLTFExtensionParser1);
6644
+ var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser) {
6645
+ _inherits(KHR_materials_ior, GLTFExtensionParser);
6723
6646
  function KHR_materials_ior() {
6724
- return GLTFExtensionParser1.apply(this, arguments);
6647
+ return GLTFExtensionParser.apply(this, arguments) || this;
6725
6648
  }
6726
6649
  var _proto = KHR_materials_ior.prototype;
6727
6650
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6731,13 +6654,13 @@ var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser1) {
6731
6654
  return KHR_materials_ior;
6732
6655
  }(GLTFExtensionParser);
6733
6656
  KHR_materials_ior = __decorate([
6734
- registerGLTFExtension("KHR_materials_ior", exports.GLTFExtensionMode.AdditiveParse)
6657
+ registerGLTFExtension("KHR_materials_ior", GLTFExtensionMode.AdditiveParse)
6735
6658
  ], KHR_materials_ior);
6736
6659
 
6737
- var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser1) {
6738
- _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser1);
6660
+ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser) {
6661
+ _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser);
6739
6662
  function KHR_materials_pbrSpecularGlossiness() {
6740
- return GLTFExtensionParser1.apply(this, arguments);
6663
+ return GLTFExtensionParser.apply(this, arguments) || this;
6741
6664
  }
6742
6665
  var _proto = KHR_materials_pbrSpecularGlossiness.prototype;
6743
6666
  _proto.createAndParse = function createAndParse(context, schema, ownerSchema) {
@@ -6748,7 +6671,7 @@ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionPa
6748
6671
  material.baseColor = new engineMath.Color(engineMath.Color.linearToGammaSpace(diffuseFactor[0]), engineMath.Color.linearToGammaSpace(diffuseFactor[1]), engineMath.Color.linearToGammaSpace(diffuseFactor[2]), diffuseFactor[3]);
6749
6672
  }
6750
6673
  if (diffuseTexture) {
6751
- context.get(exports.GLTFParserType.Texture, diffuseTexture.index).then(function(texture) {
6674
+ context.get(GLTFParserType.Texture, diffuseTexture.index).then(function(texture) {
6752
6675
  material.baseTexture = texture;
6753
6676
  GLTFParser.executeExtensionsAdditiveAndParse(diffuseTexture.extensions, context, material, diffuseTexture);
6754
6677
  });
@@ -6761,7 +6684,7 @@ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionPa
6761
6684
  }
6762
6685
  if (specularGlossinessTexture) {
6763
6686
  exports.GLTFMaterialParser._checkOtherTextureTransform(specularGlossinessTexture, "Specular glossiness");
6764
- context.get(exports.GLTFParserType.Texture, specularGlossinessTexture.index).then(function(texture) {
6687
+ context.get(GLTFParserType.Texture, specularGlossinessTexture.index).then(function(texture) {
6765
6688
  material.specularGlossinessTexture = texture;
6766
6689
  });
6767
6690
  }
@@ -6772,13 +6695,13 @@ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionPa
6772
6695
  return KHR_materials_pbrSpecularGlossiness;
6773
6696
  }(GLTFExtensionParser);
6774
6697
  KHR_materials_pbrSpecularGlossiness = __decorate([
6775
- registerGLTFExtension("KHR_materials_pbrSpecularGlossiness", exports.GLTFExtensionMode.CreateAndParse)
6698
+ registerGLTFExtension("KHR_materials_pbrSpecularGlossiness", GLTFExtensionMode.CreateAndParse)
6776
6699
  ], KHR_materials_pbrSpecularGlossiness);
6777
6700
 
6778
- var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser1) {
6779
- _inherits(KHR_materials_unlit, GLTFExtensionParser1);
6701
+ var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser) {
6702
+ _inherits(KHR_materials_unlit, GLTFExtensionParser);
6780
6703
  function KHR_materials_unlit() {
6781
- return GLTFExtensionParser1.apply(this, arguments);
6704
+ return GLTFExtensionParser.apply(this, arguments) || this;
6782
6705
  }
6783
6706
  var _proto = KHR_materials_unlit.prototype;
6784
6707
  _proto.createAndParse = function createAndParse(context, _, ownerSchema) {
@@ -6791,19 +6714,19 @@ var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser1) {
6791
6714
  return KHR_materials_unlit;
6792
6715
  }(GLTFExtensionParser);
6793
6716
  KHR_materials_unlit = __decorate([
6794
- registerGLTFExtension("KHR_materials_unlit", exports.GLTFExtensionMode.CreateAndParse)
6717
+ registerGLTFExtension("KHR_materials_unlit", GLTFExtensionMode.CreateAndParse)
6795
6718
  ], KHR_materials_unlit);
6796
6719
 
6797
- var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser1) {
6798
- _inherits(KHR_materials_variants, GLTFExtensionParser1);
6720
+ var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser) {
6721
+ _inherits(KHR_materials_variants, GLTFExtensionParser);
6799
6722
  function KHR_materials_variants() {
6800
- return GLTFExtensionParser1.apply(this, arguments);
6723
+ return GLTFExtensionParser.apply(this, arguments) || this;
6801
6724
  }
6802
6725
  var _proto = KHR_materials_variants.prototype;
6803
6726
  _proto.additiveParse = function additiveParse(context, renderer, schema) {
6804
6727
  var _loop = function(i) {
6805
6728
  var _mappings_i = mappings[i], materialIndex = _mappings_i.material, variants = _mappings_i.variants;
6806
- context.get(exports.GLTFParserType.Material, materialIndex).then(function(material) {
6729
+ context.get(GLTFParserType.Material, materialIndex).then(function(material) {
6807
6730
  extensionData.push({
6808
6731
  renderer: renderer,
6809
6732
  material: material,
@@ -6824,24 +6747,24 @@ var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser1) {
6824
6747
  return KHR_materials_variants;
6825
6748
  }(GLTFExtensionParser);
6826
6749
  KHR_materials_variants = __decorate([
6827
- registerGLTFExtension("KHR_materials_variants", exports.GLTFExtensionMode.AdditiveParse)
6750
+ registerGLTFExtension("KHR_materials_variants", GLTFExtensionMode.AdditiveParse)
6828
6751
  ], KHR_materials_variants);
6829
6752
 
6830
- var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser1) {
6831
- _inherits(KHR_mesh_quantization, GLTFExtensionParser1);
6753
+ var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser) {
6754
+ _inherits(KHR_mesh_quantization, GLTFExtensionParser);
6832
6755
  function KHR_mesh_quantization() {
6833
- return GLTFExtensionParser1.apply(this, arguments);
6756
+ return GLTFExtensionParser.apply(this, arguments) || this;
6834
6757
  }
6835
6758
  return KHR_mesh_quantization;
6836
6759
  }(GLTFExtensionParser);
6837
6760
  KHR_mesh_quantization = __decorate([
6838
- registerGLTFExtension("KHR_mesh_quantization", exports.GLTFExtensionMode.AdditiveParse)
6761
+ registerGLTFExtension("KHR_mesh_quantization", GLTFExtensionMode.AdditiveParse)
6839
6762
  ], KHR_mesh_quantization);
6840
6763
 
6841
- var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser1) {
6842
- _inherits(KHR_texture_basisu, GLTFExtensionParser1);
6764
+ var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser) {
6765
+ _inherits(KHR_texture_basisu, GLTFExtensionParser);
6843
6766
  function KHR_texture_basisu() {
6844
- return GLTFExtensionParser1.apply(this, arguments);
6767
+ return GLTFExtensionParser.apply(this, arguments) || this;
6845
6768
  }
6846
6769
  var _proto = KHR_texture_basisu.prototype;
6847
6770
  _proto.createAndParse = function createAndParse(context, schema, textureInfo) {
@@ -6877,7 +6800,7 @@ var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser1) {
6877
6800
  bufferView = glTF.bufferViews[bufferViewIndex];
6878
6801
  return [
6879
6802
  2,
6880
- context.get(exports.GLTFParserType.Buffer, bufferView.buffer).then(function(buffer) {
6803
+ context.get(GLTFParserType.Buffer, bufferView.buffer).then(function(buffer) {
6881
6804
  var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
6882
6805
  return exports.KTX2Loader._parseBuffer(imageBuffer, engine).then(function(param) {
6883
6806
  var engine = param.engine, result = param.result, targetFormat = param.targetFormat, params = param.params;
@@ -6900,13 +6823,13 @@ var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser1) {
6900
6823
  return KHR_texture_basisu;
6901
6824
  }(GLTFExtensionParser);
6902
6825
  KHR_texture_basisu = __decorate([
6903
- registerGLTFExtension("KHR_texture_basisu", exports.GLTFExtensionMode.CreateAndParse)
6826
+ registerGLTFExtension("KHR_texture_basisu", GLTFExtensionMode.CreateAndParse)
6904
6827
  ], KHR_texture_basisu);
6905
6828
 
6906
- var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser1) {
6907
- _inherits(KHR_texture_transform, GLTFExtensionParser1);
6829
+ var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser) {
6830
+ _inherits(KHR_texture_transform, GLTFExtensionParser);
6908
6831
  function KHR_texture_transform() {
6909
- return GLTFExtensionParser1.apply(this, arguments);
6832
+ return GLTFExtensionParser.apply(this, arguments) || this;
6910
6833
  }
6911
6834
  var _proto = KHR_texture_transform.prototype;
6912
6835
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6929,13 +6852,13 @@ var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser1) {
6929
6852
  return KHR_texture_transform;
6930
6853
  }(GLTFExtensionParser);
6931
6854
  KHR_texture_transform = __decorate([
6932
- registerGLTFExtension("KHR_texture_transform", exports.GLTFExtensionMode.AdditiveParse)
6855
+ registerGLTFExtension("KHR_texture_transform", GLTFExtensionMode.AdditiveParse)
6933
6856
  ], KHR_texture_transform);
6934
6857
 
6935
- var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser1) {
6936
- _inherits(GALACEAN_materials_remap, GLTFExtensionParser1);
6858
+ var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser) {
6859
+ _inherits(GALACEAN_materials_remap, GLTFExtensionParser);
6937
6860
  function GALACEAN_materials_remap() {
6938
- return GLTFExtensionParser1.apply(this, arguments);
6861
+ return GLTFExtensionParser.apply(this, arguments) || this;
6939
6862
  }
6940
6863
  var _proto = GALACEAN_materials_remap.prototype;
6941
6864
  _proto.createAndParse = function createAndParse(context, schema) {
@@ -6948,13 +6871,13 @@ var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser1) {
6948
6871
  return GALACEAN_materials_remap;
6949
6872
  }(GLTFExtensionParser);
6950
6873
  GALACEAN_materials_remap = __decorate([
6951
- registerGLTFExtension("GALACEAN_materials_remap", exports.GLTFExtensionMode.CreateAndParse)
6874
+ registerGLTFExtension("GALACEAN_materials_remap", GLTFExtensionMode.CreateAndParse)
6952
6875
  ], GALACEAN_materials_remap);
6953
6876
 
6954
- var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser1) {
6955
- _inherits(GALACEAN_animation_event, GLTFExtensionParser1);
6877
+ var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser) {
6878
+ _inherits(GALACEAN_animation_event, GLTFExtensionParser);
6956
6879
  function GALACEAN_animation_event() {
6957
- return GLTFExtensionParser1.apply(this, arguments);
6880
+ return GLTFExtensionParser.apply(this, arguments) || this;
6958
6881
  }
6959
6882
  var _proto = GALACEAN_animation_event.prototype;
6960
6883
  _proto.additiveParse = function additiveParse(context, animationClip, schema) {
@@ -6971,17 +6894,17 @@ var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser1) {
6971
6894
  return GALACEAN_animation_event;
6972
6895
  }(GLTFExtensionParser);
6973
6896
  GALACEAN_animation_event = __decorate([
6974
- registerGLTFExtension("GALACEAN_animation_event", exports.GLTFExtensionMode.AdditiveParse)
6897
+ registerGLTFExtension("GALACEAN_animation_event", GLTFExtensionMode.AdditiveParse)
6975
6898
  ], GALACEAN_animation_event);
6976
6899
 
6977
- var EXT_meshopt_compression = /*#__PURE__*/ function(GLTFExtensionParser1) {
6978
- _inherits(EXT_meshopt_compression, GLTFExtensionParser1);
6900
+ var EXT_meshopt_compression = /*#__PURE__*/ function(GLTFExtensionParser) {
6901
+ _inherits(EXT_meshopt_compression, GLTFExtensionParser);
6979
6902
  function EXT_meshopt_compression() {
6980
- return GLTFExtensionParser1.apply(this, arguments);
6903
+ return GLTFExtensionParser.apply(this, arguments) || this;
6981
6904
  }
6982
6905
  var _proto = EXT_meshopt_compression.prototype;
6983
6906
  _proto.createAndParse = function createAndParse(context, schema) {
6984
- return context.get(exports.GLTFParserType.Buffer, schema.buffer).then(function(arrayBuffer) {
6907
+ return context.get(GLTFParserType.Buffer, schema.buffer).then(function(arrayBuffer) {
6985
6908
  return getMeshoptDecoder().then(function(decoder) {
6986
6909
  return decoder.decodeGltfBuffer(schema.count, schema.byteStride, new Uint8Array(arrayBuffer, schema.byteOffset, schema.byteLength), schema.mode, schema.filter);
6987
6910
  });
@@ -6990,13 +6913,13 @@ var EXT_meshopt_compression = /*#__PURE__*/ function(GLTFExtensionParser1) {
6990
6913
  return EXT_meshopt_compression;
6991
6914
  }(GLTFExtensionParser);
6992
6915
  EXT_meshopt_compression = __decorate([
6993
- registerGLTFExtension("EXT_meshopt_compression", exports.GLTFExtensionMode.CreateAndParse)
6916
+ registerGLTFExtension("EXT_meshopt_compression", GLTFExtensionMode.CreateAndParse)
6994
6917
  ], EXT_meshopt_compression);
6995
6918
 
6996
- var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser1) {
6997
- _inherits(KHR_materials_anisotropy, GLTFExtensionParser1);
6919
+ var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser) {
6920
+ _inherits(KHR_materials_anisotropy, GLTFExtensionParser);
6998
6921
  function KHR_materials_anisotropy() {
6999
- return GLTFExtensionParser1.apply(this, arguments);
6922
+ return GLTFExtensionParser.apply(this, arguments) || this;
7000
6923
  }
7001
6924
  var _proto = KHR_materials_anisotropy.prototype;
7002
6925
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -7005,7 +6928,7 @@ var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser1) {
7005
6928
  material.anisotropyRotation = anisotropyRotation;
7006
6929
  if (anisotropyTexture) {
7007
6930
  exports.GLTFMaterialParser._checkOtherTextureTransform(anisotropyTexture, "Anisotropy texture");
7008
- context.get(exports.GLTFParserType.Texture, anisotropyTexture.index).then(function(texture) {
6931
+ context.get(GLTFParserType.Texture, anisotropyTexture.index).then(function(texture) {
7009
6932
  material.anisotropyTexture = texture;
7010
6933
  });
7011
6934
  }
@@ -7013,15 +6936,44 @@ var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser1) {
7013
6936
  return KHR_materials_anisotropy;
7014
6937
  }(GLTFExtensionParser);
7015
6938
  KHR_materials_anisotropy = __decorate([
7016
- registerGLTFExtension("KHR_materials_anisotropy", exports.GLTFExtensionMode.AdditiveParse)
6939
+ registerGLTFExtension("KHR_materials_anisotropy", GLTFExtensionMode.AdditiveParse)
7017
6940
  ], KHR_materials_anisotropy);
7018
6941
 
7019
- var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
7020
- _inherits(EXT_texture_webp, GLTFExtensionParser1);
6942
+ var KHR_materials_iridescence = /*#__PURE__*/ function(GLTFExtensionParser) {
6943
+ _inherits(KHR_materials_iridescence, GLTFExtensionParser);
6944
+ function KHR_materials_iridescence() {
6945
+ return GLTFExtensionParser.apply(this, arguments) || this;
6946
+ }
6947
+ var _proto = KHR_materials_iridescence.prototype;
6948
+ _proto.additiveParse = function additiveParse(context, material, schema) {
6949
+ var _schema_iridescenceFactor = schema.iridescenceFactor, iridescenceFactor = _schema_iridescenceFactor === void 0 ? 0 : _schema_iridescenceFactor, iridescenceTexture = schema.iridescenceTexture, _schema_iridescenceIor = schema.iridescenceIor, iridescenceIor = _schema_iridescenceIor === void 0 ? 1.3 : _schema_iridescenceIor, _schema_iridescenceThicknessMinimum = schema.iridescenceThicknessMinimum, iridescenceThicknessMinimum = _schema_iridescenceThicknessMinimum === void 0 ? 100 : _schema_iridescenceThicknessMinimum, _schema_iridescenceThicknessMaximum = schema.iridescenceThicknessMaximum, iridescenceThicknessMaximum = _schema_iridescenceThicknessMaximum === void 0 ? 400 : _schema_iridescenceThicknessMaximum, iridescenceThicknessTexture = schema.iridescenceThicknessTexture;
6950
+ material.iridescence = iridescenceFactor;
6951
+ material.iridescenceIOR = iridescenceIor;
6952
+ material.iridescenceThicknessRange.set(iridescenceThicknessMinimum, iridescenceThicknessMaximum);
6953
+ if (iridescenceTexture) {
6954
+ exports.GLTFMaterialParser._checkOtherTextureTransform(iridescenceTexture, "Iridescence texture");
6955
+ context.get(GLTFParserType.Texture, iridescenceTexture.index).then(function(texture) {
6956
+ material.iridescenceTexture = texture;
6957
+ });
6958
+ }
6959
+ if (iridescenceThicknessTexture) {
6960
+ exports.GLTFMaterialParser._checkOtherTextureTransform(iridescenceThicknessTexture, "IridescenceThickness texture");
6961
+ context.get(GLTFParserType.Texture, iridescenceThicknessTexture.index).then(function(texture) {
6962
+ material.iridescenceThicknessTexture = texture;
6963
+ });
6964
+ }
6965
+ };
6966
+ return KHR_materials_iridescence;
6967
+ }(GLTFExtensionParser);
6968
+ KHR_materials_iridescence = __decorate([
6969
+ registerGLTFExtension("KHR_materials_iridescence", GLTFExtensionMode.AdditiveParse)
6970
+ ], KHR_materials_iridescence);
6971
+
6972
+ var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser) {
6973
+ _inherits(EXT_texture_webp, GLTFExtensionParser);
7021
6974
  function EXT_texture_webp() {
7022
6975
  var _this;
7023
- _this = GLTFExtensionParser1.call(this) || this;
7024
- _this._supportWebP = false;
6976
+ _this = GLTFExtensionParser.call(this) || this, _this._supportWebP = false;
7025
6977
  // @ts-ignore
7026
6978
  if (engineCore.SystemInfo._isBrowser) {
7027
6979
  var testCanvas = document.createElement("canvas");
@@ -7051,21 +7003,30 @@ var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
7051
7003
  return EXT_texture_webp;
7052
7004
  }(GLTFExtensionParser);
7053
7005
  EXT_texture_webp = __decorate([
7054
- registerGLTFExtension("EXT_texture_webp", exports.GLTFExtensionMode.CreateAndParse)
7006
+ registerGLTFExtension("EXT_texture_webp", GLTFExtensionMode.CreateAndParse)
7055
7007
  ], EXT_texture_webp);
7056
7008
 
7009
+ exports.AccessorType = AccessorType;
7057
7010
  exports.BufferInfo = BufferInfo;
7058
7011
  exports.BufferReader = BufferReader;
7059
7012
  exports.FileHeader = FileHeader;
7013
+ exports.GLTFExtensionMode = GLTFExtensionMode;
7060
7014
  exports.GLTFExtensionParser = GLTFExtensionParser;
7061
7015
  exports.GLTFParser = GLTFParser;
7062
7016
  exports.GLTFParserContext = GLTFParserContext;
7017
+ exports.GLTFParserType = GLTFParserType;
7063
7018
  exports.GLTFResource = GLTFResource;
7064
7019
  exports.GLTFUtils = GLTFUtils;
7020
+ exports.InterpolableValueType = InterpolableValueType;
7021
+ exports.KTX2TargetFormat = KTX2TargetFormat;
7022
+ exports.KTX2Transcoder = KTX2Transcoder;
7023
+ exports.MaterialLoaderType = MaterialLoaderType;
7065
7024
  exports.ParserContext = ParserContext;
7025
+ exports.ParserType = ParserType;
7066
7026
  exports.PrefabResource = PrefabResource;
7067
7027
  exports.ReflectionParser = ReflectionParser;
7068
7028
  exports.SceneParser = SceneParser;
7029
+ exports.SpecularMode = SpecularMode;
7069
7030
  exports.decode = decode;
7070
7031
  exports.decoder = decoder;
7071
7032
  exports.decoderMap = decoderMap;