@galacean/engine-loader 1.3.24 → 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/module.js CHANGED
@@ -35,6 +35,12 @@ function _inherits(subClass, superClass) {
35
35
  if (superClass) _set_prototype_of(subClass, superClass);
36
36
  }
37
37
 
38
+ function _type_of(obj) {
39
+ "@swc/helpers - typeof";
40
+
41
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
42
+ }
43
+
38
44
  /******************************************************************************
39
45
  Copyright (c) Microsoft Corporation.
40
46
 
@@ -58,8 +64,8 @@ function __decorate(decorators, target, key, desc) {
58
64
  }
59
65
 
60
66
  function __generator(thisArg, body) {
61
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
62
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
67
+ 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);
68
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
63
69
  function verb(n) { return function (v) { return step([n, v]); }; }
64
70
  function step(op) {
65
71
  if (f) throw new TypeError("Generator is already executing.");
@@ -489,17 +495,18 @@ Texture2DDecoder = __decorate([
489
495
  ], Texture2DDecoder);
490
496
 
491
497
  function _is_native_reflect_construct() {
492
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
493
- if (Reflect.construct.sham) return false;
494
- if (typeof Proxy === "function") return true;
495
-
498
+ // Since Reflect.construct can't be properly polyfilled, some
499
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
500
+ // Those polyfills don't allow us to subclass built-ins, so we need to
501
+ // use our fallback implementation.
496
502
  try {
497
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
498
-
499
- return true;
500
- } catch (e) {
501
- return false;
502
- }
503
+ // If the internal slots aren't set, this throws an error similar to
504
+ // TypeError: this is not a Boolean object.
505
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
506
+ } catch (_) {}
507
+ return (_is_native_reflect_construct = function() {
508
+ return !!result;
509
+ })();
503
510
  }
504
511
 
505
512
  function _construct(Parent, args, Class) {
@@ -520,11 +527,11 @@ function _construct(Parent, args, Class) {
520
527
  return _construct.apply(null, arguments);
521
528
  }
522
529
 
523
- var ParserType;
524
- (function(ParserType) {
530
+ var ParserType = /*#__PURE__*/ function(ParserType) {
525
531
  ParserType[ParserType["Prefab"] = 0] = "Prefab";
526
532
  ParserType[ParserType["Scene"] = 1] = "Scene";
527
- })(ParserType || (ParserType = {}));
533
+ return ParserType;
534
+ }({});
528
535
  /**
529
536
  * Parser context
530
537
  * @export
@@ -603,14 +610,14 @@ var ReflectionParser = /*#__PURE__*/ function() {
603
610
  }
604
611
  }
