babylonjs-serializers 5.45.2 → 5.46.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.
@@ -381,16 +381,16 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
381
381
  };
382
382
  // do we need to write TRANSLATION ?
383
383
  if (hasAnyInstanceWorldTranslation) {
384
- extension.attributes["TRANSLATION"] = _this._buildAccessor(translationBuffer, "VEC3" /* VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* FLOAT */);
384
+ extension.attributes["TRANSLATION"] = _this._buildAccessor(translationBuffer, "VEC3" /* AccessorType.VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* AccessorComponentType.FLOAT */);
385
385
  }
386
386
  // do we need to write ROTATION ?
387
387
  if (hasAnyInstanceWorldRotation) {
388
- var componentType = 5126 /* FLOAT */; // we decided to stay on FLOAT for now see https://github.com/BabylonJS/Babylon.js/pull/12495
389
- extension.attributes["ROTATION"] = _this._buildAccessor(rotationBuffer, "VEC4" /* VEC4 */, babylonNode.thinInstanceCount, binaryWriter, componentType);
388
+ var componentType = 5126 /* AccessorComponentType.FLOAT */; // we decided to stay on FLOAT for now see https://github.com/BabylonJS/Babylon.js/pull/12495
389
+ extension.attributes["ROTATION"] = _this._buildAccessor(rotationBuffer, "VEC4" /* AccessorType.VEC4 */, babylonNode.thinInstanceCount, binaryWriter, componentType);
390
390
  }
391
391
  // do we need to write SCALE ?
392
392
  if (hasAnyInstanceWorldScale) {
393
- extension.attributes["SCALE"] = _this._buildAccessor(scaleBuffer, "VEC3" /* VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* FLOAT */);
393
+ extension.attributes["SCALE"] = _this._buildAccessor(scaleBuffer, "VEC3" /* AccessorType.VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* AccessorComponentType.FLOAT */);
394
394
  }
395
395
  /* eslint-enable @typescript-eslint/naming-convention*/
396
396
  node.extensions = node.extensions || {};
@@ -404,19 +404,19 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
404
404
  // write the buffer
405
405
  var bufferOffset = binaryWriter.getByteOffset();
406
406
  switch (componentType) {
407
- case 5126 /* FLOAT */: {
407
+ case 5126 /* AccessorComponentType.FLOAT */: {
408
408
  for (var i = 0; i != buffer.length; i++) {
409
409
  binaryWriter.setFloat32(buffer[i]);
410
410
  }
411
411
  break;
412
412
  }
413
- case 5120 /* BYTE */: {
413
+ case 5120 /* AccessorComponentType.BYTE */: {
414
414
  for (var i = 0; i != buffer.length; i++) {
415
415
  binaryWriter.setByte(buffer[i] * 127);
416
416
  }
417
417
  break;
418
418
  }
419
- case 5122 /* SHORT */: {
419
+ case 5122 /* AccessorComponentType.SHORT */: {
420
420
  for (var i = 0; i != buffer.length; i++) {
421
421
  binaryWriter.setInt16(buffer[i] * 32767);
422
422
  }
@@ -434,7 +434,7 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
434
434
  componentType: componentType,
435
435
  count: count,
436
436
  type: type,
437
- normalized: componentType == 5120 /* BYTE */ || componentType == 5122 /* SHORT */,
437
+ normalized: componentType == 5120 /* AccessorComponentType.BYTE */ || componentType == 5122 /* AccessorComponentType.SHORT */,
438
438
  };
439
439
  this._exporter._accessors.push(accessor);
440
440
  return accessorIndex;
@@ -519,11 +519,11 @@ var KHR_lights_punctual = /** @class */ (function () {
519
519
  var babylonLight = babylonNode;
520
520
  var light = void 0;
521
521
  var lightType = babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_POINTLIGHT
522
- ? "point" /* POINT */
522
+ ? "point" /* KHRLightsPunctual_LightType.POINT */
523
523
  : babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_DIRECTIONALLIGHT
524
- ? "directional" /* DIRECTIONAL */
524
+ ? "directional" /* KHRLightsPunctual_LightType.DIRECTIONAL */
525
525
  : babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_SPOTLIGHT
526
- ? "spot" /* SPOT */
526
+ ? "spot" /* KHRLightsPunctual_LightType.SPOT */
527
527
  : null;
528
528
  if (lightType == null) {
529
529
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Logger.Warn("".concat(context, ": Light ").concat(babylonLight.name, " is not supported in ").concat(NAME));
@@ -537,7 +537,7 @@ var KHR_lights_punctual = /** @class */ (function () {
537
537
  }
538
538
  node.translation = lightPosition.asArray();
539
539
  }
540
- if (lightType !== "point" /* POINT */) {
540
+ if (lightType !== "point" /* KHRLightsPunctual_LightType.POINT */) {
541
541
  var localAxis = babylonLight.direction;
542
542
  var yaw = -Math.atan2(localAxis.z * (_this._exporter._babylonScene.useRightHandedSystem ? -1 : 1), localAxis.x) + Math.PI / 2;
543
543
  var len = Math.sqrt(localAxis.x * localAxis.x + localAxis.z * localAxis.z);
@@ -565,7 +565,7 @@ var KHR_lights_punctual = /** @class */ (function () {
565
565
  if (babylonLight.range !== Number.MAX_VALUE) {
566
566
  light.range = babylonLight.range;
567
567
  }
568
- if (lightType === "spot" /* SPOT */) {
568
+ if (lightType === "spot" /* KHRLightsPunctual_LightType.SPOT */) {
569
569
  var babylonSpotLight = babylonLight;
570
570
  if (babylonSpotLight.angle !== Math.PI / 2.0) {
571
571
  if (light.spot == null) {
@@ -1681,10 +1681,10 @@ var _GLTFAnimation = /** @class */ (function () {
1681
1681
  _GLTFAnimation._CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minMaxKeyFrames.min, minMaxKeyFrames.max, animation.framePerSecond, animationSampleRate, inputs, outputs, minMaxKeyFrames, convertToRightHandedSystem, useQuaternion);
1682
1682
  }
1683
1683
  else {
1684
- if (interpolation === "LINEAR" /* LINEAR */ || interpolation === "STEP" /* STEP */) {
1684
+ if (interpolation === "LINEAR" /* AnimationSamplerInterpolation.LINEAR */ || interpolation === "STEP" /* AnimationSamplerInterpolation.STEP */) {
1685
1685
  _GLTFAnimation._CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
1686
1686
  }
1687
- else if (interpolation === "CUBICSPLINE" /* CUBICSPLINE */) {
1687
+ else if (interpolation === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
1688
1688
  _GLTFAnimation._CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
1689
1689
  }
1690
1690
  else {
@@ -1706,32 +1706,32 @@ var _GLTFAnimation = /** @class */ (function () {
1706
1706
  };
1707
1707
  _GLTFAnimation._DeduceAnimationInfo = function (animation) {
1708
1708
  var animationChannelTargetPath = null;
1709
- var dataAccessorType = "VEC3" /* VEC3 */;
1709
+ var dataAccessorType = "VEC3" /* AccessorType.VEC3 */;
1710
1710
  var useQuaternion = false;
1711
1711
  var property = animation.targetProperty.split(".");
1712
1712
  switch (property[0]) {
1713
1713
  case "scaling": {
1714
- animationChannelTargetPath = "scale" /* SCALE */;
1714
+ animationChannelTargetPath = "scale" /* AnimationChannelTargetPath.SCALE */;
1715
1715
  break;
1716
1716
  }
1717
1717
  case "position": {
1718
- animationChannelTargetPath = "translation" /* TRANSLATION */;
1718
+ animationChannelTargetPath = "translation" /* AnimationChannelTargetPath.TRANSLATION */;
1719
1719
  break;
1720
1720
  }
1721
1721
  case "rotation": {
1722
- dataAccessorType = "VEC4" /* VEC4 */;
1723
- animationChannelTargetPath = "rotation" /* ROTATION */;
1722
+ dataAccessorType = "VEC4" /* AccessorType.VEC4 */;
1723
+ animationChannelTargetPath = "rotation" /* AnimationChannelTargetPath.ROTATION */;
1724
1724
  break;
1725
1725
  }
1726
1726
  case "rotationQuaternion": {
1727
- dataAccessorType = "VEC4" /* VEC4 */;
1727
+ dataAccessorType = "VEC4" /* AccessorType.VEC4 */;
1728
1728
  useQuaternion = true;
1729
- animationChannelTargetPath = "rotation" /* ROTATION */;
1729
+ animationChannelTargetPath = "rotation" /* AnimationChannelTargetPath.ROTATION */;
1730
1730
  break;
1731
1731
  }
1732
1732
  case "influence": {
1733
- dataAccessorType = "SCALAR" /* SCALAR */;
1734
- animationChannelTargetPath = "weights" /* WEIGHTS */;
1733
+ dataAccessorType = "SCALAR" /* AccessorType.SCALAR */;
1734
+ animationChannelTargetPath = "weights" /* AnimationChannelTargetPath.WEIGHTS */;
1735
1735
  break;
1736
1736
  }
1737
1737
  default: {
@@ -2007,7 +2007,7 @@ var _GLTFAnimation = /** @class */ (function () {
2007
2007
  animationData.inputs.forEach(function (input) {
2008
2008
  binaryWriter.setFloat32(input);
2009
2009
  });
2010
- accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " keyframes"), "SCALAR" /* SCALAR */, 5126 /* FLOAT */, animationData.inputs.length, null, [animationData.inputsMin], [animationData.inputsMax]);
2010
+ accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " keyframes"), "SCALAR" /* AccessorType.SCALAR */, 5126 /* AccessorComponentType.FLOAT */, animationData.inputs.length, null, [animationData.inputsMin], [animationData.inputsMax]);
2011
2011
  accessors.push(accessor);
2012
2012
  keyframeAccessorIndex = accessors.length - 1;
2013
2013
  // create bufferview and accessor for keyed values.
@@ -2021,7 +2021,7 @@ var _GLTFAnimation = /** @class */ (function () {
2021
2021
  binaryWriter.setFloat32(entry);
2022
2022
  });
2023
2023
  });
2024
- accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " data"), dataAccessorType, 5126 /* FLOAT */, outputLength, null, null, null);
2024
+ accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " data"), dataAccessorType, 5126 /* AccessorComponentType.FLOAT */, outputLength, null, null, null);
2025
2025
  accessors.push(accessor);
2026
2026
  dataAccessorIndex = accessors.length - 1;
2027
2027
  // create sampler
@@ -2129,15 +2129,15 @@ var _GLTFAnimation = /** @class */ (function () {
2129
2129
  var value = useQuaternion ? core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(basePositionRotationOrScale).normalize() : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(basePositionRotationOrScale);
2130
2130
  switch (componentName) {
2131
2131
  case "x": {
2132
- value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2132
+ value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2133
2133
  break;
2134
2134
  }
2135
2135
  case "y": {
2136
- value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2136
+ value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2137
2137
  break;
2138
2138
  }
2139
2139
  case "z": {
2140
- value[componentName] = convertToRightHandedSystem && !useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2140
+ value[componentName] = convertToRightHandedSystem && !useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2141
2141
  break;
2142
2142
  }
2143
2143
  case "w": {
@@ -2153,14 +2153,14 @@ var _GLTFAnimation = /** @class */ (function () {
2153
2153
  _GLTFAnimation._SetInterpolatedValue = function (babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, convertToRightHandedSystem, useQuaternion) {
2154
2154
  var cacheValue;
2155
2155
  inputs.push(time);
2156
- if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2156
+ if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2157
2157
  outputs.push([value]);
2158
2158
  return;
2159
2159
  }
2160
2160
  if (animation.dataType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_FLOAT) {
2161
2161
  value = this._ConvertFactorToVector3OrQuaternion(value, babylonTransformNode, animation, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
2162
2162
  }
2163
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2163
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2164
2164
  if (useQuaternion) {
2165
2165
  quaternionCache = value;
2166
2166
  }
@@ -2179,7 +2179,7 @@ var _GLTFAnimation = /** @class */ (function () {
2179
2179
  else {
2180
2180
  // scaling and position animation
2181
2181
  cacheValue = value;
2182
- if (convertToRightHandedSystem && animationChannelTargetPath !== "scale" /* SCALE */) {
2182
+ if (convertToRightHandedSystem && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */) {
2183
2183
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedPositionVector3FromRef(cacheValue);
2184
2184
  if (!babylonTransformNode.parent) {
2185
2185
  cacheValue.x *= -1;
@@ -2221,14 +2221,14 @@ var _GLTFAnimation = /** @class */ (function () {
2221
2221
  _GLTFAnimation._CreateCubicSplineAnimation = function (babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion) {
2222
2222
  animation.getKeys().forEach(function (keyFrame) {
2223
2223
  inputs.push(keyFrame.frame / animation.framePerSecond); // keyframes in seconds.
2224
- _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.INTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2224
+ _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.INTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2225
2225
  _GLTFAnimation._AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
2226
- _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.OUTTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2226
+ _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.OUTTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2227
2227
  });
2228
2228
  };
2229
2229
  _GLTFAnimation._GetBasePositionRotationOrScale = function (babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion) {
2230
2230
  var basePositionRotationOrScale;
2231
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2231
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2232
2232
  if (useQuaternion) {
2233
2233
  var q = babylonTransformNode.rotationQuaternion;
2234
2234
  basePositionRotationOrScale = (q !== null && q !== void 0 ? q : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Identity()).asArray();
@@ -2245,7 +2245,7 @@ var _GLTFAnimation = /** @class */ (function () {
2245
2245
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalArray3FromRef(basePositionRotationOrScale);
2246
2246
  }
2247
2247
  }
2248
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2248
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2249
2249
  var p = babylonTransformNode.position;
2250
2250
  basePositionRotationOrScale = (p !== null && p !== void 0 ? p : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()).asArray();
2251
2251
  if (convertToRightHandedSystem) {
@@ -2275,7 +2275,7 @@ var _GLTFAnimation = /** @class */ (function () {
2275
2275
  var animationType = animation.dataType;
2276
2276
  if (animationType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_VECTOR3) {
2277
2277
  value = keyFrame.value.asArray();
2278
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2278
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2279
2279
  var array = core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(value);
2280
2280
  var rotationQuaternion = core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.RotationYawPitchRoll(array.y, array.x, array.z);
2281
2281
  if (convertToRightHandedSystem) {
@@ -2286,7 +2286,7 @@ var _GLTFAnimation = /** @class */ (function () {
2286
2286
  }
2287
2287
  value = rotationQuaternion.asArray();
2288
2288
  }
2289
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2289
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2290
2290
  if (convertToRightHandedSystem) {
2291
2291
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalArray3FromRef(value);
2292
2292
  if (!babylonTransformNode.parent) {
@@ -2298,14 +2298,14 @@ var _GLTFAnimation = /** @class */ (function () {
2298
2298
  outputs.push(value); // scale vector.
2299
2299
  }
2300
2300
  else if (animationType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_FLOAT) {
2301
- if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2301
+ if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2302
2302
  outputs.push([keyFrame.value]);
2303
2303
  }
2304
2304
  else {
2305
2305
  // handles single component x, y, z or w component animation by using a base property and animating over a component.
2306
2306
  newPositionRotationOrScale = this._ConvertFactorToVector3OrQuaternion(keyFrame.value, babylonTransformNode, animation, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
2307
2307
  if (newPositionRotationOrScale) {
2308
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2308
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2309
2309
  var posRotScale = useQuaternion
2310
2310
  ? newPositionRotationOrScale
2311
2311
  : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.RotationYawPitchRoll(newPositionRotationOrScale.y, newPositionRotationOrScale.x, newPositionRotationOrScale.z).normalize();
@@ -2317,7 +2317,7 @@ var _GLTFAnimation = /** @class */ (function () {
2317
2317
  }
2318
2318
  outputs.push(posRotScale.asArray());
2319
2319
  }
2320
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2320
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2321
2321
  if (convertToRightHandedSystem) {
2322
2322
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalVector3FromRef(newPositionRotationOrScale);
2323
2323
  if (!babylonTransformNode.parent) {
@@ -2354,44 +2354,44 @@ var _GLTFAnimation = /** @class */ (function () {
2354
2354
  var interpolationType;
2355
2355
  var shouldBakeAnimation = false;
2356
2356
  var key;
2357
- if (animationChannelTargetPath === "rotation" /* ROTATION */ && !useQuaternion) {
2358
- return { interpolationType: "LINEAR" /* LINEAR */, shouldBakeAnimation: true };
2357
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */ && !useQuaternion) {
2358
+ return { interpolationType: "LINEAR" /* AnimationSamplerInterpolation.LINEAR */, shouldBakeAnimation: true };
2359
2359
  }
2360
2360
  for (var i = 0, length_2 = keyFrames.length; i < length_2; ++i) {
2361
2361
  key = keyFrames[i];
2362
2362
  if (key.inTangent || key.outTangent) {
2363
2363
  if (interpolationType) {
2364
- if (interpolationType !== "CUBICSPLINE" /* CUBICSPLINE */) {
2365
- interpolationType = "LINEAR" /* LINEAR */;
2364
+ if (interpolationType !== "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
2365
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2366
2366
  shouldBakeAnimation = true;
2367
2367
  break;
2368
2368
  }
2369
2369
  }
2370
2370
  else {
2371
- interpolationType = "CUBICSPLINE" /* CUBICSPLINE */;
2371
+ interpolationType = "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */;
2372
2372
  }
2373
2373
  }
2374
2374
  else {
2375
2375
  if (interpolationType) {
2376
- if (interpolationType === "CUBICSPLINE" /* CUBICSPLINE */ ||
2377
- (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP && interpolationType !== "STEP" /* STEP */)) {
2378
- interpolationType = "LINEAR" /* LINEAR */;
2376
+ if (interpolationType === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */ ||
2377
+ (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP && interpolationType !== "STEP" /* AnimationSamplerInterpolation.STEP */)) {
2378
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2379
2379
  shouldBakeAnimation = true;
2380
2380
  break;
2381
2381
  }
2382
2382
  }
2383
2383
  else {
2384
2384
  if (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP) {
2385
- interpolationType = "STEP" /* STEP */;
2385
+ interpolationType = "STEP" /* AnimationSamplerInterpolation.STEP */;
2386
2386
  }
2387
2387
  else {
2388
- interpolationType = "LINEAR" /* LINEAR */;
2388
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2389
2389
  }
2390
2390
  }
2391
2391
  }
2392
2392
  }
2393
2393
  if (!interpolationType) {
2394
- interpolationType = "LINEAR" /* LINEAR */;
2394
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2395
2395
  }
2396
2396
  return { interpolationType: interpolationType, shouldBakeAnimation: shouldBakeAnimation };
2397
2397
  };
@@ -2411,8 +2411,8 @@ var _GLTFAnimation = /** @class */ (function () {
2411
2411
  _GLTFAnimation._AddSplineTangent = function (babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem) {
2412
2412
  var tangent;
2413
2413
  var tangentValue = tangentType === _TangentType.INTANGENT ? keyFrame.inTangent : keyFrame.outTangent;
2414
- if (interpolation === "CUBICSPLINE" /* CUBICSPLINE */) {
2415
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2414
+ if (interpolation === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
2415
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2416
2416
  if (tangentValue) {
2417
2417
  if (useQuaternion) {
2418
2418
  tangent = tangentValue.asArray();
@@ -2432,7 +2432,7 @@ var _GLTFAnimation = /** @class */ (function () {
2432
2432
  tangent = [0, 0, 0, 0];
2433
2433
  }
2434
2434
  }
2435
- else if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2435
+ else if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2436
2436
  if (tangentValue) {
2437
2437
  tangent = [tangentValue];
2438
2438
  }
@@ -2444,7 +2444,7 @@ var _GLTFAnimation = /** @class */ (function () {
2444
2444
  if (tangentValue) {
2445
2445
  tangent = tangentValue.asArray();
2446
2446
  if (convertToRightHandedSystem) {
2447
- if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2447
+ if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2448
2448
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedPositionArray3FromRef(tangent);
2449
2449
  if (!babylonTransformNode.parent) {
2450
2450
  tangent[0] *= -1; // x
@@ -2531,10 +2531,10 @@ var GLTFData = /** @class */ (function () {
2531
2531
  mimeType = { type: "model/gltf+json" };
2532
2532
  }
2533
2533
  else if (endsWith(key, ".jpeg") || endsWith(key, ".jpg")) {
2534
- mimeType = { type: "image/jpeg" /* JPEG */ };
2534
+ mimeType = { type: "image/jpeg" /* ImageMimeType.JPEG */ };
2535
2535
  }
2536
2536
  else if (endsWith(key, ".png")) {
2537
- mimeType = { type: "image/png" /* PNG */ };
2537
+ mimeType = { type: "image/png" /* ImageMimeType.PNG */ };
2538
2538
  }
2539
2539
  link.href = window.URL.createObjectURL(new Blob([blob], mimeType));
2540
2540
  link.click();
@@ -3179,19 +3179,19 @@ var _Exporter = /** @class */ (function () {
3179
3179
  }
3180
3180
  var writeBinaryFunc;
3181
3181
  switch (attributeComponentKind) {
3182
- case 5121 /* UNSIGNED_BYTE */: {
3182
+ case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {
3183
3183
  writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);
3184
3184
  break;
3185
3185
  }
3186
- case 5123 /* UNSIGNED_SHORT */: {
3186
+ case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {
3187
3187
  writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);
3188
3188
  break;
3189
3189
  }
3190
- case 5125 /* UNSIGNED_INT */: {
3190
+ case 5125 /* AccessorComponentType.UNSIGNED_INT */: {
3191
3191
  writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);
3192
3192
  break;
3193
3193
  }
3194
- case 5126 /* FLOAT */: {
3194
+ case 5126 /* AccessorComponentType.FLOAT */: {
3195
3195
  writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);
3196
3196
  break;
3197
3197
  }
@@ -3282,19 +3282,19 @@ var _Exporter = /** @class */ (function () {
3282
3282
  }
3283
3283
  var writeBinaryFunc;
3284
3284
  switch (attributeComponentKind) {
3285
- case 5121 /* UNSIGNED_BYTE */: {
3285
+ case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {
3286
3286
  writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);
3287
3287
  break;
3288
3288
  }
3289
- case 5123 /* UNSIGNED_SHORT */: {
3289
+ case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {
3290
3290
  writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);
3291
3291
  break;
3292
3292
  }
3293
- case 5125 /* UNSIGNED_INT */: {
3293
+ case 5125 /* AccessorComponentType.UNSIGNED_INT */: {
3294
3294
  writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);
3295
3295
  break;
3296
3296
  }
3297
- case 5126 /* FLOAT */: {
3297
+ case 5126 /* AccessorComponentType.FLOAT */: {
3298
3298
  writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);
3299
3299
  break;
3300
3300
  }
@@ -3647,10 +3647,10 @@ var _Exporter = /** @class */ (function () {
3647
3647
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + "_NORMAL");
3648
3648
  this._bufferViews.push(bufferView);
3649
3649
  var bufferViewIndex = this._bufferViews.length - 1;
3650
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "NORMAL", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3650
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "NORMAL", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3651
3651
  this._accessors.push(accessor);
3652
3652
  target.NORMAL = this._accessors.length - 1;
3653
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexNormals, morphNormals, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3653
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexNormals, morphNormals, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3654
3654
  }
3655
3655
  if (babylonMorphTarget.hasPositions) {
3656
3656
  var vertexPositions = babylonSubMesh.getMesh().getVerticesData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind);
@@ -3662,10 +3662,10 @@ var _Exporter = /** @class */ (function () {
3662
3662
  this._bufferViews.push(bufferView);
3663
3663
  var bufferViewIndex = this._bufferViews.length - 1;
3664
3664
  var minMax = { min: new core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3(Infinity, Infinity, Infinity), max: new core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3(-Infinity, -Infinity, -Infinity) };
3665
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "POSITION", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3665
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "POSITION", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3666
3666
  this._accessors.push(accessor);
3667
3667
  target.POSITION = this._accessors.length - 1;
3668
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexPositions, morphPositions, byteStride / 4, binaryWriter, convertToRightHandedSystem, minMax);
3668
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexPositions, morphPositions, byteStride / 4, binaryWriter, convertToRightHandedSystem, minMax);
3669
3669
  accessor.min = minMax.min.asArray();
3670
3670
  accessor.max = minMax.max.asArray();
3671
3671
  }
@@ -3678,10 +3678,10 @@ var _Exporter = /** @class */ (function () {
3678
3678
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + "_NORMAL");
3679
3679
  this._bufferViews.push(bufferView);
3680
3680
  var bufferViewIndex = this._bufferViews.length - 1;
3681
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "TANGENT", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3681
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "TANGENT", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3682
3682
  this._accessors.push(accessor);
3683
3683
  target.TANGENT = this._accessors.length - 1;
3684
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexTangents, morphTangents, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3684
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexTangents, morphTangents, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3685
3685
  }
3686
3686
  meshPrimitive.targets.push(target);
3687
3687
  }
@@ -3708,31 +3708,31 @@ var _Exporter = /** @class */ (function () {
3708
3708
  break;
3709
3709
  }
3710
3710
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.TriangleStripDrawMode: {
3711
- meshPrimitive.mode = 5 /* TRIANGLE_STRIP */;
3711
+ meshPrimitive.mode = 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */;
3712
3712
  break;
3713
3713
  }
3714
3714
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.TriangleFanDrawMode: {
3715
- meshPrimitive.mode = 6 /* TRIANGLE_FAN */;
3715
+ meshPrimitive.mode = 6 /* MeshPrimitiveMode.TRIANGLE_FAN */;
3716
3716
  break;
3717
3717
  }
3718
3718
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.PointListDrawMode: {
3719
- meshPrimitive.mode = 0 /* POINTS */;
3719
+ meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;
3720
3720
  break;
3721
3721
  }
3722
3722
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.PointFillMode: {
3723
- meshPrimitive.mode = 0 /* POINTS */;
3723
+ meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;
3724
3724
  break;
3725
3725
  }
3726
3726
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineLoopDrawMode: {
3727
- meshPrimitive.mode = 2 /* LINE_LOOP */;
3727
+ meshPrimitive.mode = 2 /* MeshPrimitiveMode.LINE_LOOP */;
3728
3728
  break;
3729
3729
  }
3730
3730
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineListDrawMode: {
3731
- meshPrimitive.mode = 1 /* LINES */;
3731
+ meshPrimitive.mode = 1 /* MeshPrimitiveMode.LINES */;
3732
3732
  break;
3733
3733
  }
3734
3734
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineStripDrawMode: {
3735
- meshPrimitive.mode = 3 /* LINE_STRIP */;
3735
+ meshPrimitive.mode = 3 /* MeshPrimitiveMode.LINE_STRIP */;
3736
3736
  break;
3737
3737
  }
3738
3738
  }
@@ -3810,16 +3810,16 @@ var _Exporter = /** @class */ (function () {
3810
3810
  bufferMesh = babylonTransformNode.sourceMesh;
3811
3811
  }
3812
3812
  var attributeData = [
3813
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, accessorType: "VEC3" /* VEC3 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 12 },
3814
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, accessorType: "VEC3" /* VEC3 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 12 },
3815
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.ColorKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
3816
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
3817
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UVKind, accessorType: "VEC2" /* VEC2 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 8 },
3818
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UV2Kind, accessorType: "VEC2" /* VEC2 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 8 },
3819
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5123 /* UNSIGNED_SHORT */, byteStride: 8 },
3820
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesExtraKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5123 /* UNSIGNED_SHORT */, byteStride: 8 },
3821
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
3822
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsExtraKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
3813
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, accessorType: "VEC3" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },
3814
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, accessorType: "VEC3" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },
3815
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.ColorKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
3816
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
3817
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UVKind, accessorType: "VEC2" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },
3818
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UV2Kind, accessorType: "VEC2" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },
3819
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },
3820
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesExtraKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },
3821
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
3822
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsExtraKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
3823
3823
  ];
3824
3824
  if (bufferMesh) {
3825
3825
  var indexBufferViewIndex = null;
@@ -3837,7 +3837,7 @@ var _Exporter = /** @class */ (function () {
3837
3837
  ? vertexBuffer.getSize() * core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.GetTypeByteLength(attribute.accessorComponentType)
3838
3838
  : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.DeduceStride(attributeKind) * 4;
3839
3839
  if (attribute.byteStride === 12) {
3840
- attribute.accessorType = "VEC3" /* VEC3 */;
3840
+ attribute.accessorType = "VEC3" /* AccessorType.VEC3 */;
3841
3841
  }
3842
3842
  this._createBufferViewKind(attributeKind, attributeComponentKind, babylonTransformNode, binaryWriter, attribute.byteStride, convertToRightHandedSystem);
3843
3843
  attribute.bufferViewIndex = this._bufferViews.length - 1;
@@ -3919,7 +3919,7 @@ var _Exporter = /** @class */ (function () {
3919
3919
  }
3920
3920
  if (indexBufferViewIndex) {
3921
3921
  // Create accessor
3922
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(indexBufferViewIndex, "indices - " + babylonTransformNode.name, "SCALAR" /* SCALAR */, 5125 /* UNSIGNED_INT */, submesh.indexCount, submesh.indexStart * 4, null, null);
3922
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(indexBufferViewIndex, "indices - " + babylonTransformNode.name, "SCALAR" /* AccessorType.SCALAR */, 5125 /* AccessorComponentType.UNSIGNED_INT */, submesh.indexCount, submesh.indexStart * 4, null, null);
3923
3923
  this._accessors.push(accessor);
3924
3924
  meshPrimitive.indices = this._accessors.length - 1;
3925
3925
  }
@@ -4049,12 +4049,12 @@ var _Exporter = /** @class */ (function () {
4049
4049
  babylonScene.cameras.forEach(function (camera) {
4050
4050
  if (!_this._options.shouldExportNode || _this._options.shouldExportNode(camera)) {
4051
4051
  var glTFCamera = {
4052
- type: camera.mode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.PERSPECTIVE_CAMERA ? "perspective" /* PERSPECTIVE */ : "orthographic" /* ORTHOGRAPHIC */,
4052
+ type: camera.mode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.PERSPECTIVE_CAMERA ? "perspective" /* CameraType.PERSPECTIVE */ : "orthographic" /* CameraType.ORTHOGRAPHIC */,
4053
4053
  };
4054
4054
  if (camera.name) {
4055
4055
  glTFCamera.name = camera.name;
4056
4056
  }
4057
- if (glTFCamera.type === "perspective" /* PERSPECTIVE */) {
4057
+ if (glTFCamera.type === "perspective" /* CameraType.PERSPECTIVE */) {
4058
4058
  glTFCamera.perspective = {
4059
4059
  aspectRatio: camera.getEngine().getAspectRatio(camera),
4060
4060
  yfov: camera.fovMode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.FOVMODE_VERTICAL_FIXED ? camera.fov : camera.fov * camera.getEngine().getAspectRatio(camera),
@@ -4062,7 +4062,7 @@ var _Exporter = /** @class */ (function () {
4062
4062
  zfar: camera.maxZ,
4063
4063
  };
4064
4064
  }
4065
- else if (glTFCamera.type === "orthographic" /* ORTHOGRAPHIC */) {
4065
+ else if (glTFCamera.type === "orthographic" /* CameraType.ORTHOGRAPHIC */) {
4066
4066
  var halfWidth = camera.orthoLeft && camera.orthoRight ? 0.5 * (camera.orthoRight - camera.orthoLeft) : camera.getEngine().getRenderWidth() * 0.5;
4067
4067
  var halfHeight = camera.orthoBottom && camera.orthoTop ? 0.5 * (camera.orthoTop - camera.orthoBottom) : camera.getEngine().getRenderHeight() * 0.5;
4068
4068
  glTFCamera.orthographic = {
@@ -4077,7 +4077,7 @@ var _Exporter = /** @class */ (function () {
4077
4077
  }
4078
4078
  });
4079
4079
  var _a = this._getExportNodes(nodes), exportNodes = _a[0], exportMaterials = _a[1];
4080
- return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(exportMaterials, "image/png" /* PNG */, true).then(function () {
4080
+ return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(exportMaterials, "image/png" /* ImageMimeType.PNG */, true).then(function () {
4081
4081
  return _this._createNodeMapAndAnimationsAsync(babylonScene, exportNodes, binaryWriter).then(function (nodeMap) {
4082
4082
  return _this._createSkinsAsync(babylonScene, nodeMap, binaryWriter).then(function (skinMap) {
4083
4083
  _this._nodeMap = nodeMap;
@@ -4343,7 +4343,7 @@ var _Exporter = /** @class */ (function () {
4343
4343
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, bufferViewOffset, byteLength, undefined, "InverseBindMatrices" + " - " + skeleton.name);
4344
4344
  this._bufferViews.push(bufferView);
4345
4345
  var bufferViewIndex = this._bufferViews.length - 1;
4346
- var bindMatrixAccessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, "InverseBindMatrices" + " - " + skeleton.name, "MAT4" /* MAT4 */, 5126 /* FLOAT */, inverseBindMatrices.length, null, null, null);
4346
+ var bindMatrixAccessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, "InverseBindMatrices" + " - " + skeleton.name, "MAT4" /* AccessorType.MAT4 */, 5126 /* AccessorComponentType.FLOAT */, inverseBindMatrices.length, null, null, null);
4347
4347
  var inverseBindAccessorIndex = this._accessors.push(bindMatrixAccessor) - 1;
4348
4348
  skin.inverseBindMatrices = inverseBindAccessorIndex;
4349
4349
  this._skins.push(skin);
@@ -4646,11 +4646,11 @@ __webpack_require__.r(__webpack_exports__);
4646
4646
 
4647
4647
  function getFileExtensionFromMimeType(mimeType) {
4648
4648
  switch (mimeType) {
4649
- case "image/jpeg" /* JPEG */:
4649
+ case "image/jpeg" /* ImageMimeType.JPEG */:
4650
4650
  return ".jpg";
4651
- case "image/png" /* PNG */:
4651
+ case "image/png" /* ImageMimeType.PNG */:
4652
4652
  return ".png";
4653
- case "image/webp" /* WEBP */:
4653
+ case "image/webp" /* ImageMimeType.WEBP */:
4654
4654
  return ".webp";
4655
4655
  }
4656
4656
  }
@@ -4833,10 +4833,10 @@ var _GLTFMaterialExporter = /** @class */ (function () {
4833
4833
  */
4834
4834
  _GLTFMaterialExporter._SetAlphaMode = function (glTFMaterial, babylonMaterial) {
4835
4835
  if (babylonMaterial.needAlphaBlending()) {
4836
- glTFMaterial.alphaMode = "BLEND" /* BLEND */;
4836
+ glTFMaterial.alphaMode = "BLEND" /* MaterialAlphaMode.BLEND */;
4837
4837
  }
4838
4838
  else if (babylonMaterial.needAlphaTesting()) {
4839
- glTFMaterial.alphaMode = "MASK" /* MASK */;
4839
+ glTFMaterial.alphaMode = "MASK" /* MaterialAlphaMode.MASK */;
4840
4840
  glTFMaterial.alphaCutoff = babylonMaterial.alphaCutOff;
4841
4841
  }
4842
4842
  };
@@ -4898,7 +4898,7 @@ var _GLTFMaterialExporter = /** @class */ (function () {
4898
4898
  }
4899
4899
  if (babylonStandardMaterial.alpha < 1.0 || babylonStandardMaterial.opacityTexture) {
4900
4900
  if (babylonStandardMaterial.alphaMode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Constants.ALPHA_COMBINE) {
4901
- material.alphaMode = "BLEND" /* BLEND */;
4901
+ material.alphaMode = "BLEND" /* MaterialAlphaMode.BLEND */;
4902
4902
  }
4903
4903
  else {
4904
4904
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Tools.Warn(babylonStandardMaterial.name + ": glTF 2.0 does not support alpha mode: " + babylonStandardMaterial.alphaMode.toString());
@@ -5265,72 +5265,72 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5265
5265
  return sampler;
5266
5266
  }
5267
5267
  var wrapS = this._getGLTFTextureWrapMode(texture.wrapU);
5268
- if (wrapS !== 10497 /* REPEAT */) {
5268
+ if (wrapS !== 10497 /* TextureWrapMode.REPEAT */) {
5269
5269
  sampler.wrapS = wrapS;
5270
5270
  }
5271
5271
  var wrapT = this._getGLTFTextureWrapMode(texture.wrapV);
5272
- if (wrapT !== 10497 /* REPEAT */) {
5272
+ if (wrapT !== 10497 /* TextureWrapMode.REPEAT */) {
5273
5273
  sampler.wrapT = wrapT;
5274
5274
  }
5275
5275
  switch (texture.samplingMode) {
5276
5276
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR: {
5277
- sampler.magFilter = 9729 /* LINEAR */;
5278
- sampler.minFilter = 9729 /* LINEAR */;
5277
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5278
+ sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;
5279
5279
  break;
5280
5280
  }
5281
5281
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST: {
5282
- sampler.magFilter = 9729 /* LINEAR */;
5283
- sampler.minFilter = 9728 /* NEAREST */;
5282
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5283
+ sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;
5284
5284
  break;
5285
5285
  }
5286
5286
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR: {
5287
- sampler.magFilter = 9728 /* NEAREST */;
5288
- sampler.minFilter = 9729 /* LINEAR */;
5287
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5288
+ sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;
5289
5289
  break;
5290
5290
  }
5291
5291
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR_MIPLINEAR: {
5292
- sampler.magFilter = 9728 /* NEAREST */;
5293
- sampler.minFilter = 9987 /* LINEAR_MIPMAP_LINEAR */;
5292
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5293
+ sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;
5294
5294
  break;
5295
5295
  }
5296
5296
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST: {
5297
- sampler.magFilter = 9728 /* NEAREST */;
5298
- sampler.minFilter = 9728 /* NEAREST */;
5297
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5298
+ sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;
5299
5299
  break;
5300
5300
  }
5301
5301
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR_MIPNEAREST: {
5302
- sampler.magFilter = 9728 /* NEAREST */;
5303
- sampler.minFilter = 9985 /* LINEAR_MIPMAP_NEAREST */;
5302
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5303
+ sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;
5304
5304
  break;
5305
5305
  }
5306
5306
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST_MIPNEAREST: {
5307
- sampler.magFilter = 9729 /* LINEAR */;
5308
- sampler.minFilter = 9984 /* NEAREST_MIPMAP_NEAREST */;
5307
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5308
+ sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;
5309
5309
  break;
5310
5310
  }
5311
5311
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST_MIPLINEAR: {
5312
- sampler.magFilter = 9729 /* LINEAR */;
5313
- sampler.minFilter = 9986 /* NEAREST_MIPMAP_LINEAR */;
5312
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5313
+ sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;
5314
5314
  break;
5315
5315
  }
5316
5316
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST_MIPLINEAR: {
5317
- sampler.magFilter = 9728 /* NEAREST */;
5318
- sampler.minFilter = 9986 /* NEAREST_MIPMAP_LINEAR */;
5317
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5318
+ sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;
5319
5319
  break;
5320
5320
  }
5321
5321
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR_MIPLINEAR: {
5322
- sampler.magFilter = 9729 /* LINEAR */;
5323
- sampler.minFilter = 9987 /* LINEAR_MIPMAP_LINEAR */;
5322
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5323
+ sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;
5324
5324
  break;
5325
5325
  }
5326
5326
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR_MIPNEAREST: {
5327
- sampler.magFilter = 9729 /* LINEAR */;
5328
- sampler.minFilter = 9985 /* LINEAR_MIPMAP_NEAREST */;
5327
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5328
+ sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;
5329
5329
  break;
5330
5330
  }
5331
5331
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST_MIPNEAREST: {
5332
- sampler.magFilter = 9728 /* NEAREST */;
5333
- sampler.minFilter = 9984 /* NEAREST_MIPMAP_NEAREST */;
5332
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5333
+ sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;
5334
5334
  break;
5335
5335
  }
5336
5336
  }
@@ -5339,17 +5339,17 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5339
5339
  _GLTFMaterialExporter.prototype._getGLTFTextureWrapMode = function (wrapMode) {
5340
5340
  switch (wrapMode) {
5341
5341
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.WRAP_ADDRESSMODE: {
5342
- return 10497 /* REPEAT */;
5342
+ return 10497 /* TextureWrapMode.REPEAT */;
5343
5343
  }
5344
5344
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE: {
5345
- return 33071 /* CLAMP_TO_EDGE */;
5345
+ return 33071 /* TextureWrapMode.CLAMP_TO_EDGE */;
5346
5346
  }
5347
5347
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.MIRROR_ADDRESSMODE: {
5348
- return 33648 /* MIRRORED_REPEAT */;
5348
+ return 33648 /* TextureWrapMode.MIRRORED_REPEAT */;
5349
5349
  }
5350
5350
  default: {
5351
5351
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Tools.Error("Unsupported Texture Wrap Mode ".concat(wrapMode, "!"));
5352
- return 10497 /* REPEAT */;
5352
+ return 10497 /* TextureWrapMode.REPEAT */;
5353
5353
  }
5354
5354
  }
5355
5355
  };
@@ -5912,19 +5912,19 @@ var _GLTFUtilities = /** @class */ (function () {
5912
5912
  };
5913
5913
  _GLTFUtilities._GetDataAccessorElementCount = function (accessorType) {
5914
5914
  switch (accessorType) {
5915
- case "MAT2" /* MAT2 */:
5915
+ case "MAT2" /* AccessorType.MAT2 */:
5916
5916
  return 4;
5917
- case "MAT3" /* MAT3 */:
5917
+ case "MAT3" /* AccessorType.MAT3 */:
5918
5918
  return 9;
5919
- case "MAT4" /* MAT4 */:
5919
+ case "MAT4" /* AccessorType.MAT4 */:
5920
5920
  return 16;
5921
- case "SCALAR" /* SCALAR */:
5921
+ case "SCALAR" /* AccessorType.SCALAR */:
5922
5922
  return 1;
5923
- case "VEC2" /* VEC2 */:
5923
+ case "VEC2" /* AccessorType.VEC2 */:
5924
5924
  return 2;
5925
- case "VEC3" /* VEC3 */:
5925
+ case "VEC3" /* AccessorType.VEC3 */:
5926
5926
  return 3;
5927
- case "VEC4" /* VEC4 */:
5927
+ case "VEC4" /* AccessorType.VEC4 */:
5928
5928
  return 4;
5929
5929
  }
5930
5930
  };