605
612
  if (item.props) {
606
- var _this = this, _loop = function(key) {
613
+ var _this, _loop = function(key) {
607
614
  var value = item.props[key];
608
615
  var promise = _this.parseBasicType(value, instance[key]).then(function(v) {
609
616
  return instance[key] = v;
610
617
  });
611
618
  promises.push(promise);
612
619
  };
613
- for(var key in item.props)_loop(key);
620
+ for(var key in item.props)_this = this, _loop(key);
614
621
  }
615
622
  return Promise.all(promises).then(function() {
616
623
  var handle = ReflectionParser.customParseComponentHandles[instance.constructor.name];
@@ -633,7 +640,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
633
640
  return Promise.all(value.map(function(item) {
634
641
  return _this.parseBasicType(item);
635
642
  }));
636
- } else if (typeof value === "object" && value != null) {
643
+ } else if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value != null) {
637
644
  if (ReflectionParser._isClass(value)) {
638
645
  // class object
639
646
  return this.parseClassObject(value);
@@ -652,7 +659,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
652
659
  // entity reference
653
660
  return Promise.resolve(this._context.entityMap.get(value.entityId));
654
661
  } else if (originValue) {
655
- var _this2 = this, _loop = function(key) {
662
+ var _this2, _loop = function(key) {
656
663
  if (key === "methods") {
657
664
  var methods = value[key];
658
665
  for(var methodName in methods){
@@ -670,7 +677,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
670
677
  }
671
678
  };
672
679
  var promises = [];
673
- for(var key in value)_loop(key);
680
+ for(var key in value)_this2 = this, _loop(key);
674
681
  return Promise.all(promises).then(function() {
675
682
  return originValue;
676
683
  });
@@ -719,12 +726,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
719
726
  };
720
727
  return ReflectionParser;
721
728
  }();
722
- (function() {
723
- ReflectionParser.customParseComponentHandles = new Map();
724
- })();
729
+ ReflectionParser.customParseComponentHandles = new Map();
725
730
 
726
- var InterpolableValueType;
727
- (function(InterpolableValueType) {
731
+ var InterpolableValueType = /*#__PURE__*/ function(InterpolableValueType) {
728
732
  InterpolableValueType[InterpolableValueType["Float"] = 0] = "Float";
729
733
  InterpolableValueType[InterpolableValueType["FloatArray"] = 1] = "FloatArray";
730
734
  InterpolableValueType[InterpolableValueType["Vector2"] = 2] = "Vector2";
@@ -736,7 +740,8 @@ var InterpolableValueType;
736
740
  InterpolableValueType[InterpolableValueType["Boolean"] = 8] = "Boolean";
737
741
  InterpolableValueType[InterpolableValueType["Rect"] = 9] = "Rect";
738
742
  InterpolableValueType[InterpolableValueType["ReferResource"] = 10] = "ReferResource";
739
- })(InterpolableValueType || (InterpolableValueType = {}));
743
+ return InterpolableValueType;
744
+ }({});
740
745
  var AnimationClipDecoder = /*#__PURE__*/ function() {
741
746
  function AnimationClipDecoder() {}
742
747
  AnimationClipDecoder.decode = function decode(engine, bufferReader) {
@@ -928,8 +933,7 @@ AnimationClipDecoder = __decorate([
928
933
  decoder("AnimationClip")
929
934
  ], AnimationClipDecoder);
930
935
 
931
- var MaterialLoaderType;
932
- (function(MaterialLoaderType) {
936
+ var MaterialLoaderType = /*#__PURE__*/ function(MaterialLoaderType) {
933
937
  MaterialLoaderType["Vector2"] = "Vector2";
934
938
  MaterialLoaderType["Vector3"] = "Vector3";
935
939
  MaterialLoaderType["Vector4"] = "Vector4";
@@ -938,13 +942,14 @@ var MaterialLoaderType;
938
942
  MaterialLoaderType["Texture"] = "Texture";
939
943
  MaterialLoaderType["Boolean"] = "Boolean";
940
944
  MaterialLoaderType["Integer"] = "Integer";
941
- })(MaterialLoaderType || (MaterialLoaderType = {}));
945
+ return MaterialLoaderType;
946
+ }({});
942
947
 
943
- var SpecularMode;
944
- (function(SpecularMode) {
948
+ var SpecularMode = /*#__PURE__*/ function(SpecularMode) {
945
949
  SpecularMode["Sky"] = "Sky";
946
950
  SpecularMode["Custom"] = "Custom";
947
- })(SpecularMode || (SpecularMode = {}));
951
+ return SpecularMode;
952
+ }({});
948
953
 
949
954
  function _instanceof(left, right) {
950
955
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -993,13 +998,11 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
993
998
 
994
999
  /**
995
1000
  * The Prefab resource.
996
- */ var PrefabResource = /*#__PURE__*/ function(ReferResource1) {
997
- _inherits(PrefabResource, ReferResource1);
1001
+ */ var PrefabResource = /*#__PURE__*/ function(ReferResource) {
1002
+ _inherits(PrefabResource, ReferResource);
998
1003
  function PrefabResource(engine, url) {
999
1004
  var _this;
1000
- _this = ReferResource1.call(this, engine) || this;
1001
- _this.url = url;
1002
- _this._dependenceAssets = new Set();
1005
+ _this = ReferResource.call(this, engine) || this, _this.url = url, _this._dependenceAssets = new Set();
1003
1006
  return _this;
1004
1007
  }
1005
1008
  var _proto = PrefabResource.prototype;
@@ -1019,7 +1022,7 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1019
1022
  };
1020
1023
  _proto._onDestroy = function _onDestroy() {
1021
1024
  var _this = this;
1022
- ReferResource1.prototype._onDestroy.call(this);
1025
+ ReferResource.prototype._onDestroy.call(this);
1023
1026
  this._root.destroy();
1024
1027
  this._dependenceAssets.forEach(function(asset) {
1025
1028
  // @ts-ignore
@@ -1094,10 +1097,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1094
1097
  };
1095
1098
  _proto._parsePrefabModification = function _parsePrefabModification() {
1096
1099
  var _loop = function(i, l) {
1097
- var _modifications;
1098
1100
  var entityConfig = entitiesConfig[i];
1099
1101
  var id = entityConfig.id, modifications = entityConfig.modifications;
1100
- if ((_modifications = modifications) == null ? void 0 : _modifications.length) {
1102
+ if (modifications == null ? void 0 : modifications.length) {
1101
1103
  var _promises;
1102
1104
  var rootEntity = entityMap.get(id);
1103
1105
  (_promises = promises).push.apply(_promises, [].concat(modifications.map(function(modification) {
@@ -1126,10 +1128,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1126
1128
  };
1127
1129
  _proto._parsePrefabRemovedEntities = function _parsePrefabRemovedEntities() {
1128
1130
  var _loop = function(i, l) {
1129
- var _removedEntities;
1130
1131
  var entityConfig = entitiesConfig[i];
1131
1132
  var id = entityConfig.id, removedEntities = entityConfig.removedEntities;
1132
- if ((_removedEntities = removedEntities) == null ? void 0 : _removedEntities.length) {
1133
+ if (removedEntities == null ? void 0 : removedEntities.length) {
1133
1134
  var _promises;
1134
1135
  var rootEntity = entityMap.get(id);
1135
1136
  (_promises = promises).push.apply(_promises, [].concat(removedEntities.map(function(target) {
@@ -1151,10 +1152,9 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1151
1152
  };
1152
1153
  _proto._parsePrefabRemovedComponents = function _parsePrefabRemovedComponents() {
1153
1154
  var _loop = function(i, l) {
1154
- var _removedComponents;
1155
1155
  var entityConfig = entitiesConfig[i];
1156
1156
  var id = entityConfig.id, removedComponents = entityConfig.removedComponents;
1157
- if ((_removedComponents = removedComponents) == null ? void 0 : _removedComponents.length) {
1157
+ if (removedComponents == null ? void 0 : removedComponents.length) {
1158
1158
  var _promises;
1159
1159
  var rootEntity = entityMap.get(id);
1160
1160
  (_promises = promises).concat.apply(_promises, [].concat(removedComponents.map(function(target) {
@@ -1291,12 +1291,11 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1291
1291
  return HierarchyParser;
1292
1292
  }();
1293
1293
 
1294
- /** @Internal */ var SceneParser = /*#__PURE__*/ function(HierarchyParser1) {
1295
- _inherits(SceneParser, HierarchyParser1);
1294
+ /** @Internal */ var SceneParser = /*#__PURE__*/ function(HierarchyParser) {
1295
+ _inherits(SceneParser, HierarchyParser);
1296
1296
  function SceneParser(data, context, scene) {
1297
1297
  var _this;
1298
- _this = HierarchyParser1.call(this, data, context) || this;
1299
- _this.scene = scene;
1298
+ _this = HierarchyParser.call(this, data, context) || this, _this.scene = scene;
1300
1299
  return _this;
1301
1300
  }
1302
1301
  var _proto = SceneParser.prototype;
@@ -1325,10 +1324,10 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
1325
1324
  return SceneParser;
1326
1325
  }(HierarchyParser);
1327
1326
 
1328
- var EditorTextureLoader = /*#__PURE__*/ function(Loader1) {
1329
- _inherits(EditorTextureLoader, Loader1);
1327
+ var EditorTextureLoader = /*#__PURE__*/ function(Loader) {
1328
+ _inherits(EditorTextureLoader, Loader);
1330
1329
  function EditorTextureLoader() {
1331
- return Loader1.apply(this, arguments);
1330
+ return Loader.apply(this, arguments) || this;
1332
1331
  }
1333
1332
  var _proto = EditorTextureLoader.prototype;
1334
1333
  _proto.load = function load(item, resourceManager) {
@@ -1365,10 +1364,10 @@ EditorTextureLoader = __decorate([
1365
1364
  });
1366
1365
  }
1367
1366
 
1368
- var AnimationClipLoader = /*#__PURE__*/ function(Loader1) {
1369
- _inherits(AnimationClipLoader, Loader1);
1367
+ var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
1368
+ _inherits(AnimationClipLoader, Loader);
1370
1369
  function AnimationClipLoader() {
1371
- return Loader1.apply(this, arguments);
1370
+ return Loader.apply(this, arguments) || this;
1372
1371
  }
1373
1372
  var _proto = AnimationClipLoader.prototype;
1374
1373
  _proto.load = function load(item, resourceManager) {
@@ -1396,9 +1395,8 @@ var AnimationClipLoader = /*#__PURE__*/ function(Loader1) {
1396
1395
  });
1397
1396
  };
1398
1397
  _proto._parseKeyframeValue = function _parseKeyframeValue(keyframe, resourceManager) {
1399
- var _value;
1400
1398
  var value = keyframe.value;
1401
- if (typeof value === "object" && ((_value = value) == null ? void 0 : _value.refId)) {
1399
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && (value == null ? void 0 : value.refId)) {
1402
1400
  return new Promise(function(resolve) {
1403
1401
  resourceManager// @ts-ignore
1404
1402
  .getResourceByRef(value).then(function(asset) {
@@ -1421,7 +1419,7 @@ AnimationClipLoader = __decorate([
1421
1419
  var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1422
1420
  _inherits(AnimatorControllerLoader, Loader1);
1423
1421
  function AnimatorControllerLoader() {
1424
- return Loader1.apply(this, arguments);
1422
+ return Loader1.apply(this, arguments) || this;
1425
1423
  }
1426
1424
  var _proto = AnimatorControllerLoader.prototype;
1427
1425
  _proto.load = function load(item, resourceManager) {
@@ -1489,7 +1487,11 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1489
1487
  animatorController.addLayer(layer);
1490
1488
  });
1491
1489
  parameters.forEach(function(parameterData) {
1492
- animatorController.addParameter(parameterData.name, parameterData.defaultValue);
1490
+ if (parameterData.isTrigger) {
1491
+ animatorController.addTriggerParameter(parameterData.name);
1492
+ } else {
1493
+ animatorController.addParameter(parameterData.name, parameterData.defaultValue);
1494
+ }
1493
1495
  });
1494
1496
  Promise.all(promises).then(function(clipData) {
1495
1497
  clipData.forEach(function(data) {
@@ -1503,6 +1505,8 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1503
1505
  };
1504
1506
  _proto._createTransition = function _createTransition(transitionData, destinationState) {
1505
1507
  var transition = new AnimatorStateTransition();
1508
+ transition.hasExitTime = transitionData.hasExitTime;
1509
+ transition.isFixedDuration = transitionData.isFixedDuration;
1506
1510
  transition.duration = transitionData.duration;
1507
1511
  transition.offset = transitionData.offset;
1508
1512
  transition.exitTime = transitionData.exitTime;
@@ -1512,7 +1516,7 @@ var AnimatorControllerLoader = /*#__PURE__*/ function(Loader1) {
1512
1516
  transition._isExit = transitionData.isExit;
1513
1517
  transition.destinationState = destinationState;
1514
1518
  transitionData.conditions.forEach(function(conditionData) {
1515
- transition.addCondition(conditionData.mode, conditionData.parameterName, conditionData.threshold);
1519
+ transition.addCondition(conditionData.parameterName, conditionData.mode, conditionData.threshold);
1516
1520
  });
1517
1521
  return transition;
1518
1522
  };
@@ -1527,10 +1531,10 @@ AnimatorControllerLoader = __decorate([
1527
1531
  function isBase64(url) {
1528
1532
  return /^data:(.+?);base64,/.test(url);
1529
1533
  }
1530
- var BufferLoader = /*#__PURE__*/ function(Loader1) {
1531
- _inherits(BufferLoader, Loader1);
1534
+ var BufferLoader = /*#__PURE__*/ function(Loader) {
1535
+ _inherits(BufferLoader, Loader);
1532
1536
  function BufferLoader() {
1533
- return Loader1.apply(this, arguments);
1537
+ return Loader.apply(this, arguments) || this;
1534
1538
  }
1535
1539
  var _proto = BufferLoader.prototype;
1536
1540
  _proto.load = function load(item, resourceManager) {
@@ -1558,10 +1562,10 @@ BufferLoader = __decorate([
1558
1562
  ], false)
1559
1563
  ], BufferLoader);
1560
1564
 
1561
- var EnvLoader = /*#__PURE__*/ function(Loader1) {
1562
- _inherits(EnvLoader, Loader1);
1565
+ var EnvLoader = /*#__PURE__*/ function(Loader) {
1566
+ _inherits(EnvLoader, Loader);
1563
1567
  function EnvLoader() {
1564
- return Loader1.apply(this, arguments);
1568
+ return Loader.apply(this, arguments) || this;
1565
1569
  }
1566
1570
  var _proto = EnvLoader.prototype;
1567
1571
  _proto.load = function load(item, resourceManager) {
@@ -1640,10 +1644,10 @@ function _async_to_generator(fn) {
1640
1644
  };
1641
1645
  }
1642
1646
 
1643
- var FontLoader = /*#__PURE__*/ function(Loader1) {
1644
- _inherits(FontLoader, Loader1);
1647
+ var FontLoader = /*#__PURE__*/ function(Loader) {
1648
+ _inherits(FontLoader, Loader);
1645
1649
  function FontLoader() {
1646
- return Loader1.apply(this, arguments);
1650
+ return Loader.apply(this, arguments) || this;
1647
1651
  }
1648
1652
  var _proto = FontLoader.prototype;
1649
1653
  _proto.load = function load(item, resourceManager) {
@@ -1701,11 +1705,11 @@ FontLoader = __decorate([
1701
1705
 
1702
1706
  /**
1703
1707
  * The glTF resource.
1704
- */ var GLTFResource = /*#__PURE__*/ function(ReferResource1) {
1705
- _inherits(GLTFResource, ReferResource1);
1708
+ */ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
1709
+ _inherits(GLTFResource, ReferResource);
1706
1710
  function GLTFResource(engine, url) {
1707
1711
  var _this;
1708
- _this = ReferResource1.call(this, engine) || this;
1712
+ _this = ReferResource.call(this, engine) || this;
1709
1713
  _this.url = url;
1710
1714
  return _this;
1711
1715
  }
@@ -1719,7 +1723,7 @@ FontLoader = __decorate([
1719
1723
  return sceneRoot.clone();
1720
1724
  };
1721
1725
  _proto._onDestroy = function _onDestroy() {
1722
- ReferResource1.prototype._onDestroy.call(this);
1726
+ ReferResource.prototype._onDestroy.call(this);
1723
1727
  var _this = this, textures = _this.textures, materials = _this.materials, meshes = _this.meshes;
1724
1728
  textures && this._disassociationSuperResource(textures);
1725
1729
  materials && this._disassociationSuperResource(materials);
@@ -1768,150 +1772,159 @@ FontLoader = __decorate([
1768
1772
 
1769
1773
  /**
1770
1774
  * Module for glTF 2.0 Interface
1771
- */ var AccessorComponentType;
1772
- (function(AccessorComponentType) {
1773
- AccessorComponentType[AccessorComponentType[/**
1775
+ */ /**
1776
+ * The datatype of the components in the attribute
1777
+ */ var AccessorComponentType = /*#__PURE__*/ function(AccessorComponentType) {
1778
+ /**
1774
1779
  * Byte
1775
- */ "BYTE"] = 5120] = "BYTE";
1776
- AccessorComponentType[AccessorComponentType[/**
1780
+ */ AccessorComponentType[AccessorComponentType["BYTE"] = 5120] = "BYTE";
1781
+ /**
1777
1782
  * Unsigned Byte
1778
- */ "UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
1779
- AccessorComponentType[AccessorComponentType[/**
1783
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
1784
+ /**
1780
1785
  * Short
1781
- */ "SHORT"] = 5122] = "SHORT";
1782
- AccessorComponentType[AccessorComponentType[/**
1786
+ */ AccessorComponentType[AccessorComponentType["SHORT"] = 5122] = "SHORT";
1787
+ /**
1783
1788
  * Unsigned Short
1784
- */ "UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
1785
- AccessorComponentType[AccessorComponentType[/**
1789
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
1790
+ /**
1786
1791
  * Unsigned Int
1787
- */ "UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
1788
- AccessorComponentType[AccessorComponentType[/**
1792
+ */ AccessorComponentType[AccessorComponentType["UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
1793
+ /**
1789
1794
  * Float
1790
- */ "FLOAT"] = 5126] = "FLOAT";
1791
- })(AccessorComponentType || (AccessorComponentType = {}));
1792
- var AccessorType;
1793
- (function(AccessorType) {
1794
- AccessorType[/**
1795
+ */ AccessorComponentType[AccessorComponentType["FLOAT"] = 5126] = "FLOAT";
1796
+ return AccessorComponentType;
1797
+ }({});
1798
+ /**
1799
+ * Specifies if the attirbute is a scalar, vector, or matrix
1800
+ */ var AccessorType = /*#__PURE__*/ function(AccessorType) {
1801
+ /**
1795
1802
  * Scalar
1796
- */ "SCALAR"] = "SCALAR";
1797
- AccessorType[/**
1803
+ */ AccessorType["SCALAR"] = "SCALAR";
1804
+ /**
1798
1805
  * Vector2
1799
- */ "VEC2"] = "VEC2";
1800
- AccessorType[/**
1806
+ */ AccessorType["VEC2"] = "VEC2";
1807
+ /**
1801
1808
  * Vector3
1802
- */ "VEC3"] = "VEC3";
1803
- AccessorType[/**
1809
+ */ AccessorType["VEC3"] = "VEC3";
1810
+ /**
1804
1811
  * Vector4
1805
- */ "VEC4"] = "VEC4";
1806
- AccessorType[/**
1812
+ */ AccessorType["VEC4"] = "VEC4";
1813
+ /**
1807
1814
  * Matrix2x2
1808
- */ "MAT2"] = "MAT2";
1809
- AccessorType[/**
1815
+ */ AccessorType["MAT2"] = "MAT2";
1816
+ /**
1810
1817
  * Matrix3x3
1811
- */ "MAT3"] = "MAT3";
1812
- AccessorType[/**
1818
+ */ AccessorType["MAT3"] = "MAT3";
1819
+ /**
1813
1820
  * Matrix4x4
1814
- */ "MAT4"] = "MAT4";
1815
- })(AccessorType || (AccessorType = {}));
1816
- var AnimationChannelTargetPath;
1817
- (function(AnimationChannelTargetPath) {
1818
- AnimationChannelTargetPath[/**
1821
+ */ AccessorType["MAT4"] = "MAT4";
1822
+ return AccessorType;
1823
+ }({});
1824
+ /**
1825
+ * The name of the node's TRS property to modify, or the weights of the Morph Targets it instantiates
1826
+ */ var AnimationChannelTargetPath = /*#__PURE__*/ function(AnimationChannelTargetPath) {
1827
+ /**
1819
1828
  * Translation
1820
- */ "TRANSLATION"] = "translation";
1821
- AnimationChannelTargetPath[/**
1829
+ */ AnimationChannelTargetPath["TRANSLATION"] = "translation";
1830
+ /**
1822
1831
  * Rotation
1823
- */ "ROTATION"] = "rotation";
1824
- AnimationChannelTargetPath[/**
1832
+ */ AnimationChannelTargetPath["ROTATION"] = "rotation";
1833
+ /**
1825
1834
  * Scale
1826
- */ "SCALE"] = "scale";
1827
- AnimationChannelTargetPath[/**
1835
+ */ AnimationChannelTargetPath["SCALE"] = "scale";
1836
+ /**
1828
1837
  * Weights
1829
- */ "WEIGHTS"] = "weights";
1830
- })(AnimationChannelTargetPath || (AnimationChannelTargetPath = {}));
1831
- var AnimationSamplerInterpolation;
1832
- (function(AnimationSamplerInterpolation) {
1833
- AnimationSamplerInterpolation[/**
1838
+ */ AnimationChannelTargetPath["WEIGHTS"] = "weights";
1839
+ return AnimationChannelTargetPath;
1840
+ }({});
1841
+ /**
1842
+ * Interpolation algorithm
1843
+ */ var AnimationSamplerInterpolation = /*#__PURE__*/ function(AnimationSamplerInterpolation) {
1844
+ /**
1834
1845
  * The animated values are linearly interpolated between keyframes
1835
- */ "Linear"] = "LINEAR";
1836
- AnimationSamplerInterpolation[/**
1846
+ */ AnimationSamplerInterpolation["Linear"] = "LINEAR";
1847
+ /**
1837
1848
  * The animated values remain constant to the output of the first keyframe, until the next keyframe
1838
- */ "Step"] = "STEP";
1839
- AnimationSamplerInterpolation[/**
1849
+ */ AnimationSamplerInterpolation["Step"] = "STEP";
1850
+ /**
1840
1851
  * The animation's interpolation is computed using a cubic spline with specified tangents
1841
- */ "CubicSpine"] = "CUBICSPLINE";
1842
- })(AnimationSamplerInterpolation || (AnimationSamplerInterpolation = {}));
1843
- var CameraType;
1844
- (function(CameraType) {
1845
- CameraType[/**
1852
+ */ AnimationSamplerInterpolation["CubicSpine"] = "CUBICSPLINE";
1853
+ return AnimationSamplerInterpolation;
1854
+ }({});
1855
+ /**
1856
+ * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene
1857
+ */ var CameraType = /*#__PURE__*/ function(CameraType) {
1858
+ /**
1846
1859
  * A perspective camera containing properties to create a perspective projection matrix
1847
- */ "PERSPECTIVE"] = "perspective";
1848
- CameraType[/**
1860
+ */ CameraType["PERSPECTIVE"] = "perspective";
1861
+ /**
1849
1862
  * An orthographic camera containing properties to create an orthographic projection matrix
1850
- */ "ORTHOGRAPHIC"] = "orthographic";
1851
- })(CameraType || (CameraType = {}));
1852
- var ImageMimeType;
1853
- (function(ImageMimeType) {
1854
- ImageMimeType[/**
1855
- * JPEG Mime-type
1856
- */ "JPEG"] = "image/jpeg";
1857
- ImageMimeType[/**
1858
- * PNG Mime-type
1859
- */ "PNG"] = "image/png";
1860
- })(ImageMimeType || (ImageMimeType = {}));
1861
- var MaterialAlphaMode;
1862
- (function(MaterialAlphaMode) {
1863
- MaterialAlphaMode[/**
1863
+ */ CameraType["ORTHOGRAPHIC"] = "orthographic";
1864
+ return CameraType;
1865
+ }({});
1866
+ /**
1867
+ * The alpha rendering mode of the material
1868
+ */ var MaterialAlphaMode = /*#__PURE__*/ function(MaterialAlphaMode) {
1869
+ /**
1864
1870
  * The alpha value is ignored and the rendered output is fully opaque
1865
- */ "OPAQUE"] = "OPAQUE";
1866
- MaterialAlphaMode[/**
1871
+ */ MaterialAlphaMode["OPAQUE"] = "OPAQUE";
1872
+ /**
1867
1873
  * The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value
1868
- */ "MASK"] = "MASK";
1869
- MaterialAlphaMode[/**
1874
+ */ MaterialAlphaMode["MASK"] = "MASK";
1875
+ /**
1870
1876
  * 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)
1871
- */ "BLEND"] = "BLEND";
1872
- })(MaterialAlphaMode || (MaterialAlphaMode = {}));
1873
- var TextureMagFilter;
1874
- (function(TextureMagFilter) {
1875
- TextureMagFilter[TextureMagFilter[/**
1877
+ */ MaterialAlphaMode["BLEND"] = "BLEND";
1878
+ return MaterialAlphaMode;
1879
+ }({});
1880
+ /**
1881
+ * Magnification filter. Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR)
1882
+ */ var TextureMagFilter = /*#__PURE__*/ function(TextureMagFilter) {
1883
+ /**
1876
1884
  * Nearest
1877
- */ "NEAREST"] = 9728] = "NEAREST";
1878
- TextureMagFilter[TextureMagFilter[/**
1885
+ */ TextureMagFilter[TextureMagFilter["NEAREST"] = 9728] = "NEAREST";
1886
+ /**
1879
1887
  * Linear
1880
- */ "LINEAR"] = 9729] = "LINEAR";
1881
- })(TextureMagFilter || (TextureMagFilter = {}));
1882
- var TextureMinFilter;
1883
- (function(TextureMinFilter) {
1884
- TextureMinFilter[TextureMinFilter[/**
1888
+ */ TextureMagFilter[TextureMagFilter["LINEAR"] = 9729] = "LINEAR";
1889
+ return TextureMagFilter;
1890
+ }({});
1891
+ /**
1892
+ * Minification filter. All valid values correspond to WebGL enums
1893
+ */ var TextureMinFilter = /*#__PURE__*/ function(TextureMinFilter) {
1894
+ /**
1885
1895
  * Nearest
1886
- */ "NEAREST"] = 9728] = "NEAREST";
1887
- TextureMinFilter[TextureMinFilter[/**
1896
+ */ TextureMinFilter[TextureMinFilter["NEAREST"] = 9728] = "NEAREST";
1897
+ /**
1888
1898
  * Linear
1889
- */ "LINEAR"] = 9729] = "LINEAR";
1890
- TextureMinFilter[TextureMinFilter[/**
1899
+ */ TextureMinFilter[TextureMinFilter["LINEAR"] = 9729] = "LINEAR";
1900
+ /**
1891
1901
  * Nearest Mip-Map Nearest
1892
- */ "NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
1893
- TextureMinFilter[TextureMinFilter[/**
1902
+ */ TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
1903
+ /**
1894
1904
  * Linear Mipmap Nearest
1895
- */ "LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
1896
- TextureMinFilter[TextureMinFilter[/**
1905
+ */ TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
1906
+ /**
1897
1907
  * Nearest Mipmap Linear
1898
- */ "NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
1899
- TextureMinFilter[TextureMinFilter[/**
1908
+ */ TextureMinFilter[TextureMinFilter["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
1909
+ /**
1900
1910
  * Linear Mipmap Linear
1901
- */ "LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
1902
- })(TextureMinFilter || (TextureMinFilter = {}));
1903
- var TextureWrapMode;
1904
- (function(TextureWrapMode) {
1905
- TextureWrapMode[TextureWrapMode[/**
1911
+ */ TextureMinFilter[TextureMinFilter["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
1912
+ return TextureMinFilter;
1913
+ }({});
1914
+ /**
1915
+ * S (U) wrapping mode. All valid values correspond to WebGL enums
1916
+ */ var TextureWrapMode = /*#__PURE__*/ function(TextureWrapMode) {
1917
+ /**
1906
1918
  * Clamp to Edge
1907
- */ "CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
1908
- TextureWrapMode[TextureWrapMode[/**
1919
+ */ TextureWrapMode[TextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
1920
+ /**
1909
1921
  * Mirrored Repeat
1910
- */ "MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
1911
- TextureWrapMode[TextureWrapMode[/**
1922
+ */ TextureWrapMode[TextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
1923
+ /**
1912
1924
  * Repeat
1913
- */ "REPEAT"] = 10497] = "REPEAT";
1914
- })(TextureWrapMode || (TextureWrapMode = {}));
1925
+ */ TextureWrapMode[TextureWrapMode["REPEAT"] = 10497] = "REPEAT";
1926
+ return TextureWrapMode;
1927
+ }({});
1915
1928
 
1916
1929
  /**
1917
1930
  * @internal
@@ -2056,9 +2069,7 @@ var TextureWrapMode;
2056
2069
  };
2057
2070
  return GLTFParserContext;
2058
2071
  }();
2059
- (function() {
2060
- GLTFParserContext._parsers = {};
2061
- })();
2072
+ GLTFParserContext._parsers = {};
2062
2073
  /**
2063
2074
  * @internal
2064
2075
  */ var BufferInfo = function BufferInfo(data, interleaved, stride) {
@@ -2067,8 +2078,7 @@ var TextureWrapMode;
2067
2078
  this.stride = stride;
2068
2079
  this.vertexBindingInfos = {};
2069
2080
  };
2070
- var GLTFParserType;
2071
- (function(GLTFParserType) {
2081
+ var GLTFParserType = /*#__PURE__*/ function(GLTFParserType) {
2072
2082
  GLTFParserType[GLTFParserType["Schema"] = 0] = "Schema";
2073
2083
  GLTFParserType[GLTFParserType["Validator"] = 1] = "Validator";
2074
2084
  GLTFParserType[GLTFParserType["Scene"] = 2] = "Scene";
@@ -2081,9 +2091,10 @@ var GLTFParserType;
2081
2091
  GLTFParserType[GLTFParserType["Skin"] = 9] = "Skin";
2082
2092
  GLTFParserType[GLTFParserType["Animation"] = 10] = "Animation";
2083
2093
  GLTFParserType[GLTFParserType["AnimatorController"] = 11] = "AnimatorController";
2084
- })(GLTFParserType || (GLTFParserType = {}));
2085
- var _obj;
2086
- 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);
2094
+ return GLTFParserType;
2095
+ }({});
2096
+ var _obj$3;
2097
+ 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);
2087
2098
  var _obj1;
2088
2099
  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);
2089
2100
  function registerGLTFParser(pipeline) {
@@ -2476,23 +2487,13 @@ function registerGLTFParser(pipeline) {
2476
2487
  return GLTFUtils;
2477
2488
  }();
2478
2489
 
2479
- var DFDTransferFunction;
2480
- (function(DFDTransferFunction) {
2481
- DFDTransferFunction[DFDTransferFunction["linear"] = 1] = "linear";
2482
- DFDTransferFunction[DFDTransferFunction["sRGB"] = 2] = "sRGB";
2483
- })(DFDTransferFunction || (DFDTransferFunction = {}));
2484
- var ColorModel;
2485
- (function(ColorModel) {
2486
- ColorModel[ColorModel["ETC1S"] = 163] = "ETC1S";
2487
- ColorModel[ColorModel["UASTC"] = 166] = "UASTC";
2488
- })(ColorModel || (ColorModel = {}));
2489
- var SupercompressionScheme;
2490
- (function(SupercompressionScheme) {
2490
+ var SupercompressionScheme = /*#__PURE__*/ function(SupercompressionScheme) {
2491
2491
  SupercompressionScheme[SupercompressionScheme["None"] = 0] = "None";
2492
2492
  SupercompressionScheme[SupercompressionScheme["BasisLZ"] = 1] = "BasisLZ";
2493
2493
  SupercompressionScheme[SupercompressionScheme["Zstd"] = 2] = "Zstd";
2494
2494
  SupercompressionScheme[SupercompressionScheme["ZLib"] = 3] = "ZLib";
2495
- })(SupercompressionScheme || (SupercompressionScheme = {}));
2495
+ return SupercompressionScheme;
2496
+ }({});
2496
2497
  /** @internal */ var KTX2Container = /*#__PURE__*/ function() {
2497
2498
  function KTX2Container(buffer) {
2498
2499
  this.vkFormat = 0;
@@ -2662,17 +2663,17 @@ var SupercompressionScheme;
2662
2663
 
2663
2664
  /**
2664
2665
  * KTX2 transcode target format.
2665
- */ var KTX2TargetFormat;
2666
- (function(KTX2TargetFormat) {
2667
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "ASTC"] = 0] = "ASTC";
2668
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "BC7"] = 1] = "BC7";
2669
- 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";
2670
- KTX2TargetFormat[KTX2TargetFormat[/** RGB(A) compressed format, 4 bits per pixel. */ "PVRTC"] = 3] = "PVRTC";
2671
- 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";
2672
- KTX2TargetFormat[KTX2TargetFormat[/** R format, 8 bits per pixel. */ "R8"] = 5] = "R8";
2673
- KTX2TargetFormat[KTX2TargetFormat[/** RG format, 16 bits per pixel. */ "R8G8"] = 6] = "R8G8";
2674
- KTX2TargetFormat[KTX2TargetFormat[/** RGBA format, 32 bits per pixel. */ "R8G8B8A8"] = 7] = "R8G8B8A8";
2675
- })(KTX2TargetFormat || (KTX2TargetFormat = {}));
2666
+ */ var KTX2TargetFormat = /*#__PURE__*/ function(KTX2TargetFormat) {
2667
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ KTX2TargetFormat[KTX2TargetFormat["ASTC"] = 0] = "ASTC";
2668
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ KTX2TargetFormat[KTX2TargetFormat["BC7"] = 1] = "BC7";
2669
+ /** 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";
2670
+ /** RGB(A) compressed format, 4 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["PVRTC"] = 3] = "PVRTC";
2671
+ /** 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";
2672
+ /** R format, 8 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8"] = 5] = "R8";
2673
+ /** RG format, 16 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8G8"] = 6] = "R8G8";
2674
+ /** RGBA format, 32 bits per pixel. */ KTX2TargetFormat[KTX2TargetFormat["R8G8B8A8"] = 7] = "R8G8B8A8";
2675
+ return KTX2TargetFormat;
2676
+ }({});
2676
2677
 
2677
2678
  /**
2678
2679
  * @internal
@@ -2886,7 +2887,7 @@ var _init = function init() {
2886
2887
  };
2887
2888
  var init = _init();
2888
2889
  function transcode(buffer, targetFormat, KTX2File) {
2889
- var getTranscodeFormatFromTarget = function getTranscodeFormatFromTarget(target, hasAlpha) {
2890
+ function getTranscodeFormatFromTarget(target, hasAlpha) {
2890
2891
  switch(target){
2891
2892
  case 2:
2892
2893
  return hasAlpha ? 3 : 2;
@@ -2901,8 +2902,8 @@ function transcode(buffer, targetFormat, KTX2File) {
2901
2902
  case 1:
2902
2903
  return 7;
2903
2904
  }
2904
- };
2905
- var concat = function concat(arrays) {
2905
+ }
2906
+ function concat(arrays) {
2906
2907
  if (arrays.length === 1) return arrays[0];
2907
2908
  var totalByteLength = 0;
2908
2909
  for(var i = 0; i < arrays.length; i++){
@@ -2915,37 +2916,12 @@ function transcode(buffer, targetFormat, KTX2File) {
2915
2916
  byteOffset += arrays[i1].byteLength;
2916
2917
  }
2917
2918
  return result;
2918
- };
2919
- var cleanup = function cleanup() {
2919
+ }
2920
+ var ktx2File = new KTX2File(new Uint8Array(buffer));
2921
+ function cleanup() {
2920
2922
  ktx2File.close();
2921
2923
  ktx2File.delete();
2922
- };
2923
- var BasisFormat;
2924
- (function(BasisFormat) {
2925
- BasisFormat[BasisFormat["ETC1"] = 0] = "ETC1";
2926
- BasisFormat[BasisFormat["ETC2"] = 1] = "ETC2";
2927
- BasisFormat[BasisFormat["BC1"] = 2] = "BC1";
2928
- BasisFormat[BasisFormat["BC3"] = 3] = "BC3";
2929
- BasisFormat[BasisFormat["BC4"] = 4] = "BC4";
2930
- BasisFormat[BasisFormat["BC5"] = 5] = "BC5";
2931
- BasisFormat[BasisFormat["BC7"] = 7] = "BC7";
2932
- BasisFormat[BasisFormat["PVRTC1_4_RGB"] = 8] = "PVRTC1_4_RGB";
2933
- BasisFormat[BasisFormat["PVRTC1_4_RGBA"] = 9] = "PVRTC1_4_RGBA";
2934
- BasisFormat[BasisFormat["ASTC_4x4"] = 10] = "ASTC_4x4";
2935
- BasisFormat[BasisFormat["RGBA8"] = 13] = "RGBA8";
2936
- })(BasisFormat || (BasisFormat = {}));
2937
- var TargetFormat;
2938
- (function(TargetFormat) {
2939
- TargetFormat[TargetFormat["ASTC"] = 0] = "ASTC";
2940
- TargetFormat[TargetFormat["BC7"] = 1] = "BC7";
2941
- TargetFormat[TargetFormat["BC1_BC3"] = 2] = "BC1_BC3";
2942
- TargetFormat[TargetFormat["PVRTC"] = 3] = "PVRTC";
2943
- TargetFormat[TargetFormat["ETC"] = 4] = "ETC";
2944
- TargetFormat[TargetFormat["R8"] = 5] = "R8";
2945
- TargetFormat[TargetFormat["RG8"] = 6] = "RG8";
2946
- TargetFormat[TargetFormat["RGBA8"] = 7] = "RGBA8";
2947
- })(TargetFormat || (TargetFormat = {}));
2948
- var ktx2File = new KTX2File(new Uint8Array(buffer));
2924
+ }
2949
2925
  if (!ktx2File.isValid()) {
2950
2926
  cleanup();
2951
2927
  throw new Error("Invalid or unsupported .ktx2 file");
@@ -3006,10 +2982,10 @@ function transcode(buffer, targetFormat, KTX2File) {
3006
2982
  };
3007
2983
  }
3008
2984
 
3009
- /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
3010
- _inherits(BinomialLLCTranscoder, AbstractTranscoder1);
2985
+ /** @internal */ var BinomialLLCTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
2986
+ _inherits(BinomialLLCTranscoder, AbstractTranscoder);
3011
2987
  function BinomialLLCTranscoder(workerLimitCount) {
3012
- return AbstractTranscoder1.call(this, workerLimitCount);
2988
+ return AbstractTranscoder.call(this, workerLimitCount) || this;
3013
2989
  }
3014
2990
  var _proto = BinomialLLCTranscoder.prototype;
3015
2991
  _proto._initTranscodeWorkerPool = function _initTranscodeWorkerPool() {
@@ -3071,7 +3047,60 @@ function transcode(buffer, targetFormat, KTX2File) {
3071
3047
  }(AbstractTranscoder);
3072
3048
 
3073
3049
  function TranscodeWorkerCode() {
3074
- var transcodeASTCAndBC7 = function transcodeASTCAndBC7(wasmTranscoder, compressedData, width, height) {
3050
+ var wasmPromise;
3051
+ /**
3052
+ * ZSTD (Zstandard) decoder.
3053
+ */ var ZSTDDecoder = /*#__PURE__*/ function() {
3054
+ function ZSTDDecoder() {}
3055
+ var _proto = ZSTDDecoder.prototype;
3056
+ _proto.init = function init() {
3057
+ if (!this._initPromise) {
3058
+ this._initPromise = fetch(ZSTDDecoder.WasmModuleURL).then(function(response) {
3059
+ if (response.ok) {
3060
+ return response.arrayBuffer();
3061
+ }
3062
+ throw new Error("Could not fetch the wasm component for the Zstandard decompression lib: " + response.status + " - " + response.statusText);
3063
+ }).then(function(arrayBuffer) {
3064
+ return WebAssembly.instantiate(arrayBuffer, ZSTDDecoder.IMPORT_OBJECT);
3065
+ }).then(this._init);
3066
+ }
3067
+ return this._initPromise;
3068
+ };
3069
+ _proto._init = function _init(result) {
3070
+ ZSTDDecoder.instance = result.instance;
3071
+ ZSTDDecoder.IMPORT_OBJECT.env.emscripten_notify_memory_growth(); // initialize heap.
3072
+ };
3073
+ _proto.decode = function decode(array, uncompressedSize) {
3074
+ if (uncompressedSize === void 0) uncompressedSize = 0;
3075
+ if (!ZSTDDecoder.instance) {
3076
+ throw new Error("ZSTDDecoder: Await .init() before decoding.");
3077
+ }
3078
+ var exports = ZSTDDecoder.instance.exports;
3079
+ // Write compressed data into WASM memory
3080
+ var compressedSize = array.byteLength;
3081
+ var compressedPtr = exports.malloc(compressedSize);
3082
+ ZSTDDecoder.heap.set(array, compressedPtr);
3083
+ // Decompress into WASM memory
3084
+ uncompressedSize = uncompressedSize || Number(exports.ZSTD_findDecompressedSize(compressedPtr, compressedSize));
3085
+ var uncompressedPtr = exports.malloc(uncompressedSize);
3086
+ var actualSize = exports.ZSTD_decompress(uncompressedPtr, uncompressedSize, compressedPtr, compressedSize);
3087
+ // Read decompressed data and free WASM memory
3088
+ var dec = ZSTDDecoder.heap.slice(uncompressedPtr, uncompressedPtr + actualSize);
3089
+ exports.free(compressedPtr);
3090
+ exports.free(uncompressedPtr);
3091
+ return dec;
3092
+ };
3093
+ return ZSTDDecoder;
3094
+ }();
3095
+ ZSTDDecoder.IMPORT_OBJECT = {
3096
+ env: {
3097
+ emscripten_notify_memory_growth: function emscripten_notify_memory_growth() {
3098
+ ZSTDDecoder.heap = new Uint8Array(ZSTDDecoder.instance.exports.memory.buffer);
3099
+ }
3100
+ }
3101
+ };
3102
+ ZSTDDecoder.WasmModuleURL = "https://mdn.alipayobjects.com/rms/afts/file/A*awNJR7KqIAEAAAAAAAAAAAAAARQnAQ/zstddec.wasm";
3103
+ function transcodeASTCAndBC7(wasmTranscoder, compressedData, width, height) {
3075
3104
  var nBlocks = (width + 3 >> 2) * (height + 3 >> 2);
3076
3105
  var texMemoryPages = nBlocks * 16 + 65535 >> 16;
3077
3106
  var memory = wasmTranscoder.memory;
@@ -3080,8 +3109,8 @@ function TranscodeWorkerCode() {
3080
3109
  var textureView = new Uint8Array(memory.buffer, 65536, nBlocks * 16);
3081
3110
  textureView.set(compressedData);
3082
3111
  return wasmTranscoder.transcode(nBlocks) === 0 ? textureView : null;
3083
- };
3084
- var initWasm = function initWasm(buffer) {
3112
+ }
3113
+ function initWasm(buffer) {
3085
3114
  wasmPromise = WebAssembly.instantiate(buffer, {
3086
3115
  env: {
3087
3116
  memory: new WebAssembly.Memory({
@@ -3092,8 +3121,9 @@ function TranscodeWorkerCode() {
3092
3121
  return moduleWrapper.instance.exports;
3093
3122
  });
3094
3123
  return wasmPromise;
3095
- };
3096
- var transcode = function transcode(data, needZstd, wasmModule) {
3124
+ }
3125
+ var zstdDecoder = new ZSTDDecoder();
3126
+ function transcode(data, needZstd, wasmModule) {
3097
3127
  var faceCount = data.length;
3098
3128
  var result = new Array(faceCount);
3099
3129
  var promise = Promise.resolve();
@@ -3126,65 +3156,7 @@ function TranscodeWorkerCode() {
3126
3156
  }
3127
3157
  return result;
3128
3158
  });
3129
- };
3130
- var wasmPromise;
3131
- /**
3132
- * ZSTD (Zstandard) decoder.
3133
- */ var ZSTDDecoder = /*#__PURE__*/ function() {
3134
- function ZSTDDecoder() {}
3135
- var _proto = ZSTDDecoder.prototype;
3136
- _proto.init = function init() {
3137
- if (!this._initPromise) {
3138
- this._initPromise = fetch(ZSTDDecoder.WasmModuleURL).then(function(response) {
3139
- if (response.ok) {
3140
- return response.arrayBuffer();
3141
- }
3142
- throw new Error("Could not fetch the wasm component for the Zstandard decompression lib: " + response.status + " - " + response.statusText);
3143
- }).then(function(arrayBuffer) {
3144
- return WebAssembly.instantiate(arrayBuffer, ZSTDDecoder.IMPORT_OBJECT);
3145
- }).then(this._init);
3146
- }
3147
- return this._initPromise;
3148
- };
3149
- _proto._init = function _init(result) {
3150
- ZSTDDecoder.instance = result.instance;
3151
- ZSTDDecoder.IMPORT_OBJECT.env.emscripten_notify_memory_growth(); // initialize heap.
3152
- };
3153
- _proto.decode = function decode(array, uncompressedSize) {
3154
- if (uncompressedSize === void 0) uncompressedSize = 0;
3155
- if (!ZSTDDecoder.instance) {
3156
- throw new Error("ZSTDDecoder: Await .init() before decoding.");
3157
- }
3158
- var exports = ZSTDDecoder.instance.exports;
3159
- // Write compressed data into WASM memory
3160
- var compressedSize = array.byteLength;
3161
- var compressedPtr = exports.malloc(compressedSize);
3162
- ZSTDDecoder.heap.set(array, compressedPtr);
3163
- // Decompress into WASM memory
3164
- uncompressedSize = uncompressedSize || Number(exports.ZSTD_findDecompressedSize(compressedPtr, compressedSize));
3165
- var uncompressedPtr = exports.malloc(uncompressedSize);
3166
- var actualSize = exports.ZSTD_decompress(uncompressedPtr, uncompressedSize, compressedPtr, compressedSize);
3167
- // Read decompressed data and free WASM memory
3168
- var dec = ZSTDDecoder.heap.slice(uncompressedPtr, uncompressedPtr + actualSize);
3169
- exports.free(compressedPtr);
3170
- exports.free(uncompressedPtr);
3171
- return dec;
3172
- };
3173
- return ZSTDDecoder;
3174
- }();
3175
- (function() {
3176
- ZSTDDecoder.IMPORT_OBJECT = {
3177
- env: {
3178
- emscripten_notify_memory_growth: function emscripten_notify_memory_growth() {
3179
- ZSTDDecoder.heap = new Uint8Array(ZSTDDecoder.instance.exports.memory.buffer);
3180
- }
3181
- }
3182
- };
3183
- })();
3184
- (function() {
3185
- ZSTDDecoder.WasmModuleURL = "https://mdn.alipayobjects.com/rms/afts/file/A*awNJR7KqIAEAAAAAAAAAAAAAARQnAQ/zstddec.wasm";
3186
- })();
3187
- var zstdDecoder = new ZSTDDecoder();
3159
+ }
3188
3160
  self.onmessage = function onmessage(event) {
3189
3161
  var message = event.data;
3190
3162
  switch(message.type){
@@ -3212,12 +3184,11 @@ function TranscodeWorkerCode() {
3212
3184
  };
3213
3185
  }
3214
3186
 
3215
- /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder1) {
3216
- _inherits(KhronosTranscoder, AbstractTranscoder1);
3187
+ /** @internal */ var KhronosTranscoder = /*#__PURE__*/ function(AbstractTranscoder) {
3188
+ _inherits(KhronosTranscoder, AbstractTranscoder);
3217
3189
  function KhronosTranscoder(workerLimitCount, type) {
3218
3190
  var _this;
3219
- _this = AbstractTranscoder1.call(this, workerLimitCount) || this;
3220
- _this.type = type;
3191
+ _this = AbstractTranscoder.call(this, workerLimitCount) || this, _this.type = type;
3221
3192
  return _this;
3222
3193
  }
3223
3194
  var _proto = KhronosTranscoder.prototype;
@@ -3277,19 +3248,16 @@ function TranscodeWorkerCode() {
3277
3248
  };
3278
3249
  return KhronosTranscoder;
3279
3250
  }(AbstractTranscoder);
3280
- (function() {
3281
- var _obj;
3282
- KhronosTranscoder.transcoderMap = (_obj = {}, // TODO: support bc7
3283
- _obj[KTX2TargetFormat.ASTC] = "https://mdn.alipayobjects.com/rms/afts/file/A*0jiKRK6D1-kAAAAAAAAAAAAAARQnAQ/uastc_astc.wasm", _obj);
3284
- })();
3285
-
3286
- var _KTX2Loader;
3287
- var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3288
- _inherits(KTX2Loader1, Loader1);
3289
- function KTX2Loader1() {
3290
- return Loader1.apply(this, arguments);
3251
+ var _obj$2;
3252
+ KhronosTranscoder.transcoderMap = (_obj$2 = {}, // TODO: support bc7
3253
+ _obj$2[KTX2TargetFormat.ASTC] = "https://mdn.alipayobjects.com/rms/afts/file/A*0jiKRK6D1-kAAAAAAAAAAAAAARQnAQ/uastc_astc.wasm", _obj$2);
3254
+
3255
+ var KTX2Loader = /*#__PURE__*/ function(Loader) {
3256
+ _inherits(KTX2Loader, Loader);
3257
+ function KTX2Loader() {
3258
+ return Loader.apply(this, arguments) || this;
3291
3259
  }
3292
- var _proto = KTX2Loader1.prototype;
3260
+ var _proto = KTX2Loader.prototype;
3293
3261
  _proto.initialize = function initialize(_, configuration) {
3294
3262
  if (configuration.ktx2Loader) {
3295
3263
  var options = configuration.ktx2Loader;
@@ -3297,7 +3265,7 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3297
3265
  KTX2Loader._priorityFormats["etc1s"] = options.priorityFormats;
3298
3266
  KTX2Loader._priorityFormats["uastc"] = options.priorityFormats;
3299
3267
  }
3300
- if (options.transcoder === /** Khronos transcoder. */ 1) {
3268
+ if (options.transcoder === 1) {
3301
3269
  return KTX2Loader._getKhronosTranscoder(options.workerCount).init();
3302
3270
  } else {
3303
3271
  return KTX2Loader._getBinomialLLCTranscoder(options.workerCount).init();
@@ -3322,18 +3290,17 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3322
3290
  /**
3323
3291
  * Release ktx2 transcoder worker.
3324
3292
  * @remarks If use loader after releasing, we should release again.
3325
- */ KTX2Loader1.release = function release() {
3293
+ */ KTX2Loader.release = function release() {
3326
3294
  if (this._binomialLLCTranscoder) this._binomialLLCTranscoder.destroy();
3327
3295
  if (this._khronosTranscoder) this._khronosTranscoder.destroy();
3328
3296
  this._binomialLLCTranscoder = null;
3329
3297
  this._khronosTranscoder = null;
3330
3298
  this._isBinomialInit = false;
3331
3299
  };
3332
- /** @internal */ KTX2Loader1._parseBuffer = function _parseBuffer(buffer, engine, params) {
3333
- var _params;
3300
+ /** @internal */ KTX2Loader._parseBuffer = function _parseBuffer(buffer, engine, params) {
3334
3301
  var ktx2Container = new KTX2Container(buffer);
3335
3302
  var _params_priorityFormats;
3336
- var formatPriorities = (_params_priorityFormats = (_params = params) == null ? void 0 : _params.priorityFormats) != null ? _params_priorityFormats : KTX2Loader._priorityFormats[ktx2Container.isUASTC ? "uastc" : "etc1s"];
3303
+ var formatPriorities = (_params_priorityFormats = params == null ? void 0 : params.priorityFormats) != null ? _params_priorityFormats : KTX2Loader._priorityFormats[ktx2Container.isUASTC ? "uastc" : "etc1s"];
3337
3304
  var targetFormat = KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
3338
3305
  var transcodeResultPromise;
3339
3306
  if (KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
@@ -3356,7 +3323,7 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3356
3323
  };
3357
3324
  });
3358
3325
  };
3359
- /** @internal */ KTX2Loader1._createTextureByBuffer = function _createTextureByBuffer(engine, transcodeResult, targetFormat, params) {
3326
+ /** @internal */ KTX2Loader._createTextureByBuffer = function _createTextureByBuffer(engine, transcodeResult, targetFormat, params) {
3360
3327
  var width = transcodeResult.width, height = transcodeResult.height, faces = transcodeResult.faces;
3361
3328
  var faceCount = faces.length;
3362
3329
  var mipmaps = faces[0];
@@ -3386,7 +3353,7 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3386
3353
  }
3387
3354
  return texture;
3388
3355
  };
3389
- KTX2Loader1._decideTargetFormat = function _decideTargetFormat(engine, ktx2Container, priorityFormats) {
3356
+ KTX2Loader._decideTargetFormat = function _decideTargetFormat(engine, ktx2Container, priorityFormats) {
3390
3357
  var renderer = engine._hardwareRenderer;
3391
3358
  var targetFormat = this._detectSupportedFormat(renderer, priorityFormats);
3392
3359
  if (targetFormat === KTX2TargetFormat.PVRTC && (!MathUtil.isPowerOf2(ktx2Container.pixelWidth) || !MathUtil.isPowerOf2(ktx2Container.pixelHeight) || ktx2Container.pixelWidth !== ktx2Container.pixelHeight)) {
@@ -3399,7 +3366,7 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3399
3366
  }
3400
3367
  return targetFormat;
3401
3368
  };
3402
- KTX2Loader1._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
3369
+ KTX2Loader._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
3403
3370
  for(var i = 0; i < priorityFormats.length; i++){
3404
3371
  var format = priorityFormats[i];
3405
3372
  var capabilities = this._supportedMap[format];
@@ -3421,18 +3388,18 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3421
3388
  }
3422
3389
  return null;
3423
3390
  };
3424
- KTX2Loader1._getBinomialLLCTranscoder = function _getBinomialLLCTranscoder(workerCount) {
3391
+ KTX2Loader._getBinomialLLCTranscoder = function _getBinomialLLCTranscoder(workerCount) {
3425
3392
  if (workerCount === void 0) workerCount = 4;
3426
3393
  KTX2Loader._isBinomialInit = true;
3427
3394
  var _this__binomialLLCTranscoder;
3428
3395
  return (_this__binomialLLCTranscoder = this._binomialLLCTranscoder) != null ? _this__binomialLLCTranscoder : this._binomialLLCTranscoder = new BinomialLLCTranscoder(workerCount);
3429
3396
  };
3430
- KTX2Loader1._getKhronosTranscoder = function _getKhronosTranscoder(workerCount) {
3397
+ KTX2Loader._getKhronosTranscoder = function _getKhronosTranscoder(workerCount) {
3431
3398
  if (workerCount === void 0) workerCount = 4;
3432
3399
  var _this__khronosTranscoder;
3433
3400
  return (_this__khronosTranscoder = this._khronosTranscoder) != null ? _this__khronosTranscoder : this._khronosTranscoder = new KhronosTranscoder(workerCount, KTX2TargetFormat.ASTC);
3434
3401
  };
3435
- KTX2Loader1._getEngineTextureFormat = function _getEngineTextureFormat(basisFormat, transcodeResult) {
3402
+ KTX2Loader._getEngineTextureFormat = function _getEngineTextureFormat(basisFormat, transcodeResult) {
3436
3403
  var hasAlpha = transcodeResult.hasAlpha;
3437
3404
  switch(basisFormat){
3438
3405
  case KTX2TargetFormat.ASTC:
@@ -3449,63 +3416,56 @@ var KTX2Loader = (_KTX2Loader = /*#__PURE__*/ function(Loader1) {
3449
3416
  return TextureFormat.R8G8B8A8;
3450
3417
  }
3451
3418
  };
3452
- return KTX2Loader1;
3453
- }(Loader), function() {
3454
- _KTX2Loader._isBinomialInit = false;
3455
- }(), function() {
3456
- _KTX2Loader._priorityFormats = {
3457
- etc1s: [
3458
- KTX2TargetFormat.ETC,
3459
- KTX2TargetFormat.BC7,
3460
- KTX2TargetFormat.ASTC,
3461
- KTX2TargetFormat.BC1_BC3,
3462
- KTX2TargetFormat.PVRTC
3463
- ],
3464
- uastc: [
3465
- KTX2TargetFormat.ASTC,
3466
- KTX2TargetFormat.BC7,
3467
- KTX2TargetFormat.ETC,
3468
- KTX2TargetFormat.BC1_BC3,
3469
- KTX2TargetFormat.PVRTC
3470
- ]
3471
- };
3472
- }(), function() {
3473
- var _obj;
3474
- _KTX2Loader._supportedMap = (_obj = {}, _obj[KTX2TargetFormat.ASTC] = [
3475
- GLCapabilityType.astc
3476
- ], _obj[KTX2TargetFormat.ETC] = [
3477
- GLCapabilityType.etc
3478
- ], _obj[KTX2TargetFormat.BC7] = [
3479
- GLCapabilityType.bptc
3480
- ], _obj[KTX2TargetFormat.BC1_BC3] = [
3481
- GLCapabilityType.s3tc
3482
- ], _obj[KTX2TargetFormat.PVRTC] = [
3483
- GLCapabilityType.pvrtc,
3484
- GLCapabilityType.pvrtc_webkit
3485
- ], _obj);
3486
- }(), _KTX2Loader);
3419
+ return KTX2Loader;
3420
+ }(Loader);
3421
+ KTX2Loader._isBinomialInit = false;
3422
+ KTX2Loader._priorityFormats = {
3423
+ etc1s: [
3424
+ KTX2TargetFormat.ETC,
3425
+ KTX2TargetFormat.BC7,
3426
+ KTX2TargetFormat.ASTC,
3427
+ KTX2TargetFormat.BC1_BC3,
3428
+ KTX2TargetFormat.PVRTC
3429
+ ],
3430
+ uastc: [
3431
+ KTX2TargetFormat.ASTC,
3432
+ KTX2TargetFormat.BC7,
3433
+ KTX2TargetFormat.ETC,
3434
+ KTX2TargetFormat.BC1_BC3,
3435
+ KTX2TargetFormat.PVRTC
3436
+ ]
3437
+ };
3438
+ var _obj$1;
3439
+ KTX2Loader._supportedMap = (_obj$1 = {}, _obj$1[KTX2TargetFormat.ASTC] = [
3440
+ GLCapabilityType.astc
3441
+ ], _obj$1[KTX2TargetFormat.ETC] = [
3442
+ GLCapabilityType.etc
3443
+ ], _obj$1[KTX2TargetFormat.BC7] = [
3444
+ GLCapabilityType.bptc
3445
+ ], _obj$1[KTX2TargetFormat.BC1_BC3] = [
3446
+ GLCapabilityType.s3tc
3447
+ ], _obj$1[KTX2TargetFormat.PVRTC] = [
3448
+ GLCapabilityType.pvrtc,
3449
+ GLCapabilityType.pvrtc_webkit
3450
+ ], _obj$1);
3487
3451
  KTX2Loader = __decorate([
3488
3452
  resourceLoader(AssetType.KTX2, [
3489
3453
  "ktx2"
3490
3454
  ])
3491
3455
  ], KTX2Loader);
3492
- var KTX2Transcoder;
3493
- (function(KTX2Transcoder) {
3494
- KTX2Transcoder[KTX2Transcoder[/** BinomialLLC transcoder. */ "BinomialLLC"] = 0] = "BinomialLLC";
3495
- KTX2Transcoder[KTX2Transcoder["Khronos"] = 1] = "Khronos";
3496
- })(KTX2Transcoder || (KTX2Transcoder = {}));
3456
+ /** Used for initialize KTX2 transcoder. */ var KTX2Transcoder = /*#__PURE__*/ function(KTX2Transcoder) {
3457
+ /** BinomialLLC transcoder. */ KTX2Transcoder[KTX2Transcoder["BinomialLLC"] = 0] = "BinomialLLC";
3458
+ /** Khronos transcoder. */ KTX2Transcoder[KTX2Transcoder["Khronos"] = 1] = "Khronos";
3459
+ return KTX2Transcoder;
3460
+ }({});
3497
3461
 
3498
3462
  /**
3499
3463
  * @internal
3500
- */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
3501
- _inherits(GLTFContentRestorer, ContentRestorer1);
3464
+ */ var GLTFContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
3465
+ _inherits(GLTFContentRestorer, ContentRestorer);
3502
3466
  function GLTFContentRestorer() {
3503
3467
  var _this;
3504
- _this = ContentRestorer1.apply(this, arguments) || this;
3505
- _this.bufferRequests = [];
3506
- _this.glbBufferSlices = [];
3507
- _this.bufferTextures = [];
3508
- _this.meshes = [];
3468
+ _this = ContentRestorer.apply(this, arguments) || this, _this.bufferRequests = [], _this.glbBufferSlices = [], _this.bufferTextures = [], _this.meshes = [];
3509
3469
  return _this;
3510
3470
  }
3511
3471
  var _proto = GLTFContentRestorer.prototype;
@@ -3708,16 +3668,18 @@ var KTX2Transcoder;
3708
3668
  };
3709
3669
  return GLTFExtensionParser;
3710
3670
  }();
3711
- var GLTFExtensionMode;
3712
- (function(GLTFExtensionMode) {
3713
- GLTFExtensionMode[GLTFExtensionMode[/**
3671
+ /**
3672
+ * glTF Extension mode.
3673
+ */ var GLTFExtensionMode = /*#__PURE__*/ function(GLTFExtensionMode) {
3674
+ /**
3714
3675
  * Cerate instance and parse mode.
3715
3676
  * @remarks
3716
3677
  * If the glTF property has multiple extensions of `CreateAndParse` mode, only execute the last one.
3717
3678
  * If this method is registered, the default pipeline processing will be ignored.
3718
- */ "CreateAndParse"] = 0] = "CreateAndParse";
3719
- GLTFExtensionMode[GLTFExtensionMode[/** Additive parse mode. */ "AdditiveParse"] = 1] = "AdditiveParse";
3720
- })(GLTFExtensionMode || (GLTFExtensionMode = {}));
3679
+ */ GLTFExtensionMode[GLTFExtensionMode["CreateAndParse"] = 0] = "CreateAndParse";
3680
+ /** Additive parse mode. */ GLTFExtensionMode[GLTFExtensionMode["AdditiveParse"] = 1] = "AdditiveParse";
3681
+ return GLTFExtensionMode;
3682
+ }({});
3721
3683
 
3722
3684
  /**
3723
3685
  * Base class of glTF parser.
@@ -3741,7 +3703,12 @@ var GLTFExtensionMode;
3741
3703
  var _GLTFParser;
3742
3704
  var extensionName = extensionArray[i];
3743
3705
  var extensionSchema = extensions[extensionName];
3744
- resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [].concat(extensionName, context, extensionSchema, ownerSchema, extra));
3706
+ resource = (_GLTFParser = GLTFParser)._createAndParse.apply(_GLTFParser, [].concat([
3707
+ extensionName,
3708
+ context,
3709
+ extensionSchema,
3710
+ ownerSchema
3711
+ ], extra));
3745
3712
  if (resource) {
3746
3713
  return resource;
3747
3714
  }
@@ -3761,7 +3728,13 @@ var GLTFExtensionMode;
3761
3728
  for(var extensionName in extensions){
3762
3729
  var _GLTFParser;
3763
3730
  var extensionSchema = extensions[extensionName];
3764
- (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [].concat(extensionName, context, parseResource, extensionSchema, ownerSchema, extra));
3731
+ (_GLTFParser = GLTFParser)._additiveParse.apply(_GLTFParser, [].concat([
3732
+ extensionName,
3733
+ context,
3734
+ parseResource,
3735
+ extensionSchema,
3736
+ ownerSchema
3737
+ ], extra));
3765
3738
  }
3766
3739
  };
3767
3740
  /**
@@ -3778,9 +3751,8 @@ var GLTFExtensionMode;
3778
3751
  * @param mode - GLTF extension mode
3779
3752
  * @returns GLTF extension parser
3780
3753
  */ GLTFParser.getExtensionParser = function getExtensionParser(extensionName, mode) {
3781
- var _parsers;
3782
3754
  var parsers = GLTFParser._extensionParsers[extensionName];
3783
- var length = (_parsers = parsers) == null ? void 0 : _parsers.length;
3755
+ var length = parsers == null ? void 0 : parsers.length;
3784
3756
  if (length) {
3785
3757
  // only use the last parser.
3786
3758
  for(var i = length - 1; i >= 0; --i){
@@ -3806,7 +3778,11 @@ var GLTFExtensionMode;
3806
3778
  var parser = GLTFParser.getExtensionParser(extensionName, GLTFExtensionMode.CreateAndParse);
3807
3779
  if (parser) {
3808
3780
  var _parser;
3809
- return (_parser = parser).createAndParse.apply(_parser, [].concat(context, extensionSchema, ownerSchema, extra));
3781
+ return (_parser = parser).createAndParse.apply(_parser, [].concat([
3782
+ context,
3783
+ extensionSchema,
3784
+ ownerSchema
3785
+ ], extra));
3810
3786
  }
3811
3787
  };
3812
3788
  GLTFParser._additiveParse = function _additiveParse(extensionName, context, parseResource, extensionSchema, ownerSchema) {
@@ -3816,14 +3792,17 @@ var GLTFExtensionMode;
3816
3792
  var parser = GLTFParser.getExtensionParser(extensionName, GLTFExtensionMode.AdditiveParse);
3817
3793
  if (parser) {
3818
3794
  var _parser;
3819
- (_parser = parser).additiveParse.apply(_parser, [].concat(context, parseResource, extensionSchema, ownerSchema, extra));
3795
+ (_parser = parser).additiveParse.apply(_parser, [].concat([
3796
+ context,
3797
+ parseResource,
3798
+ extensionSchema,
3799
+ ownerSchema
3800
+ ], extra));
3820
3801
  }
3821
3802
  };
3822
3803
  return GLTFParser;
3823
3804
  }();
3824
- (function() {
3825
- GLTFParser._extensionParsers = {};
3826
- })();
3805
+ GLTFParser._extensionParsers = {};
3827
3806
  /**
3828
3807
  * Declare ExtensionParser's decorator.
3829
3808
  * @param extensionName - Extension name
@@ -3835,10 +3814,10 @@ var GLTFExtensionMode;
3835
3814
  };
3836
3815
  }
3837
3816
 
3838
- var GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3839
- _inherits(GLTFSchemaParser, GLTFParser1);
3817
+ var GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser) {
3818
+ _inherits(GLTFSchemaParser, GLTFParser);
3840
3819
  function GLTFSchemaParser() {
3841
- return GLTFParser1.apply(this, arguments);
3820
+ return GLTFParser.apply(this, arguments) || this;
3842
3821
  }
3843
3822
  var _proto = GLTFSchemaParser.prototype;
3844
3823
  _proto.parse = function parse(context) {
@@ -3852,16 +3831,14 @@ var GLTFSchemaParser = /*#__PURE__*/ function(GLTFParser1) {
3852
3831
  var remoteUrl = resourceManager._getRemoteUrl(url);
3853
3832
  return resourceManager// @ts-ignore
3854
3833
  ._requestByRemoteUrl(remoteUrl, requestConfig).onProgress(undefined, context._onTaskDetail).then(function(buffer) {
3855
- var _parseResult;
3856
3834
  var parseResult = GLTFUtils.parseGLB(context, buffer);
3857
3835
  // If the buffer is a GLB file, we need to restore the buffer data
3858
- if ((_parseResult = parseResult) == null ? void 0 : _parseResult.glTF) {
3836
+ if (parseResult == null ? void 0 : parseResult.glTF) {
3859
3837
  restoreBufferRequests.push(new BufferRequestInfo(remoteUrl, requestConfig));
3860
3838
  }
3861
3839
  return parseResult;
3862
3840
  }).then(function(result) {
3863
- var _result;
3864
- if ((_result = result) == null ? void 0 : _result.glTF) {
3841
+ if (result == null ? void 0 : result.glTF) {
3865
3842
  contentRestorer.isGLB = true;
3866
3843
  context.buffers = result.buffers;
3867
3844
  return result.glTF;
@@ -3878,11 +3855,11 @@ GLTFSchemaParser = __decorate([
3878
3855
  ], GLTFSchemaParser);
3879
3856
 
3880
3857
  var GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3881
- _inherits(GLTFAnimationParser1, GLTFParser1);
3882
- function GLTFAnimationParser1() {
3883
- return GLTFParser1.apply(this, arguments);
3858
+ _inherits(GLTFAnimationParser, GLTFParser1);
3859
+ function GLTFAnimationParser() {
3860
+ return GLTFParser1.apply(this, arguments) || this;
3884
3861
  }
3885
- var _proto = GLTFAnimationParser1.prototype;
3862
+ var _proto = GLTFAnimationParser.prototype;
3886
3863
  _proto.parse = function parse(context, index) {
3887
3864
  var animationInfo = context.glTF.animations[index];
3888
3865
  var _animationInfo_name = animationInfo.name, name = _animationInfo_name === void 0 ? "AnimationClip" + index : _animationInfo_name;
@@ -3894,7 +3871,7 @@ var GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3894
3871
  };
3895
3872
  /**
3896
3873
  * @internal
3897
- */ GLTFAnimationParser1._parseStandardProperty = function _parseStandardProperty(context, animationClip, animationInfo) {
3874
+ */ GLTFAnimationParser._parseStandardProperty = function _parseStandardProperty(context, animationClip, animationInfo) {
3898
3875
  var _loop = function(j, m) {
3899
3876
  var glTFSampler = samplers[j];
3900
3877
  var inputAccessor = accessors[glTFSampler.input];
@@ -3998,7 +3975,7 @@ var GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
3998
3975
  return animationClip;
3999
3976
  });
4000
3977
  };
4001
- GLTFAnimationParser1._addCurve = function _addCurve(animationChannelTargetPath, glTFChannel, sampleDataCollection) {
3978
+ GLTFAnimationParser._addCurve = function _addCurve(animationChannelTargetPath, glTFChannel, sampleDataCollection) {
4002
3979
  var sampleData = sampleDataCollection[glTFChannel.sampler];
4003
3980
  var input = sampleData.input, output = sampleData.output, outputSize = sampleData.outputSize;
4004
3981
  switch(animationChannelTargetPath){
@@ -4066,16 +4043,16 @@ var GLTFAnimationParser = /*#__PURE__*/ function(GLTFParser1) {
4066
4043
  }
4067
4044
  }
4068
4045
  };
4069
- return GLTFAnimationParser1;
4046
+ return GLTFAnimationParser;
4070
4047
  }(GLTFParser);
4071
4048
  GLTFAnimationParser = __decorate([
4072
4049
  registerGLTFParser(GLTFParserType.Animation)
4073
4050
  ], GLTFAnimationParser);
4074
4051
 
4075
- var GLTFBufferParser = /*#__PURE__*/ function(GLTFParser1) {
4076
- _inherits(GLTFBufferParser, GLTFParser1);
4052
+ var GLTFBufferParser = /*#__PURE__*/ function(GLTFParser) {
4053
+ _inherits(GLTFBufferParser, GLTFParser);
4077
4054
  function GLTFBufferParser() {
4078
- return GLTFParser1.apply(this, arguments);
4055
+ return GLTFParser.apply(this, arguments) || this;
4079
4056
  }
4080
4057
  var _proto = GLTFBufferParser.prototype;
4081
4058
  _proto.parse = function parse(context, index) {
@@ -4107,7 +4084,7 @@ GLTFBufferParser = __decorate([
4107
4084
  var GLTFEntityParser = /*#__PURE__*/ function(GLTFParser1) {
4108
4085
  _inherits(GLTFEntityParser, GLTFParser1);
4109
4086
  function GLTFEntityParser() {
4110
- return GLTFParser1.apply(this, arguments);
4087
+ return GLTFParser1.apply(this, arguments) || this;
4111
4088
  }
4112
4089
  var _proto = GLTFEntityParser.prototype;
4113
4090
  _proto.parse = function parse(context, index) {
@@ -4152,11 +4129,11 @@ GLTFEntityParser = __decorate([
4152
4129
  ], GLTFEntityParser);
4153
4130
 
4154
4131
  var GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4155
- _inherits(GLTFMaterialParser1, GLTFParser1);
4156
- function GLTFMaterialParser1() {
4157
- return GLTFParser1.apply(this, arguments);
4132
+ _inherits(GLTFMaterialParser, GLTFParser1);
4133
+ function GLTFMaterialParser() {
4134
+ return GLTFParser1.apply(this, arguments) || this;
4158
4135
  }
4159
- var _proto = GLTFMaterialParser1.prototype;
4136
+ var _proto = GLTFMaterialParser.prototype;
4160
4137
  _proto.parse = function parse(context, index) {
4161
4138
  var materialInfo = context.glTF.materials[index];
4162
4139
  var glTFResource = context.glTFResource;
@@ -4175,13 +4152,13 @@ var GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4175
4152
  return material;
4176
4153
  });
4177
4154
  };
4178
- /** @internal */ GLTFMaterialParser1._getDefaultMaterial = function _getDefaultMaterial(engine) {
4155
+ /** @internal */ GLTFMaterialParser._getDefaultMaterial = function _getDefaultMaterial(engine) {
4179
4156
  var _GLTFMaterialParser;
4180
4157
  return (_GLTFMaterialParser = GLTFMaterialParser)._defaultMaterial || (_GLTFMaterialParser._defaultMaterial = new BlinnPhongMaterial(engine));
4181
4158
  };
4182
4159
  /**
4183
4160
  * @internal
4184
- */ GLTFMaterialParser1._checkOtherTextureTransform = function _checkOtherTextureTransform(texture, textureName) {
4161
+ */ GLTFMaterialParser._checkOtherTextureTransform = function _checkOtherTextureTransform(texture, textureName) {
4185
4162
  var _texture_extensions;
4186
4163
  if ((_texture_extensions = texture.extensions) == null ? void 0 : _texture_extensions.KHR_texture_transform) {
4187
4164
  Logger.warn("" + textureName + " texture always use the KHR_texture_transform of the base texture.");
@@ -4189,7 +4166,7 @@ var GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4189
4166
  };
4190
4167
  /**
4191
4168
  * @internal
4192
- */ GLTFMaterialParser1._parseStandardProperty = function _parseStandardProperty(context, material, materialInfo) {
4169
+ */ GLTFMaterialParser._parseStandardProperty = function _parseStandardProperty(context, material, materialInfo) {
4193
4170
  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;
4194
4171
  if (pbrMetallicRoughness) {
4195
4172
  var baseColorFactor = pbrMetallicRoughness.baseColorFactor, baseColorTexture = pbrMetallicRoughness.baseColorTexture, metallicFactor = pbrMetallicRoughness.metallicFactor, roughnessFactor = pbrMetallicRoughness.roughnessFactor, metallicRoughnessTexture = pbrMetallicRoughness.metallicRoughnessTexture;
@@ -4266,19 +4243,18 @@ var GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
4266
4243
  break;
4267
4244
  }
4268
4245
  };
4269
- return GLTFMaterialParser1;
4246
+ return GLTFMaterialParser;
4270
4247
  }(GLTFParser);
4271
4248
  GLTFMaterialParser = __decorate([
4272
4249
  registerGLTFParser(GLTFParserType.Material)
4273
4250
  ], GLTFMaterialParser);
4274
4251
 
4275
- var _GLTFMeshParser;
4276
- var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4277
- _inherits(GLTFMeshParser1, GLTFParser1);
4278
- function GLTFMeshParser1() {
4279
- return GLTFParser1.apply(this, arguments);
4252
+ var GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4253
+ _inherits(GLTFMeshParser, GLTFParser1);
4254
+ function GLTFMeshParser() {
4255
+ return GLTFParser1.apply(this, arguments) || this;
4280
4256
  }
4281
- var _proto = GLTFMeshParser1.prototype;
4257
+ var _proto = GLTFMeshParser.prototype;
4282
4258
  _proto.parse = function parse(context, index) {
4283
4259
  var _loop = function(i, length) {
4284
4260
  var gltfPrimitive = meshInfo.primitives[i];
@@ -4316,7 +4292,7 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4316
4292
  };
4317
4293
  /**
4318
4294
  * @internal
4319
- */ GLTFMeshParser1._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, keepMeshData) {
4295
+ */ GLTFMeshParser._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, keepMeshData) {
4320
4296
  var _loop = function(attribute) {
4321
4297
  var accessor = accessors[attributes[attribute]];
4322
4298
  var promise = GLTFUtils.getAccessorBuffer(context, gltf.bufferViews, accessor).then(function(accessorBuffer) {
@@ -4419,7 +4395,7 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4419
4395
  });
4420
4396
  });
4421
4397
  };
4422
- GLTFMeshParser1._getBlendShapeData = function _getBlendShapeData(context, glTF, accessor) {
4398
+ GLTFMeshParser._getBlendShapeData = function _getBlendShapeData(context, glTF, accessor) {
4423
4399
  return GLTFUtils.getAccessorBuffer(context, glTF.bufferViews, accessor).then(function(bufferInfo) {
4424
4400
  var buffer = bufferInfo.data;
4425
4401
  var _accessor_byteOffset;
@@ -4435,8 +4411,8 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4435
4411
  };
4436
4412
  /**
4437
4413
  * @internal
4438
- */ GLTFMeshParser1._createBlendShape = function _createBlendShape(context, mesh, meshRestoreInfo, glTFMesh, gltfPrimitive, glTFTargets) {
4439
- var _this = this, _loop = function(i) {
4414
+ */ GLTFMeshParser._createBlendShape = function _createBlendShape(context, mesh, meshRestoreInfo, glTFMesh, gltfPrimitive, glTFTargets) {
4415
+ var _this, _loop = function(i) {
4440
4416
  var blendShapeData = {};
4441
4417
  blendShapeCollection[i] = blendShapeData;
4442
4418
  var name = blendShapeNames ? blendShapeNames[i] : "blendShape" + i;
@@ -4450,12 +4426,11 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4450
4426
  hasNormal ? _this._getBlendShapeData(context, glTF, accessors[normalTarget]) : null,
4451
4427
  hasTangent ? _this._getBlendShapeData(context, glTF, accessors[tangentTarget]) : null
4452
4428
  ]).then(function(vertices) {
4453
- var _tangentData;
4454
4429
  var positionData = vertices[0], normalData = vertices[1], tangentData = vertices[2];
4455
4430
  var blendShape = new BlendShape(name);
4456
4431
  blendShape.addFrame(1.0, positionData.vertices, hasNormal ? normalData.vertices : null, hasTangent ? tangentData.vertices : null);
4457
4432
  blendShapeData.blendShape = blendShape;
4458
- blendShapeData.restoreInfo = new BlendShapeRestoreInfo(blendShape, positionData.restoreInfo, hasNormal ? normalData.restoreInfo : null, hasTangent ? (_tangentData = tangentData) == null ? void 0 : _tangentData.restoreInfo : null);
4433
+ blendShapeData.restoreInfo = new BlendShapeRestoreInfo(blendShape, positionData.restoreInfo, hasNormal ? normalData.restoreInfo : null, hasTangent ? tangentData == null ? void 0 : tangentData.restoreInfo : null);
4459
4434
  });
4460
4435
  promises.push(promise);
4461
4436
  };
@@ -4465,7 +4440,7 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4465
4440
  var promises = new Array();
4466
4441
  var blendShapeCount = glTFTargets.length;
4467
4442
  var blendShapeCollection = new Array(blendShapeCount);
4468
- for(var i = 0; i < blendShapeCount; i++)_loop(i);
4443
+ for(var i = 0; i < blendShapeCount; i++)_this = this, _loop(i);
4469
4444
  return Promise.all(promises).then(function() {
4470
4445
  for(var _iterator = _create_for_of_iterator_helper_loose(blendShapeCollection), _step; !(_step = _iterator()).done;){
4471
4446
  var blendShape = _step.value;
@@ -4474,10 +4449,9 @@ var GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1) {
4474
4449
  }
4475
4450
  });
4476
4451
  };
4477
- return GLTFMeshParser1;
4478
- }(GLTFParser), function() {
4479
- _GLTFMeshParser._tempVector3 = new Vector3();
4480
- }(), _GLTFMeshParser);
4452
+ return GLTFMeshParser;
4453
+ }(GLTFParser);
4454
+ GLTFMeshParser._tempVector3 = new Vector3();
4481
4455
  GLTFMeshParser = __decorate([
4482
4456
  registerGLTFParser(GLTFParserType.Mesh)
4483
4457
  ], GLTFMeshParser);
@@ -4485,7 +4459,7 @@ GLTFMeshParser = __decorate([
4485
4459
  var GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
4486
4460
  _inherits(GLTFSceneParser, GLTFParser1);
4487
4461
  function GLTFSceneParser() {
4488
- return GLTFParser1.apply(this, arguments);
4462
+ return GLTFParser1.apply(this, arguments) || this;
4489
4463
  }
4490
4464
  var _proto = GLTFSceneParser.prototype;
4491
4465
  _proto.parse = function parse(context, index) {
@@ -4665,10 +4639,10 @@ GLTFSceneParser = __decorate([
4665
4639
  registerGLTFParser(GLTFParserType.Scene)
4666
4640
  ], GLTFSceneParser);
4667
4641
 
4668
- var GLTFSkinParser = /*#__PURE__*/ function(GLTFParser1) {
4669
- _inherits(GLTFSkinParser, GLTFParser1);
4642
+ var GLTFSkinParser = /*#__PURE__*/ function(GLTFParser) {
4643
+ _inherits(GLTFSkinParser, GLTFParser);
4670
4644
  function GLTFSkinParser() {
4671
- return GLTFParser1.apply(this, arguments);
4645
+ return GLTFParser.apply(this, arguments) || this;
4672
4646
  }
4673
4647
  var _proto = GLTFSkinParser.prototype;
4674
4648
  _proto.parse = function parse(context, index) {
@@ -4745,13 +4719,12 @@ GLTFSkinParser = __decorate([
4745
4719
  registerGLTFParser(GLTFParserType.Skin)
4746
4720
  ], GLTFSkinParser);
4747
4721
 
4748
- var _GLTFTextureParser;
4749
- var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
4750
- _inherits(GLTFTextureParser1, GLTFParser1);
4751
- function GLTFTextureParser1() {
4752
- return GLTFParser1.apply(this, arguments);
4722
+ var GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
4723
+ _inherits(GLTFTextureParser, GLTFParser1);
4724
+ function GLTFTextureParser() {
4725
+ return GLTFParser1.apply(this, arguments) || this;
4753
4726
  }
4754
- var _proto = GLTFTextureParser1.prototype;
4727
+ var _proto = GLTFTextureParser.prototype;
4755
4728
  _proto.parse = function parse(context, textureIndex) {
4756
4729
  var textureInfo = context.glTF.textures[textureIndex];
4757
4730
  var glTFResource = context.glTFResource;
@@ -4767,7 +4740,7 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
4767
4740
  return texture;
4768
4741
  });
4769
4742
  };
4770
- /** @internal */ GLTFTextureParser1._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
4743
+ /** @internal */ GLTFTextureParser._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
4771
4744
  var glTFResource = context.glTFResource, glTF = context.glTF;
4772
4745
  var engine = glTFResource.engine, url = glTFResource.url;
4773
4746
  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;
@@ -4775,7 +4748,6 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
4775
4748
  var samplerInfo = useSampler && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
4776
4749
  var texture;
4777
4750
  if (uri) {
4778
- var _samplerInfo;
4779
4751
  var extIndex = uri.lastIndexOf(".");
4780
4752
  var ext = uri.substring(extIndex + 1);
4781
4753
  var type = ext.startsWith("ktx") ? AssetType.KTX : AssetType.Texture2D;
@@ -4783,7 +4755,7 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
4783
4755
  url: Utils.resolveAbsoluteUrl(url, uri),
4784
4756
  type: type,
4785
4757
  params: {
4786
- mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
4758
+ mipmap: samplerInfo == null ? void 0 : samplerInfo.mipmap
4787
4759
  }
4788
4760
  }).onProgress(undefined, context._onTaskDetail).then(function(texture) {
4789
4761
  texture.name = textureName || imageName || texture.name || "texture_" + textureIndex;
@@ -4797,8 +4769,7 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
4797
4769
  var buffer = buffers[bufferView.buffer];
4798
4770
  var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
4799
4771
  return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
4800
- var _samplerInfo;
4801
- var texture = new Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
4772
+ var texture = new Texture2D(engine, image.width, image.height, undefined, samplerInfo == null ? void 0 : samplerInfo.mipmap);
4802
4773
  texture.setImageSource(image);
4803
4774
  texture.generateMipmaps();
4804
4775
  texture.name = textureName || imageName || "texture_" + textureIndex;
@@ -4811,11 +4782,10 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
4811
4782
  }
4812
4783
  return texture;
4813
4784
  };
4814
- return GLTFTextureParser1;
4815
- }(GLTFParser), function() {
4816
- var _obj;
4817
- /** @internal */ _GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = TextureWrapMode$1.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = TextureWrapMode$1.Mirror, _obj[TextureWrapMode.REPEAT] = TextureWrapMode$1.Repeat, _obj);
4818
- }(), _GLTFTextureParser);
4785
+ return GLTFTextureParser;
4786
+ }(GLTFParser);
4787
+ var _obj;
4788
+ /** @internal */ GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = TextureWrapMode$1.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = TextureWrapMode$1.Mirror, _obj[TextureWrapMode.REPEAT] = TextureWrapMode$1.Repeat, _obj);
4819
4789
  GLTFTextureParser = __decorate([
4820
4790
  registerGLTFParser(GLTFParserType.Texture)
4821
4791
  ], GLTFTextureParser);
@@ -4823,7 +4793,7 @@ GLTFTextureParser = __decorate([
4823
4793
  var GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
4824
4794
  _inherits(GLTFValidator, GLTFParser1);
4825
4795
  function GLTFValidator() {
4826
- return GLTFParser1.apply(this, arguments);
4796
+ return GLTFParser1.apply(this, arguments) || this;
4827
4797
  }
4828
4798
  var _proto = GLTFValidator.prototype;
4829
4799
  _proto.parse = function parse(context) {
@@ -4861,7 +4831,7 @@ GLTFValidator = __decorate([
4861
4831
  var GLTFBufferViewParser = /*#__PURE__*/ function(GLTFParser1) {
4862
4832
  _inherits(GLTFBufferViewParser, GLTFParser1);
4863
4833
  function GLTFBufferViewParser() {
4864
- return GLTFParser1.apply(this, arguments);
4834
+ return GLTFParser1.apply(this, arguments) || this;
4865
4835
  }
4866
4836
  var _proto = GLTFBufferViewParser.prototype;
4867
4837
  _proto.parse = function parse(context, index) {
@@ -4877,10 +4847,10 @@ GLTFBufferViewParser = __decorate([
4877
4847
  registerGLTFParser(GLTFParserType.BufferView)
4878
4848
  ], GLTFBufferViewParser);
4879
4849
 
4880
- var GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser1) {
4881
- _inherits(GLTFAnimatorControllerParser, GLTFParser1);
4850
+ var GLTFAnimatorControllerParser = /*#__PURE__*/ function(GLTFParser) {
4851
+ _inherits(GLTFAnimatorControllerParser, GLTFParser);
4882
4852
  function GLTFAnimatorControllerParser() {
4883
- return GLTFParser1.apply(this, arguments);
4853
+ return GLTFParser.apply(this, arguments) || this;
4884
4854
  }
4885
4855
  var _proto = GLTFAnimatorControllerParser.prototype;
4886
4856
  _proto.parse = function parse(context) {
@@ -4924,89 +4894,6 @@ GLTFAnimatorControllerParser = __decorate([
4924
4894
  // Source: https://github.com/zeux/meshoptimizer/blob/master/js/meshopt_decoder.js
4925
4895
  var ready;
4926
4896
  function getMeshoptDecoder() {
4927
- var unpack = function unpack(data) {
4928
- var result = new Uint8Array(data.length);
4929
- for(var i = 0; i < data.length; ++i){
4930
- var ch = data.charCodeAt(i);
4931
- result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
4932
- }
4933
- var write = 0;
4934
- for(var i1 = 0; i1 < data.length; ++i1){
4935
- result[write++] = result[i1] < 60 ? wasmpack[result[i1]] : (result[i1] - 60) * 64 + result[++i1];
4936
- }
4937
- return result.buffer.slice(0, write);
4938
- };
4939
- var decode = function decode(fun, target, count, size, source, filter) {
4940
- var sbrk = instance.exports.sbrk;
4941
- var count4 = count + 3 & ~3;
4942
- var tp = sbrk(count4 * size);
4943
- var sp = sbrk(source.length);
4944
- var heap = new Uint8Array(instance.exports.memory.buffer);
4945
- heap.set(source, sp);
4946
- var res = fun(tp, count, size, sp, source.length);
4947
- if (res == 0 && filter) {
4948
- filter(tp, count4, size);
4949
- }
4950
- target.set(heap.subarray(tp, tp + count * size));
4951
- sbrk(tp - sbrk(0));
4952
- if (res != 0) {
4953
- throw new Error("Malformed buffer data: " + res);
4954
- }
4955
- };
4956
- var createWorker = function createWorker(url) {
4957
- var worker = {
4958
- object: new Worker(url),
4959
- pending: 0,
4960
- requests: {}
4961
- };
4962
- worker.object.onmessage = function(event) {
4963
- var data = event.data;
4964
- worker.pending -= data.count;
4965
- worker.requests[data.id][data.action](data.value);
4966
- delete worker.requests[data.id];
4967
- };
4968
- return worker;
4969
- };
4970
- var initWorkers = function initWorkers(count) {
4971
- 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 }';
4972
- var blob = new Blob([
4973
- source
4974
- ], {
4975
- type: "text/javascript"
4976
- });
4977
- var url = URL.createObjectURL(blob);
4978
- for(var i = 0; i < count; ++i){
4979
- workers[i] = createWorker(url);
4980
- }
4981
- URL.revokeObjectURL(url);
4982
- };
4983
- var decodeWorker = function decodeWorker(count, size, source, mode, filter) {
4984
- var worker = workers[0];
4985
- for(var i = 1; i < workers.length; ++i){
4986
- if (workers[i].pending < worker.pending) {
4987
- worker = workers[i];
4988
- }
4989
- }
4990
- return new Promise(function(resolve, reject) {
4991
- var data = new Uint8Array(source);
4992
- var id = requestId++;
4993
- worker.pending += count;
4994
- worker.requests[id] = {
4995
- resolve: resolve,
4996
- reject: reject
4997
- };
4998
- worker.object.postMessage({
4999
- id: id,
5000
- count: count,
5001
- size: size,
5002
- source: data,
5003
- mode: mode,
5004
- filter: filter
5005
- }, [
5006
- data.buffer
5007
- ]);
5008
- });
5009
- };
5010
4897
  if (ready) return ready;
5011
4898
  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";
5012
4899
  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";
@@ -5102,6 +4989,35 @@ function getMeshoptDecoder() {
5102
4989
  }
5103
4990
  };
5104
4991
  });
4992
+ function unpack(data) {
4993
+ var result = new Uint8Array(data.length);
4994
+ for(var i = 0; i < data.length; ++i){
4995
+ var ch = data.charCodeAt(i);
4996
+ result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
4997
+ }
4998
+ var write = 0;
4999
+ for(var i1 = 0; i1 < data.length; ++i1){
5000
+ result[write++] = result[i1] < 60 ? wasmpack[result[i1]] : (result[i1] - 60) * 64 + result[++i1];
5001
+ }
5002
+ return result.buffer.slice(0, write);
5003
+ }
5004
+ function decode(fun, target, count, size, source, filter) {
5005
+ var sbrk = instance.exports.sbrk;
5006
+ var count4 = count + 3 & ~3;
5007
+ var tp = sbrk(count4 * size);
5008
+ var sp = sbrk(source.length);
5009
+ var heap = new Uint8Array(instance.exports.memory.buffer);
5010
+ heap.set(source, sp);
5011
+ var res = fun(tp, count, size, sp, source.length);
5012
+ if (res == 0 && filter) {
5013
+ filter(tp, count4, size);
5014
+ }
5015
+ target.set(heap.subarray(tp, tp + count * size));
5016
+ sbrk(tp - sbrk(0));
5017
+ if (res != 0) {
5018
+ throw new Error("Malformed buffer data: " + res);
5019
+ }
5020
+ }
5105
5021
  var filters = {
5106
5022
  NONE: "",
5107
5023
  OCTAHEDRAL: "meshopt_decodeFilterOct",
@@ -5115,13 +5031,67 @@ function getMeshoptDecoder() {
5115
5031
  };
5116
5032
  var workers = [];
5117
5033
  var requestId = 0;
5034
+ function createWorker(url) {
5035
+ var worker = {
5036
+ object: new Worker(url),
5037
+ pending: 0,
5038
+ requests: {}
5039
+ };
5040
+ worker.object.onmessage = function(event) {
5041
+ var data = event.data;
5042
+ worker.pending -= data.count;
5043
+ worker.requests[data.id][data.action](data.value);
5044
+ delete worker.requests[data.id];
5045
+ };
5046
+ return worker;
5047
+ }
5048
+ function initWorkers(count) {
5049
+ 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 }';
5050
+ var blob = new Blob([
5051
+ source
5052
+ ], {
5053
+ type: "text/javascript"
5054
+ });
5055
+ var url = URL.createObjectURL(blob);
5056
+ for(var i = 0; i < count; ++i){
5057
+ workers[i] = createWorker(url);
5058
+ }
5059
+ URL.revokeObjectURL(url);
5060
+ }
5061
+ function decodeWorker(count, size, source, mode, filter) {
5062
+ var worker = workers[0];
5063
+ for(var i = 1; i < workers.length; ++i){
5064
+ if (workers[i].pending < worker.pending) {
5065
+ worker = workers[i];
5066
+ }
5067
+ }
5068
+ return new Promise(function(resolve, reject) {
5069
+ var data = new Uint8Array(source);
5070
+ var id = requestId++;
5071
+ worker.pending += count;
5072
+ worker.requests[id] = {
5073
+ resolve: resolve,
5074
+ reject: reject
5075
+ };
5076
+ worker.object.postMessage({
5077
+ id: id,
5078
+ count: count,
5079
+ size: size,
5080
+ source: data,
5081
+ mode: mode,
5082
+ filter: filter
5083
+ }, [
5084
+ data.buffer
5085
+ ]);
5086
+ });
5087
+ }
5118
5088
  return ready;
5119
5089
  }
5120
5090
 
5121
- var GLTFLoader = /*#__PURE__*/ function(Loader1) {
5122
- _inherits(GLTFLoader, Loader1);
5091
+ var GLTFLoader = /*#__PURE__*/ function(Loader) {
5092
+ _inherits(GLTFLoader, Loader);
5123
5093
  function GLTFLoader() {
5124
- return Loader1.apply(this, arguments);
5094
+ return Loader.apply(this, arguments) || this;
5125
5095
  }
5126
5096
  var _proto = GLTFLoader.prototype;
5127
5097
  _proto.initialize = function initialize(_, configuration) {
@@ -5166,12 +5136,11 @@ GLTFLoader = __decorate([
5166
5136
  ])
5167
5137
  ], GLTFLoader);
5168
5138
 
5169
- var PrefabParser = /*#__PURE__*/ function(HierarchyParser1) {
5170
- _inherits(PrefabParser, HierarchyParser1);
5139
+ var PrefabParser = /*#__PURE__*/ function(HierarchyParser) {
5140
+ _inherits(PrefabParser, HierarchyParser);
5171
5141
  function PrefabParser(data, context, prefabResource) {
5172
5142
  var _this;
5173
- _this = HierarchyParser1.call(this, data, context) || this;
5174
- _this.prefabResource = prefabResource;
5143
+ _this = HierarchyParser.call(this, data, context) || this, _this.prefabResource = prefabResource;
5175
5144
  return _this;
5176
5145
  }
5177
5146
  var _proto = PrefabParser.prototype;
@@ -5194,10 +5163,10 @@ var PrefabParser = /*#__PURE__*/ function(HierarchyParser1) {
5194
5163
  return PrefabParser;
5195
5164
  }(HierarchyParser);
5196
5165
 
5197
- var PrefabLoader = /*#__PURE__*/ function(Loader1) {
5198
- _inherits(PrefabLoader, Loader1);
5166
+ var PrefabLoader = /*#__PURE__*/ function(Loader) {
5167
+ _inherits(PrefabLoader, Loader);
5199
5168
  function PrefabLoader() {
5200
- return Loader1.apply(this, arguments);
5169
+ return Loader.apply(this, arguments) || this;
5201
5170
  }
5202
5171
  var _proto = PrefabLoader.prototype;
5203
5172
  _proto.load = function load(item, resourceManager) {
@@ -5219,15 +5188,14 @@ PrefabLoader = __decorate([
5219
5188
  ])
5220
5189
  ], PrefabLoader);
5221
5190
 
5222
- var _HDRLoader;
5223
5191
  var PI = Math.PI;
5224
- var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/HDR_Image_Reader.shtml
5225
- /*#__PURE__*/ function(Loader1) {
5226
- _inherits(HDRLoader1, Loader1);
5227
- function HDRLoader1() {
5228
- return Loader1.apply(this, arguments);
5192
+ // referenece: https://www.flipcode.com/archives/HDR_Image_Reader.shtml
5193
+ var HDRLoader = /*#__PURE__*/ function(Loader) {
5194
+ _inherits(HDRLoader, Loader);
5195
+ function HDRLoader() {
5196
+ return Loader.apply(this, arguments) || this;
5229
5197
  }
5230
- var _proto = HDRLoader1.prototype;
5198
+ var _proto = HDRLoader.prototype;
5231
5199
  _proto.load = function load(item, resourceManager) {
5232
5200
  return new AssetPromise(function(resolve, reject) {
5233
5201
  var engine = resourceManager.engine;
@@ -5244,7 +5212,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5244
5212
  };
5245
5213
  /**
5246
5214
  * @internal
5247
- */ HDRLoader1._setTextureByBuffer = function _setTextureByBuffer(engine, buffer, texture) {
5215
+ */ HDRLoader._setTextureByBuffer = function _setTextureByBuffer(engine, buffer, texture) {
5248
5216
  var bufferArray = new Uint8Array(buffer);
5249
5217
  var _HDRLoader__parseHeader = HDRLoader._parseHeader(bufferArray), width = _HDRLoader__parseHeader.width, height = _HDRLoader__parseHeader.height, dataPosition = _HDRLoader__parseHeader.dataPosition;
5250
5218
  var cubeSize = height >> 1;
@@ -5257,7 +5225,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5257
5225
  texture.generateMipmaps();
5258
5226
  return texture;
5259
5227
  };
5260
- HDRLoader1._convertToCubemap = function _convertToCubemap(pixels, inputWidth, inputHeight, size) {
5228
+ HDRLoader._convertToCubemap = function _convertToCubemap(pixels, inputWidth, inputHeight, size) {
5261
5229
  if (!pixels) {
5262
5230
  throw "ConvertPanoramaToCubemap: input cannot be null";
5263
5231
  }
@@ -5279,7 +5247,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5279
5247
  textureBack
5280
5248
  ];
5281
5249
  };
5282
- HDRLoader1._createCubemapData = function _createCubemapData(texSize, faceData, pixels, inputWidth, inputHeight) {
5250
+ HDRLoader._createCubemapData = function _createCubemapData(texSize, faceData, pixels, inputWidth, inputHeight) {
5283
5251
  var textureArray = new Uint8ClampedArray(texSize * texSize * 4);
5284
5252
  var rotDX1 = this._tempVector3.set(0, 0, 0).add(faceData[1]).subtract(faceData[0]).scale(1 / texSize);
5285
5253
  var rotDX2 = this._temp2Vector3.set(0, 0, 0).add(faceData[3]).subtract(faceData[2]).scale(1 / texSize);
@@ -5307,7 +5275,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5307
5275
  }
5308
5276
  return textureArray;
5309
5277
  };
5310
- HDRLoader1._calcProjectionSpherical = function _calcProjectionSpherical(vDir, pixels, inputWidth, inputHeight) {
5278
+ HDRLoader._calcProjectionSpherical = function _calcProjectionSpherical(vDir, pixels, inputWidth, inputHeight) {
5311
5279
  var theta = Math.atan2(vDir.z, vDir.x);
5312
5280
  var phi = Math.acos(vDir.y);
5313
5281
  while(theta < -PI){
@@ -5340,7 +5308,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5340
5308
  var a = pixels[index + 3];
5341
5309
  return new Color(r, g, b, a);
5342
5310
  };
5343
- HDRLoader1._readStringLine = function _readStringLine(uint8array, startIndex) {
5311
+ HDRLoader._readStringLine = function _readStringLine(uint8array, startIndex) {
5344
5312
  var line = "";
5345
5313
  var character = "";
5346
5314
  for(var i = startIndex; i < uint8array.length - startIndex; i++){
@@ -5352,7 +5320,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5352
5320
  }
5353
5321
  return line;
5354
5322
  };
5355
- HDRLoader1._parseHeader = function _parseHeader(uint8array) {
5323
+ HDRLoader._parseHeader = function _parseHeader(uint8array) {
5356
5324
  var height = 0;
5357
5325
  var width = 0;
5358
5326
  var line = this._readStringLine(uint8array, 0);
@@ -5394,7 +5362,7 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5394
5362
  dataPosition: lineIndex
5395
5363
  };
5396
5364
  };
5397
- HDRLoader1._readPixels = function _readPixels(buffer, width, height) {
5365
+ HDRLoader._readPixels = function _readPixels(buffer, width, height) {
5398
5366
  var scanLineWidth = width;
5399
5367
  var byteLength = buffer.byteLength;
5400
5368
  var dataRGBA = new Uint8Array(4 * width * height);
@@ -5456,14 +5424,14 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5456
5424
  }
5457
5425
  return dataRGBA;
5458
5426
  };
5459
- HDRLoader1._RGBEToLinear = function _RGBEToLinear(color) {
5427
+ HDRLoader._RGBEToLinear = function _RGBEToLinear(color) {
5460
5428
  var scaleFactor = Math.pow(2, color.a - 128) / 255;
5461
5429
  color.r *= scaleFactor;
5462
5430
  color.g *= scaleFactor;
5463
5431
  color.b *= scaleFactor;
5464
5432
  color.a = 1;
5465
5433
  };
5466
- HDRLoader1._linearToRGBM = function _linearToRGBM(color, maxRange) {
5434
+ HDRLoader._linearToRGBM = function _linearToRGBM(color, maxRange) {
5467
5435
  var maxRGB = Math.max(color.r, Math.max(color.g, color.b));
5468
5436
  var M = Math.min(maxRGB / maxRange, 1);
5469
5437
  M = Math.ceil(M * 255);
@@ -5473,76 +5441,57 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
5473
5441
  color.b *= scaleFactor;
5474
5442
  color.a *= M;
5475
5443
  };
5476
- return HDRLoader1;
5477
- }(Loader), function() {
5478
- _HDRLoader._rightBottomBack = new Vector3(1.0, -1.0, -1.0);
5479
- }(), function() {
5480
- _HDRLoader._rightBottomFront = new Vector3(1.0, -1.0, 1.0);
5481
- }(), function() {
5482
- _HDRLoader._rightUpBack = new Vector3(1.0, 1.0, -1.0);
5483
- }(), function() {
5484
- _HDRLoader._rightUpFront = new Vector3(1.0, 1.0, 1.0);
5485
- }(), function() {
5486
- _HDRLoader._leftBottomBack = new Vector3(-1.0, -1.0, -1.0);
5487
- }(), function() {
5488
- _HDRLoader._leftBottomFront = new Vector3(-1.0, -1.0, 1.0);
5489
- }(), function() {
5490
- _HDRLoader._leftUpBack = new Vector3(-1.0, 1.0, -1.0);
5491
- }(), function() {
5492
- _HDRLoader._leftUpFront = new Vector3(-1.0, 1.0, 1.0);
5493
- }(), function() {
5494
- _HDRLoader._faceRight = [
5495
- _HDRLoader._rightBottomBack,
5496
- _HDRLoader._rightBottomFront,
5497
- _HDRLoader._rightUpBack,
5498
- _HDRLoader._rightUpFront
5499
- ];
5500
- }(), function() {
5501
- _HDRLoader._faceLeft = [
5502
- _HDRLoader._leftBottomFront,
5503
- _HDRLoader._leftBottomBack,
5504
- _HDRLoader._leftUpFront,
5505
- _HDRLoader._leftUpBack
5506
- ];
5507
- }(), function() {
5508
- _HDRLoader._faceUp = [
5509
- _HDRLoader._leftBottomFront,
5510
- _HDRLoader._rightBottomFront,
5511
- _HDRLoader._leftBottomBack,
5512
- _HDRLoader._rightBottomBack
5513
- ];
5514
- }(), function() {
5515
- _HDRLoader._faceBottom = [
5516
- _HDRLoader._leftUpBack,
5517
- _HDRLoader._rightUpBack,
5518
- _HDRLoader._leftUpFront,
5519
- _HDRLoader._rightUpFront
5520
- ];
5521
- }(), function() {
5522
- _HDRLoader._faceFront = [
5523
- _HDRLoader._leftBottomBack,
5524
- _HDRLoader._rightBottomBack,
5525
- _HDRLoader._leftUpBack,
5526
- _HDRLoader._rightUpBack
5527
- ];
5528
- }(), function() {
5529
- _HDRLoader._faceBack = [
5530
- _HDRLoader._rightBottomFront,
5531
- _HDRLoader._leftBottomFront,
5532
- _HDRLoader._rightUpFront,
5533
- _HDRLoader._leftUpFront
5534
- ];
5535
- }(), function() {
5536
- _HDRLoader._tempVector3 = new Vector3();
5537
- }(), function() {
5538
- _HDRLoader._temp2Vector3 = new Vector3();
5539
- }(), function() {
5540
- _HDRLoader._temp3Vector3 = new Vector3();
5541
- }(), function() {
5542
- _HDRLoader._temp4Vector3 = new Vector3();
5543
- }(), function() {
5544
- _HDRLoader._temp5Vector3 = new Vector3();
5545
- }(), _HDRLoader);
5444
+ return HDRLoader;
5445
+ }(Loader);
5446
+ HDRLoader._rightBottomBack = new Vector3(1.0, -1.0, -1.0);
5447
+ HDRLoader._rightBottomFront = new Vector3(1.0, -1.0, 1.0);
5448
+ HDRLoader._rightUpBack = new Vector3(1.0, 1.0, -1.0);
5449
+ HDRLoader._rightUpFront = new Vector3(1.0, 1.0, 1.0);
5450
+ HDRLoader._leftBottomBack = new Vector3(-1.0, -1.0, -1.0);
5451
+ HDRLoader._leftBottomFront = new Vector3(-1.0, -1.0, 1.0);
5452
+ HDRLoader._leftUpBack = new Vector3(-1.0, 1.0, -1.0);
5453
+ HDRLoader._leftUpFront = new Vector3(-1.0, 1.0, 1.0);
5454
+ HDRLoader._faceRight = [
5455
+ HDRLoader._rightBottomBack,
5456
+ HDRLoader._rightBottomFront,
5457
+ HDRLoader._rightUpBack,
5458
+ HDRLoader._rightUpFront
5459
+ ];
5460
+ HDRLoader._faceLeft = [
5461
+ HDRLoader._leftBottomFront,
5462
+ HDRLoader._leftBottomBack,
5463
+ HDRLoader._leftUpFront,
5464
+ HDRLoader._leftUpBack
5465
+ ];
5466
+ HDRLoader._faceUp = [
5467
+ HDRLoader._leftBottomFront,
5468
+ HDRLoader._rightBottomFront,
5469
+ HDRLoader._leftBottomBack,
5470
+ HDRLoader._rightBottomBack
5471
+ ];
5472
+ HDRLoader._faceBottom = [
5473
+ HDRLoader._leftUpBack,
5474
+ HDRLoader._rightUpBack,
5475
+ HDRLoader._leftUpFront,
5476
+ HDRLoader._rightUpFront
5477
+ ];
5478
+ HDRLoader._faceFront = [
5479
+ HDRLoader._leftBottomBack,
5480
+ HDRLoader._rightBottomBack,
5481
+ HDRLoader._leftUpBack,
5482
+ HDRLoader._rightUpBack
5483
+ ];
5484
+ HDRLoader._faceBack = [
5485
+ HDRLoader._rightBottomFront,
5486
+ HDRLoader._leftBottomFront,
5487
+ HDRLoader._rightUpFront,
5488
+ HDRLoader._leftUpFront
5489
+ ];
5490
+ HDRLoader._tempVector3 = new Vector3();
5491
+ HDRLoader._temp2Vector3 = new Vector3();
5492
+ HDRLoader._temp3Vector3 = new Vector3();
5493
+ HDRLoader._temp4Vector3 = new Vector3();
5494
+ HDRLoader._temp5Vector3 = new Vector3();
5546
5495
  HDRLoader = __decorate([
5547
5496
  resourceLoader(AssetType.HDR, [
5548
5497
  "hdr"
@@ -5550,13 +5499,11 @@ HDRLoader = __decorate([
5550
5499
  ], HDRLoader);
5551
5500
  /**
5552
5501
  * @internal
5553
- */ var HDRContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
5554
- _inherits(HDRContentRestorer, ContentRestorer1);
5502
+ */ var HDRContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
5503
+ _inherits(HDRContentRestorer, ContentRestorer);
5555
5504
  function HDRContentRestorer(resource, url, requestConfig) {
5556
5505
  var _this;
5557
- _this = ContentRestorer1.call(this, resource) || this;
5558
- _this.url = url;
5559
- _this.requestConfig = requestConfig;
5506
+ _this = ContentRestorer.call(this, resource) || this, _this.url = url, _this.requestConfig = requestConfig;
5560
5507
  return _this;
5561
5508
  }
5562
5509
  var _proto = HDRContentRestorer.prototype;
@@ -5572,10 +5519,10 @@ HDRLoader = __decorate([
5572
5519
  return HDRContentRestorer;
5573
5520
  }(ContentRestorer);
5574
5521
 
5575
- var JSONLoader = /*#__PURE__*/ function(Loader1) {
5576
- _inherits(JSONLoader, Loader1);
5522
+ var JSONLoader = /*#__PURE__*/ function(Loader) {
5523
+ _inherits(JSONLoader, Loader);
5577
5524
  function JSONLoader() {
5578
- return Loader1.apply(this, arguments);
5525
+ return Loader.apply(this, arguments) || this;
5579
5526
  }
5580
5527
  var _proto = JSONLoader.prototype;
5581
5528
  _proto.load = function load(item, resourceManager) {
@@ -5777,10 +5724,10 @@ function parseCubeKTX(dataArray) {
5777
5724
  };
5778
5725
  }
5779
5726
 
5780
- var KTXCubeLoader = /*#__PURE__*/ function(Loader1) {
5781
- _inherits(KTXCubeLoader, Loader1);
5727
+ var KTXCubeLoader = /*#__PURE__*/ function(Loader) {
5728
+ _inherits(KTXCubeLoader, Loader);
5782
5729
  function KTXCubeLoader() {
5783
- return Loader1.apply(this, arguments);
5730
+ return Loader.apply(this, arguments) || this;
5784
5731
  }
5785
5732
  var _proto = KTXCubeLoader.prototype;
5786
5733
  _proto.load = function load(item, resourceManager) {
@@ -5814,10 +5761,10 @@ KTXCubeLoader = __decorate([
5814
5761
  resourceLoader(AssetType.KTXCube, [])
5815
5762
  ], KTXCubeLoader);
5816
5763
 
5817
- var KTXLoader = /*#__PURE__*/ function(Loader1) {
5818
- _inherits(KTXLoader, Loader1);
5764
+ var KTXLoader = /*#__PURE__*/ function(Loader) {
5765
+ _inherits(KTXLoader, Loader);
5819
5766
  function KTXLoader() {
5820
- return Loader1.apply(this, arguments);
5767
+ return Loader.apply(this, arguments) || this;
5821
5768
  }
5822
5769
  var _proto = KTXLoader.prototype;
5823
5770
  _proto.load = function load(item, resourceManager) {
@@ -5849,7 +5796,7 @@ KTXLoader = __decorate([
5849
5796
  ], KTXLoader);
5850
5797
 
5851
5798
  function parseProperty(object, key, value) {
5852
- if (typeof value === "object") {
5799
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") {
5853
5800
  for(var subKey in value){
5854
5801
  parseProperty(object[key], subKey, value[subKey]);
5855
5802
  }
@@ -5857,10 +5804,10 @@ function parseProperty(object, key, value) {
5857
5804
  object[key] = value;
5858
5805
  }
5859
5806
  }
5860
- var MaterialLoader = /*#__PURE__*/ function(Loader1) {
5861
- _inherits(MaterialLoader, Loader1);
5807
+ var MaterialLoader = /*#__PURE__*/ function(Loader) {
5808
+ _inherits(MaterialLoader, Loader);
5862
5809
  function MaterialLoader() {
5863
- return Loader1.apply(this, arguments);
5810
+ return Loader.apply(this, arguments) || this;
5864
5811
  }
5865
5812
  var _proto = MaterialLoader.prototype;
5866
5813
  _proto.load = function load(item, resourceManager) {
@@ -5944,10 +5891,10 @@ MaterialLoader = __decorate([
5944
5891
  ])
5945
5892
  ], MaterialLoader);
5946
5893
 
5947
- var MeshLoader = /*#__PURE__*/ function(Loader1) {
5948
- _inherits(MeshLoader, Loader1);
5894
+ var MeshLoader = /*#__PURE__*/ function(Loader) {
5895
+ _inherits(MeshLoader, Loader);
5949
5896
  function MeshLoader() {
5950
- return Loader1.apply(this, arguments);
5897
+ return Loader.apply(this, arguments) || this;
5951
5898
  }
5952
5899
  var _proto = MeshLoader.prototype;
5953
5900
  _proto.load = function load(item, resourceManager) {
@@ -5970,10 +5917,10 @@ MeshLoader = __decorate([
5970
5917
  ])
5971
5918
  ], MeshLoader);
5972
5919
 
5973
- var PrimitiveMeshLoader = /*#__PURE__*/ function(Loader1) {
5974
- _inherits(PrimitiveMeshLoader, Loader1);
5920
+ var PrimitiveMeshLoader = /*#__PURE__*/ function(Loader) {
5921
+ _inherits(PrimitiveMeshLoader, Loader);
5975
5922
  function PrimitiveMeshLoader() {
5976
- return Loader1.apply(this, arguments);
5923
+ return Loader.apply(this, arguments) || this;
5977
5924
  }
5978
5925
  var _proto = PrimitiveMeshLoader.prototype;
5979
5926
  _proto.load = function load(item, resourceManager) {
@@ -6007,21 +5954,11 @@ PrimitiveMeshLoader = __decorate([
6007
5954
  "mesh"
6008
5955
  ], false)
6009
5956
  ], PrimitiveMeshLoader);
6010
- var /** @internal */ PrimitiveMeshType;
6011
- (function(PrimitiveMeshType) {
6012
- PrimitiveMeshType["Sphere"] = "sphere";
6013
- PrimitiveMeshType["Cuboid"] = "cuboid";
6014
- PrimitiveMeshType["Plane"] = "plane";
6015
- PrimitiveMeshType["Cylinder"] = "cylinder";
6016
- PrimitiveMeshType["Torus"] = "torus";
6017
- PrimitiveMeshType["Cone"] = "cone";
6018
- PrimitiveMeshType["Capsule"] = "capsule";
6019
- })(PrimitiveMeshType || (PrimitiveMeshType = {}));
6020
-
6021
- var ProjectLoader = /*#__PURE__*/ function(Loader1) {
6022
- _inherits(ProjectLoader, Loader1);
5957
+
5958
+ var ProjectLoader = /*#__PURE__*/ function(Loader) {
5959
+ _inherits(ProjectLoader, Loader);
6023
5960
  function ProjectLoader() {
6024
- return Loader1.apply(this, arguments);
5961
+ return Loader.apply(this, arguments) || this;
6025
5962
  }
6026
5963
  var _proto = ProjectLoader.prototype;
6027
5964
  _proto.load = function load(item, resourceManager) {
@@ -6051,10 +5988,10 @@ ProjectLoader = __decorate([
6051
5988
  ], false)
6052
5989
  ], ProjectLoader);
6053
5990
 
6054
- var SourceFontLoader = /*#__PURE__*/ function(Loader1) {
6055
- _inherits(SourceFontLoader, Loader1);
5991
+ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
5992
+ _inherits(SourceFontLoader, Loader);
6056
5993
  function SourceFontLoader() {
6057
- return Loader1.apply(this, arguments);
5994
+ return Loader.apply(this, arguments) || this;
6058
5995
  }
6059
5996
  var _proto = SourceFontLoader.prototype;
6060
5997
  _proto.load = function load(item, resourceManager) {
@@ -6101,14 +6038,11 @@ SourceFontLoader = __decorate([
6101
6038
  ], false)
6102
6039
  ], SourceFontLoader);
6103
6040
 
6104
- var SpriteAtlasLoader = /*#__PURE__*/ function(Loader1) {
6105
- _inherits(SpriteAtlasLoader, Loader1);
6041
+ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
6042
+ _inherits(SpriteAtlasLoader, Loader);
6106
6043
  function SpriteAtlasLoader() {
6107
6044
  var _this;
6108
- _this = Loader1.apply(this, arguments) || this;
6109
- _this._tempRect = new Rect();
6110
- _this._tempVec2 = new Vector2();
6111
- _this._tempVec4 = new Vector4();
6045
+ _this = Loader.apply(this, arguments) || this, _this._tempRect = new Rect(), _this._tempVec2 = new Vector2(), _this._tempVec4 = new Vector4();
6112
6046
  return _this;
6113
6047
  }
6114
6048
  var _proto = SpriteAtlasLoader.prototype;
@@ -6197,10 +6131,10 @@ SpriteAtlasLoader = __decorate([
6197
6131
  ], false)
6198
6132
  ], SpriteAtlasLoader);
6199
6133
 
6200
- var SpriteLoader = /*#__PURE__*/ function(Loader1) {
6201
- _inherits(SpriteLoader, Loader1);
6134
+ var SpriteLoader = /*#__PURE__*/ function(Loader) {
6135
+ _inherits(SpriteLoader, Loader);
6202
6136
  function SpriteLoader() {
6203
- return Loader1.apply(this, arguments);
6137
+ return Loader.apply(this, arguments) || this;
6204
6138
  }
6205
6139
  var _proto = SpriteLoader.prototype;
6206
6140
  _proto.load = function load(item, resourceManager) {
@@ -6249,13 +6183,11 @@ SpriteLoader = __decorate([
6249
6183
 
6250
6184
  /**
6251
6185
  * @internal
6252
- */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
6253
- _inherits(Texture2DContentRestorer, ContentRestorer1);
6186
+ */ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
6187
+ _inherits(Texture2DContentRestorer, ContentRestorer);
6254
6188
  function Texture2DContentRestorer(resource, url, requestConfig) {
6255
6189
  var _this;
6256
- _this = ContentRestorer1.call(this, resource) || this;
6257
- _this.url = url;
6258
- _this.requestConfig = requestConfig;
6190
+ _this = ContentRestorer.call(this, resource) || this, _this.url = url, _this.requestConfig = requestConfig;
6259
6191
  return _this;
6260
6192
  }
6261
6193
  var _proto = Texture2DContentRestorer.prototype;
@@ -6271,10 +6203,10 @@ SpriteLoader = __decorate([
6271
6203
  return Texture2DContentRestorer;
6272
6204
  }(ContentRestorer);
6273
6205
 
6274
- var Texture2DLoader = /*#__PURE__*/ function(Loader1) {
6275
- _inherits(Texture2DLoader, Loader1);
6206
+ var Texture2DLoader = /*#__PURE__*/ function(Loader) {
6207
+ _inherits(Texture2DLoader, Loader);
6276
6208
  function Texture2DLoader() {
6277
- return Loader1.apply(this, arguments);
6209
+ return Loader.apply(this, arguments) || this;
6278
6210
  }
6279
6211
  var _proto = Texture2DLoader.prototype;
6280
6212
  _proto.load = function load(item, resourceManager) {
@@ -6318,13 +6250,11 @@ Texture2DLoader = __decorate([
6318
6250
 
6319
6251
  /**
6320
6252
  * @internal
6321
- */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer1) {
6322
- _inherits(TextureCubeContentRestorer, ContentRestorer1);
6253
+ */ var TextureCubeContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
6254
+ _inherits(TextureCubeContentRestorer, ContentRestorer);
6323
6255
  function TextureCubeContentRestorer(resource, urls, requestConfig) {
6324
6256
  var _this;
6325
- _this = ContentRestorer1.call(this, resource) || this;
6326
- _this.urls = urls;
6327
- _this.requestConfig = requestConfig;
6257
+ _this = ContentRestorer.call(this, resource) || this, _this.urls = urls, _this.requestConfig = requestConfig;
6328
6258
  return _this;
6329
6259
  }
6330
6260
  var _proto = TextureCubeContentRestorer.prototype;
@@ -6348,10 +6278,10 @@ Texture2DLoader = __decorate([
6348
6278
  return TextureCubeContentRestorer;
6349
6279
  }(ContentRestorer);
6350
6280
 
6351
- var TextureCubeLoader = /*#__PURE__*/ function(Loader1) {
6352
- _inherits(TextureCubeLoader, Loader1);
6281
+ var TextureCubeLoader = /*#__PURE__*/ function(Loader) {
6282
+ _inherits(TextureCubeLoader, Loader);
6353
6283
  function TextureCubeLoader() {
6354
- return Loader1.apply(this, arguments);
6284
+ return Loader.apply(this, arguments) || this;
6355
6285
  }
6356
6286
  var _proto = TextureCubeLoader.prototype;
6357
6287
  _proto.load = function load(item, resourceManager) {
@@ -6389,13 +6319,12 @@ TextureCubeLoader = __decorate([
6389
6319
  ])
6390
6320
  ], TextureCubeLoader);
6391
6321
 
6392
- var _ShaderChunkLoader;
6393
- var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6394
- _inherits(ShaderChunkLoader1, Loader1);
6395
- function ShaderChunkLoader1() {
6396
- return Loader1.apply(this, arguments);
6322
+ var ShaderChunkLoader = /*#__PURE__*/ function(Loader) {
6323
+ _inherits(ShaderChunkLoader, Loader);
6324
+ function ShaderChunkLoader() {
6325
+ return Loader.apply(this, arguments) || this;
6397
6326
  }
6398
- var _proto = ShaderChunkLoader1.prototype;
6327
+ var _proto = ShaderChunkLoader.prototype;
6399
6328
  _proto.load = function load(item, resourceManager) {
6400
6329
  var url = item.url;
6401
6330
  // @ts-ignore
@@ -6408,7 +6337,7 @@ var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6408
6337
  };
6409
6338
  /**
6410
6339
  * @internal
6411
- */ ShaderChunkLoader1._loadChunksInCode = function _loadChunksInCode(code, basePath, resourceManager) {
6340
+ */ ShaderChunkLoader._loadChunksInCode = function _loadChunksInCode(code, basePath, resourceManager) {
6412
6341
  var shaderChunkPaths = new Array();
6413
6342
  var matches = code.matchAll(ShaderChunkLoader._shaderIncludeRegex);
6414
6343
  for(var _iterator = _create_for_of_iterator_helper_loose(matches), _step; !(_step = _iterator()).done;){
@@ -6425,23 +6354,21 @@ var ShaderChunkLoader = (_ShaderChunkLoader = /*#__PURE__*/ function(Loader1) {
6425
6354
  });
6426
6355
  }));
6427
6356
  };
6428
- return ShaderChunkLoader1;
6429
- }(Loader), function() {
6430
- _ShaderChunkLoader._shaderIncludeRegex = /\s#include\s+"([./][^\\"]+)"/gm;
6431
- }(), _ShaderChunkLoader);
6357
+ return ShaderChunkLoader;
6358
+ }(Loader);
6359
+ ShaderChunkLoader._shaderIncludeRegex = /\s#include\s+"([./][^\\"]+)"/gm;
6432
6360
  ShaderChunkLoader = __decorate([
6433
6361
  resourceLoader("ShaderChunk", [
6434
6362
  "glsl"
6435
6363
  ])
6436
6364
  ], ShaderChunkLoader);
6437
6365
 
6438
- var _ShaderLoader;
6439
- var ShaderLoader = (_ShaderLoader = /*#__PURE__*/ function(Loader1) {
6440
- _inherits(ShaderLoader1, Loader1);
6441
- function ShaderLoader1() {
6442
- return Loader1.apply(this, arguments);
6366
+ var ShaderLoader = /*#__PURE__*/ function(Loader) {
6367
+ _inherits(ShaderLoader, Loader);
6368
+ function ShaderLoader() {
6369
+ return Loader.apply(this, arguments) || this;
6443
6370
  }
6444
- var _proto = ShaderLoader1.prototype;
6371
+ var _proto = ShaderLoader.prototype;
6445
6372
  _proto.load = function load(item, resourceManager) {
6446
6373
  var _this = this;
6447
6374
  var url = item.url;
@@ -6465,10 +6392,9 @@ var ShaderLoader = (_ShaderLoader = /*#__PURE__*/ function(Loader1) {
6465
6392
  var match = code.match(ShaderLoader._builtinRegex);
6466
6393
  if (match && match[1]) return match[1];
6467
6394
  };
6468
- return ShaderLoader1;
6469
- }(Loader), function() {
6470
- _ShaderLoader._builtinRegex = /^\s*\/\/\s*@builtin\s+(\w+)/;
6471
- }(), _ShaderLoader);
6395
+ return ShaderLoader;
6396
+ }(Loader);
6397
+ ShaderLoader._builtinRegex = /^\s*\/\/\s*@builtin\s+(\w+)/;
6472
6398
  ShaderLoader = __decorate([
6473
6399
  resourceLoader(AssetType.Shader, [
6474
6400
  "gs",
@@ -6476,10 +6402,10 @@ ShaderLoader = __decorate([
6476
6402
  ])
6477
6403
  ], ShaderLoader);
6478
6404
 
6479
- var SceneLoader = /*#__PURE__*/ function(Loader1) {
6480
- _inherits(SceneLoader, Loader1);
6405
+ var SceneLoader = /*#__PURE__*/ function(Loader) {
6406
+ _inherits(SceneLoader, Loader);
6481
6407
  function SceneLoader() {
6482
- return Loader1.apply(this, arguments);
6408
+ return Loader.apply(this, arguments) || this;
6483
6409
  }
6484
6410
  var _proto = SceneLoader.prototype;
6485
6411
  _proto.load = function load(item, resourceManager) {
@@ -6504,20 +6430,17 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
6504
6430
  if (useCustomAmbient && ambient.customAmbientLight) {
6505
6431
  promises.push(// @ts-ignore
6506
6432
  resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
6507
- var _ambientLight;
6508
- scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
6433
+ scene.ambientLight.specularTexture = ambientLight == null ? void 0 : ambientLight.specularTexture;
6509
6434
  }));
6510
6435
  }
6511
6436
  if (ambient.ambientLight && (!useCustomAmbient || useSH)) {
6512
6437
  promises.push(// @ts-ignore
6513
6438
  resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
6514
6439
  if (!useCustomAmbient) {
6515
- var _ambientLight;
6516
- scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
6440
+ scene.ambientLight.specularTexture = ambientLight == null ? void 0 : ambientLight.specularTexture;
6517
6441
  }
6518
6442
  if (useSH) {
6519
- var _ambientLight1;
6520
- scene.ambientLight.diffuseSphericalHarmonics = (_ambientLight1 = ambientLight) == null ? void 0 : _ambientLight1.diffuseSphericalHarmonics;
6443
+ scene.ambientLight.diffuseSphericalHarmonics = ambientLight == null ? void 0 : ambientLight.diffuseSphericalHarmonics;
6521
6444
  }
6522
6445
  }));
6523
6446
  }
@@ -6638,10 +6561,10 @@ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _asy
6638
6561
  });
6639
6562
  }));
6640
6563
 
6641
- var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser1) {
6642
- _inherits(KHR_lights_punctual, GLTFExtensionParser1);
6564
+ var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser) {
6565
+ _inherits(KHR_lights_punctual, GLTFExtensionParser);
6643
6566
  function KHR_lights_punctual() {
6644
- return GLTFExtensionParser1.apply(this, arguments);
6567
+ return GLTFExtensionParser.apply(this, arguments) || this;
6645
6568
  }
6646
6569
  var _proto = KHR_lights_punctual.prototype;
6647
6570
  _proto.additiveParse = function additiveParse(context, entity, extensionSchema) {
@@ -6679,10 +6602,10 @@ KHR_lights_punctual = __decorate([
6679
6602
  registerGLTFExtension("KHR_lights_punctual", GLTFExtensionMode.AdditiveParse)
6680
6603
  ], KHR_lights_punctual);
6681
6604
 
6682
- var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser1) {
6683
- _inherits(KHR_materials_clearcoat, GLTFExtensionParser1);
6605
+ var KHR_materials_clearcoat = /*#__PURE__*/ function(GLTFExtensionParser) {
6606
+ _inherits(KHR_materials_clearcoat, GLTFExtensionParser);
6684
6607
  function KHR_materials_clearcoat() {
6685
- return GLTFExtensionParser1.apply(this, arguments);
6608
+ return GLTFExtensionParser.apply(this, arguments) || this;
6686
6609
  }
6687
6610
  var _proto = KHR_materials_clearcoat.prototype;
6688
6611
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6714,10 +6637,10 @@ KHR_materials_clearcoat = __decorate([
6714
6637
  registerGLTFExtension("KHR_materials_clearcoat", GLTFExtensionMode.AdditiveParse)
6715
6638
  ], KHR_materials_clearcoat);
6716
6639
 
6717
- var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser1) {
6718
- _inherits(KHR_materials_ior, GLTFExtensionParser1);
6640
+ var KHR_materials_ior = /*#__PURE__*/ function(GLTFExtensionParser) {
6641
+ _inherits(KHR_materials_ior, GLTFExtensionParser);
6719
6642
  function KHR_materials_ior() {
6720
- return GLTFExtensionParser1.apply(this, arguments);
6643
+ return GLTFExtensionParser.apply(this, arguments) || this;
6721
6644
  }
6722
6645
  var _proto = KHR_materials_ior.prototype;
6723
6646
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6730,10 +6653,10 @@ KHR_materials_ior = __decorate([
6730
6653
  registerGLTFExtension("KHR_materials_ior", GLTFExtensionMode.AdditiveParse)
6731
6654
  ], KHR_materials_ior);
6732
6655
 
6733
- var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser1) {
6734
- _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser1);
6656
+ var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(GLTFExtensionParser) {
6657
+ _inherits(KHR_materials_pbrSpecularGlossiness, GLTFExtensionParser);
6735
6658
  function KHR_materials_pbrSpecularGlossiness() {
6736
- return GLTFExtensionParser1.apply(this, arguments);
6659
+ return GLTFExtensionParser.apply(this, arguments) || this;
6737
6660
  }
6738
6661
  var _proto = KHR_materials_pbrSpecularGlossiness.prototype;
6739
6662
  _proto.createAndParse = function createAndParse(context, schema, ownerSchema) {
@@ -6771,10 +6694,10 @@ KHR_materials_pbrSpecularGlossiness = __decorate([
6771
6694
  registerGLTFExtension("KHR_materials_pbrSpecularGlossiness", GLTFExtensionMode.CreateAndParse)
6772
6695
  ], KHR_materials_pbrSpecularGlossiness);
6773
6696
 
6774
- var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser1) {
6775
- _inherits(KHR_materials_unlit, GLTFExtensionParser1);
6697
+ var KHR_materials_unlit = /*#__PURE__*/ function(GLTFExtensionParser) {
6698
+ _inherits(KHR_materials_unlit, GLTFExtensionParser);
6776
6699
  function KHR_materials_unlit() {
6777
- return GLTFExtensionParser1.apply(this, arguments);
6700
+ return GLTFExtensionParser.apply(this, arguments) || this;
6778
6701
  }
6779
6702
  var _proto = KHR_materials_unlit.prototype;
6780
6703
  _proto.createAndParse = function createAndParse(context, _, ownerSchema) {
@@ -6790,10 +6713,10 @@ KHR_materials_unlit = __decorate([
6790
6713
  registerGLTFExtension("KHR_materials_unlit", GLTFExtensionMode.CreateAndParse)
6791
6714
  ], KHR_materials_unlit);
6792
6715
 
6793
- var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser1) {
6794
- _inherits(KHR_materials_variants, GLTFExtensionParser1);
6716
+ var KHR_materials_variants = /*#__PURE__*/ function(GLTFExtensionParser) {
6717
+ _inherits(KHR_materials_variants, GLTFExtensionParser);
6795
6718
  function KHR_materials_variants() {
6796
- return GLTFExtensionParser1.apply(this, arguments);
6719
+ return GLTFExtensionParser.apply(this, arguments) || this;
6797
6720
  }
6798
6721
  var _proto = KHR_materials_variants.prototype;
6799
6722
  _proto.additiveParse = function additiveParse(context, renderer, schema) {
@@ -6823,10 +6746,10 @@ KHR_materials_variants = __decorate([
6823
6746
  registerGLTFExtension("KHR_materials_variants", GLTFExtensionMode.AdditiveParse)
6824
6747
  ], KHR_materials_variants);
6825
6748
 
6826
- var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser1) {
6827
- _inherits(KHR_mesh_quantization, GLTFExtensionParser1);
6749
+ var KHR_mesh_quantization = /*#__PURE__*/ function(GLTFExtensionParser) {
6750
+ _inherits(KHR_mesh_quantization, GLTFExtensionParser);
6828
6751
  function KHR_mesh_quantization() {
6829
- return GLTFExtensionParser1.apply(this, arguments);
6752
+ return GLTFExtensionParser.apply(this, arguments) || this;
6830
6753
  }
6831
6754
  return KHR_mesh_quantization;
6832
6755
  }(GLTFExtensionParser);
@@ -6834,10 +6757,10 @@ KHR_mesh_quantization = __decorate([
6834
6757
  registerGLTFExtension("KHR_mesh_quantization", GLTFExtensionMode.AdditiveParse)
6835
6758
  ], KHR_mesh_quantization);
6836
6759
 
6837
- var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser1) {
6838
- _inherits(KHR_texture_basisu, GLTFExtensionParser1);
6760
+ var KHR_texture_basisu = /*#__PURE__*/ function(GLTFExtensionParser) {
6761
+ _inherits(KHR_texture_basisu, GLTFExtensionParser);
6839
6762
  function KHR_texture_basisu() {
6840
- return GLTFExtensionParser1.apply(this, arguments);
6763
+ return GLTFExtensionParser.apply(this, arguments) || this;
6841
6764
  }
6842
6765
  var _proto = KHR_texture_basisu.prototype;
6843
6766
  _proto.createAndParse = function createAndParse(context, schema, textureInfo) {
@@ -6899,10 +6822,10 @@ KHR_texture_basisu = __decorate([
6899
6822
  registerGLTFExtension("KHR_texture_basisu", GLTFExtensionMode.CreateAndParse)
6900
6823
  ], KHR_texture_basisu);
6901
6824
 
6902
- var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser1) {
6903
- _inherits(KHR_texture_transform, GLTFExtensionParser1);
6825
+ var KHR_texture_transform = /*#__PURE__*/ function(GLTFExtensionParser) {
6826
+ _inherits(KHR_texture_transform, GLTFExtensionParser);
6904
6827
  function KHR_texture_transform() {
6905
- return GLTFExtensionParser1.apply(this, arguments);
6828
+ return GLTFExtensionParser.apply(this, arguments) || this;
6906
6829
  }
6907
6830
  var _proto = KHR_texture_transform.prototype;
6908
6831
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -6928,10 +6851,10 @@ KHR_texture_transform = __decorate([
6928
6851
  registerGLTFExtension("KHR_texture_transform", GLTFExtensionMode.AdditiveParse)
6929
6852
  ], KHR_texture_transform);
6930
6853
 
6931
- var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser1) {
6932
- _inherits(GALACEAN_materials_remap, GLTFExtensionParser1);
6854
+ var GALACEAN_materials_remap = /*#__PURE__*/ function(GLTFExtensionParser) {
6855
+ _inherits(GALACEAN_materials_remap, GLTFExtensionParser);
6933
6856
  function GALACEAN_materials_remap() {
6934
- return GLTFExtensionParser1.apply(this, arguments);
6857
+ return GLTFExtensionParser.apply(this, arguments) || this;
6935
6858
  }
6936
6859
  var _proto = GALACEAN_materials_remap.prototype;
6937
6860
  _proto.createAndParse = function createAndParse(context, schema) {
@@ -6947,10 +6870,10 @@ GALACEAN_materials_remap = __decorate([
6947
6870
  registerGLTFExtension("GALACEAN_materials_remap", GLTFExtensionMode.CreateAndParse)
6948
6871
  ], GALACEAN_materials_remap);
6949
6872
 
6950
- var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser1) {
6951
- _inherits(GALACEAN_animation_event, GLTFExtensionParser1);
6873
+ var GALACEAN_animation_event = /*#__PURE__*/ function(GLTFExtensionParser) {
6874
+ _inherits(GALACEAN_animation_event, GLTFExtensionParser);
6952
6875
  function GALACEAN_animation_event() {
6953
- return GLTFExtensionParser1.apply(this, arguments);
6876
+ return GLTFExtensionParser.apply(this, arguments) || this;
6954
6877
  }
6955
6878
  var _proto = GALACEAN_animation_event.prototype;
6956
6879
  _proto.additiveParse = function additiveParse(context, animationClip, schema) {
@@ -6970,10 +6893,10 @@ GALACEAN_animation_event = __decorate([
6970
6893
  registerGLTFExtension("GALACEAN_animation_event", GLTFExtensionMode.AdditiveParse)
6971
6894
  ], GALACEAN_animation_event);
6972
6895
 
6973
- var EXT_meshopt_compression = /*#__PURE__*/ function(GLTFExtensionParser1) {
6974
- _inherits(EXT_meshopt_compression, GLTFExtensionParser1);
6896
+ var EXT_meshopt_compression = /*#__PURE__*/ function(GLTFExtensionParser) {
6897
+ _inherits(EXT_meshopt_compression, GLTFExtensionParser);
6975
6898
  function EXT_meshopt_compression() {
6976
- return GLTFExtensionParser1.apply(this, arguments);
6899
+ return GLTFExtensionParser.apply(this, arguments) || this;
6977
6900
  }
6978
6901
  var _proto = EXT_meshopt_compression.prototype;
6979
6902
  _proto.createAndParse = function createAndParse(context, schema) {
@@ -6989,10 +6912,10 @@ EXT_meshopt_compression = __decorate([
6989
6912
  registerGLTFExtension("EXT_meshopt_compression", GLTFExtensionMode.CreateAndParse)
6990
6913
  ], EXT_meshopt_compression);
6991
6914
 
6992
- var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser1) {
6993
- _inherits(KHR_materials_anisotropy, GLTFExtensionParser1);
6915
+ var KHR_materials_anisotropy = /*#__PURE__*/ function(GLTFExtensionParser) {
6916
+ _inherits(KHR_materials_anisotropy, GLTFExtensionParser);
6994
6917
  function KHR_materials_anisotropy() {
6995
- return GLTFExtensionParser1.apply(this, arguments);
6918
+ return GLTFExtensionParser.apply(this, arguments) || this;
6996
6919
  }
6997
6920
  var _proto = KHR_materials_anisotropy.prototype;
6998
6921
  _proto.additiveParse = function additiveParse(context, material, schema) {
@@ -7012,12 +6935,41 @@ KHR_materials_anisotropy = __decorate([
7012
6935
  registerGLTFExtension("KHR_materials_anisotropy", GLTFExtensionMode.AdditiveParse)
7013
6936
  ], KHR_materials_anisotropy);
7014
6937
 
7015
- var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
7016
- _inherits(EXT_texture_webp, GLTFExtensionParser1);
6938
+ var KHR_materials_iridescence = /*#__PURE__*/ function(GLTFExtensionParser) {
6939
+ _inherits(KHR_materials_iridescence, GLTFExtensionParser);
6940
+ function KHR_materials_iridescence() {
6941
+ return GLTFExtensionParser.apply(this, arguments) || this;
6942
+ }
6943
+ var _proto = KHR_materials_iridescence.prototype;
6944
+ _proto.additiveParse = function additiveParse(context, material, schema) {
6945
+ 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;
6946
+ material.iridescence = iridescenceFactor;
6947
+ material.iridescenceIOR = iridescenceIor;
6948
+ material.iridescenceThicknessRange.set(iridescenceThicknessMinimum, iridescenceThicknessMaximum);
6949
+ if (iridescenceTexture) {
6950
+ GLTFMaterialParser._checkOtherTextureTransform(iridescenceTexture, "Iridescence texture");
6951
+ context.get(GLTFParserType.Texture, iridescenceTexture.index).then(function(texture) {
6952
+ material.iridescenceTexture = texture;
6953
+ });
6954
+ }
6955
+ if (iridescenceThicknessTexture) {
6956
+ GLTFMaterialParser._checkOtherTextureTransform(iridescenceThicknessTexture, "IridescenceThickness texture");
6957
+ context.get(GLTFParserType.Texture, iridescenceThicknessTexture.index).then(function(texture) {
6958
+ material.iridescenceThicknessTexture = texture;
6959
+ });
6960
+ }
6961
+ };
6962
+ return KHR_materials_iridescence;
6963
+ }(GLTFExtensionParser);
6964
+ KHR_materials_iridescence = __decorate([
6965
+ registerGLTFExtension("KHR_materials_iridescence", GLTFExtensionMode.AdditiveParse)
6966
+ ], KHR_materials_iridescence);
6967
+
6968
+ var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser) {
6969
+ _inherits(EXT_texture_webp, GLTFExtensionParser);
7017
6970
  function EXT_texture_webp() {
7018
6971
  var _this;
7019
- _this = GLTFExtensionParser1.call(this) || this;
7020
- _this._supportWebP = false;
6972
+ _this = GLTFExtensionParser.call(this) || this, _this._supportWebP = false;
7021
6973
  // @ts-ignore
7022
6974
  if (SystemInfo._isBrowser) {
7023
6975
  var testCanvas = document.createElement("canvas");