babylonjs-serializers 5.45.2 → 5.47.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.
@@ -587,16 +587,16 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
587
587
  };
588
588
  // do we need to write TRANSLATION ?
589
589
  if (hasAnyInstanceWorldTranslation) {
590
- extension.attributes["TRANSLATION"] = _this._buildAccessor(translationBuffer, "VEC3" /* VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* FLOAT */);
590
+ extension.attributes["TRANSLATION"] = _this._buildAccessor(translationBuffer, "VEC3" /* AccessorType.VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* AccessorComponentType.FLOAT */);
591
591
  }
592
592
  // do we need to write ROTATION ?
593
593
  if (hasAnyInstanceWorldRotation) {
594
- var componentType = 5126 /* FLOAT */; // we decided to stay on FLOAT for now see https://github.com/BabylonJS/Babylon.js/pull/12495
595
- extension.attributes["ROTATION"] = _this._buildAccessor(rotationBuffer, "VEC4" /* VEC4 */, babylonNode.thinInstanceCount, binaryWriter, componentType);
594
+ var componentType = 5126 /* AccessorComponentType.FLOAT */; // we decided to stay on FLOAT for now see https://github.com/BabylonJS/Babylon.js/pull/12495
595
+ extension.attributes["ROTATION"] = _this._buildAccessor(rotationBuffer, "VEC4" /* AccessorType.VEC4 */, babylonNode.thinInstanceCount, binaryWriter, componentType);
596
596
  }
597
597
  // do we need to write SCALE ?
598
598
  if (hasAnyInstanceWorldScale) {
599
- extension.attributes["SCALE"] = _this._buildAccessor(scaleBuffer, "VEC3" /* VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* FLOAT */);
599
+ extension.attributes["SCALE"] = _this._buildAccessor(scaleBuffer, "VEC3" /* AccessorType.VEC3 */, babylonNode.thinInstanceCount, binaryWriter, 5126 /* AccessorComponentType.FLOAT */);
600
600
  }
601
601
  /* eslint-enable @typescript-eslint/naming-convention*/
602
602
  node.extensions = node.extensions || {};
@@ -610,19 +610,19 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
610
610
  // write the buffer
611
611
  var bufferOffset = binaryWriter.getByteOffset();
612
612
  switch (componentType) {
613
- case 5126 /* FLOAT */: {
613
+ case 5126 /* AccessorComponentType.FLOAT */: {
614
614
  for (var i = 0; i != buffer.length; i++) {
615
615
  binaryWriter.setFloat32(buffer[i]);
616
616
  }
617
617
  break;
618
618
  }
619
- case 5120 /* BYTE */: {
619
+ case 5120 /* AccessorComponentType.BYTE */: {
620
620
  for (var i = 0; i != buffer.length; i++) {
621
621
  binaryWriter.setByte(buffer[i] * 127);
622
622
  }
623
623
  break;
624
624
  }
625
- case 5122 /* SHORT */: {
625
+ case 5122 /* AccessorComponentType.SHORT */: {
626
626
  for (var i = 0; i != buffer.length; i++) {
627
627
  binaryWriter.setInt16(buffer[i] * 32767);
628
628
  }
@@ -640,7 +640,7 @@ var EXT_mesh_gpu_instancing = /** @class */ (function () {
640
640
  componentType: componentType,
641
641
  count: count,
642
642
  type: type,
643
- normalized: componentType == 5120 /* BYTE */ || componentType == 5122 /* SHORT */,
643
+ normalized: componentType == 5120 /* AccessorComponentType.BYTE */ || componentType == 5122 /* AccessorComponentType.SHORT */,
644
644
  };
645
645
  this._exporter._accessors.push(accessor);
646
646
  return accessorIndex;
@@ -725,11 +725,11 @@ var KHR_lights_punctual = /** @class */ (function () {
725
725
  var babylonLight = babylonNode;
726
726
  var light = void 0;
727
727
  var lightType = babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_POINTLIGHT
728
- ? "point" /* POINT */
728
+ ? "point" /* KHRLightsPunctual_LightType.POINT */
729
729
  : babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_DIRECTIONALLIGHT
730
- ? "directional" /* DIRECTIONAL */
730
+ ? "directional" /* KHRLightsPunctual_LightType.DIRECTIONAL */
731
731
  : babylonLight.getTypeID() == core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Light.LIGHTTYPEID_SPOTLIGHT
732
- ? "spot" /* SPOT */
732
+ ? "spot" /* KHRLightsPunctual_LightType.SPOT */
733
733
  : null;
734
734
  if (lightType == null) {
735
735
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Logger.Warn("".concat(context, ": Light ").concat(babylonLight.name, " is not supported in ").concat(NAME));
@@ -743,7 +743,7 @@ var KHR_lights_punctual = /** @class */ (function () {
743
743
  }
744
744
  node.translation = lightPosition.asArray();
745
745
  }
746
- if (lightType !== "point" /* POINT */) {
746
+ if (lightType !== "point" /* KHRLightsPunctual_LightType.POINT */) {
747
747
  var localAxis = babylonLight.direction;
748
748
  var yaw = -Math.atan2(localAxis.z * (_this._exporter._babylonScene.useRightHandedSystem ? -1 : 1), localAxis.x) + Math.PI / 2;
749
749
  var len = Math.sqrt(localAxis.x * localAxis.x + localAxis.z * localAxis.z);
@@ -771,7 +771,7 @@ var KHR_lights_punctual = /** @class */ (function () {
771
771
  if (babylonLight.range !== Number.MAX_VALUE) {
772
772
  light.range = babylonLight.range;
773
773
  }
774
- if (lightType === "spot" /* SPOT */) {
774
+ if (lightType === "spot" /* KHRLightsPunctual_LightType.SPOT */) {
775
775
  var babylonSpotLight = babylonLight;
776
776
  if (babylonSpotLight.angle !== Math.PI / 2.0) {
777
777
  if (light.spot == null) {
@@ -1887,10 +1887,10 @@ var _GLTFAnimation = /** @class */ (function () {
1887
1887
  _GLTFAnimation._CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minMaxKeyFrames.min, minMaxKeyFrames.max, animation.framePerSecond, animationSampleRate, inputs, outputs, minMaxKeyFrames, convertToRightHandedSystem, useQuaternion);
1888
1888
  }
1889
1889
  else {
1890
- if (interpolation === "LINEAR" /* LINEAR */ || interpolation === "STEP" /* STEP */) {
1890
+ if (interpolation === "LINEAR" /* AnimationSamplerInterpolation.LINEAR */ || interpolation === "STEP" /* AnimationSamplerInterpolation.STEP */) {
1891
1891
  _GLTFAnimation._CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
1892
1892
  }
1893
- else if (interpolation === "CUBICSPLINE" /* CUBICSPLINE */) {
1893
+ else if (interpolation === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
1894
1894
  _GLTFAnimation._CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion);
1895
1895
  }
1896
1896
  else {
@@ -1912,32 +1912,32 @@ var _GLTFAnimation = /** @class */ (function () {
1912
1912
  };
1913
1913
  _GLTFAnimation._DeduceAnimationInfo = function (animation) {
1914
1914
  var animationChannelTargetPath = null;
1915
- var dataAccessorType = "VEC3" /* VEC3 */;
1915
+ var dataAccessorType = "VEC3" /* AccessorType.VEC3 */;
1916
1916
  var useQuaternion = false;
1917
1917
  var property = animation.targetProperty.split(".");
1918
1918
  switch (property[0]) {
1919
1919
  case "scaling": {
1920
- animationChannelTargetPath = "scale" /* SCALE */;
1920
+ animationChannelTargetPath = "scale" /* AnimationChannelTargetPath.SCALE */;
1921
1921
  break;
1922
1922
  }
1923
1923
  case "position": {
1924
- animationChannelTargetPath = "translation" /* TRANSLATION */;
1924
+ animationChannelTargetPath = "translation" /* AnimationChannelTargetPath.TRANSLATION */;
1925
1925
  break;
1926
1926
  }
1927
1927
  case "rotation": {
1928
- dataAccessorType = "VEC4" /* VEC4 */;
1929
- animationChannelTargetPath = "rotation" /* ROTATION */;
1928
+ dataAccessorType = "VEC4" /* AccessorType.VEC4 */;
1929
+ animationChannelTargetPath = "rotation" /* AnimationChannelTargetPath.ROTATION */;
1930
1930
  break;
1931
1931
  }
1932
1932
  case "rotationQuaternion": {
1933
- dataAccessorType = "VEC4" /* VEC4 */;
1933
+ dataAccessorType = "VEC4" /* AccessorType.VEC4 */;
1934
1934
  useQuaternion = true;
1935
- animationChannelTargetPath = "rotation" /* ROTATION */;
1935
+ animationChannelTargetPath = "rotation" /* AnimationChannelTargetPath.ROTATION */;
1936
1936
  break;
1937
1937
  }
1938
1938
  case "influence": {
1939
- dataAccessorType = "SCALAR" /* SCALAR */;
1940
- animationChannelTargetPath = "weights" /* WEIGHTS */;
1939
+ dataAccessorType = "SCALAR" /* AccessorType.SCALAR */;
1940
+ animationChannelTargetPath = "weights" /* AnimationChannelTargetPath.WEIGHTS */;
1941
1941
  break;
1942
1942
  }
1943
1943
  default: {
@@ -2213,7 +2213,7 @@ var _GLTFAnimation = /** @class */ (function () {
2213
2213
  animationData.inputs.forEach(function (input) {
2214
2214
  binaryWriter.setFloat32(input);
2215
2215
  });
2216
- 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]);
2216
+ 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]);
2217
2217
  accessors.push(accessor);
2218
2218
  keyframeAccessorIndex = accessors.length - 1;
2219
2219
  // create bufferview and accessor for keyed values.
@@ -2227,7 +2227,7 @@ var _GLTFAnimation = /** @class */ (function () {
2227
2227
  binaryWriter.setFloat32(entry);
2228
2228
  });
2229
2229
  });
2230
- accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " data"), dataAccessorType, 5126 /* FLOAT */, outputLength, null, null, null);
2230
+ accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._CreateAccessor(bufferViews.length - 1, "".concat(name, " data"), dataAccessorType, 5126 /* AccessorComponentType.FLOAT */, outputLength, null, null, null);
2231
2231
  accessors.push(accessor);
2232
2232
  dataAccessorIndex = accessors.length - 1;
2233
2233
  // create sampler
@@ -2335,15 +2335,15 @@ var _GLTFAnimation = /** @class */ (function () {
2335
2335
  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);
2336
2336
  switch (componentName) {
2337
2337
  case "x": {
2338
- value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2338
+ value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2339
2339
  break;
2340
2340
  }
2341
2341
  case "y": {
2342
- value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2342
+ value[componentName] = convertToRightHandedSystem && useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2343
2343
  break;
2344
2344
  }
2345
2345
  case "z": {
2346
- value[componentName] = convertToRightHandedSystem && !useQuaternion && animationChannelTargetPath !== "scale" /* SCALE */ ? -factor : factor;
2346
+ value[componentName] = convertToRightHandedSystem && !useQuaternion && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */ ? -factor : factor;
2347
2347
  break;
2348
2348
  }
2349
2349
  case "w": {
@@ -2359,14 +2359,14 @@ var _GLTFAnimation = /** @class */ (function () {
2359
2359
  _GLTFAnimation._SetInterpolatedValue = function (babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, convertToRightHandedSystem, useQuaternion) {
2360
2360
  var cacheValue;
2361
2361
  inputs.push(time);
2362
- if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2362
+ if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2363
2363
  outputs.push([value]);
2364
2364
  return;
2365
2365
  }
2366
2366
  if (animation.dataType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_FLOAT) {
2367
2367
  value = this._ConvertFactorToVector3OrQuaternion(value, babylonTransformNode, animation, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
2368
2368
  }
2369
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2369
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2370
2370
  if (useQuaternion) {
2371
2371
  quaternionCache = value;
2372
2372
  }
@@ -2385,7 +2385,7 @@ var _GLTFAnimation = /** @class */ (function () {
2385
2385
  else {
2386
2386
  // scaling and position animation
2387
2387
  cacheValue = value;
2388
- if (convertToRightHandedSystem && animationChannelTargetPath !== "scale" /* SCALE */) {
2388
+ if (convertToRightHandedSystem && animationChannelTargetPath !== "scale" /* AnimationChannelTargetPath.SCALE */) {
2389
2389
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedPositionVector3FromRef(cacheValue);
2390
2390
  if (!babylonTransformNode.parent) {
2391
2391
  cacheValue.x *= -1;
@@ -2427,14 +2427,14 @@ var _GLTFAnimation = /** @class */ (function () {
2427
2427
  _GLTFAnimation._CreateCubicSplineAnimation = function (babylonTransformNode, animation, animationChannelTargetPath, frameDelta, inputs, outputs, convertToRightHandedSystem, useQuaternion) {
2428
2428
  animation.getKeys().forEach(function (keyFrame) {
2429
2429
  inputs.push(keyFrame.frame / animation.framePerSecond); // keyframes in seconds.
2430
- _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.INTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2430
+ _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.INTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2431
2431
  _GLTFAnimation._AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, convertToRightHandedSystem, useQuaternion);
2432
- _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.OUTTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2432
+ _GLTFAnimation._AddSplineTangent(babylonTransformNode, _TangentType.OUTTANGENT, outputs, animationChannelTargetPath, "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem);
2433
2433
  });
2434
2434
  };
2435
2435
  _GLTFAnimation._GetBasePositionRotationOrScale = function (babylonTransformNode, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion) {
2436
2436
  var basePositionRotationOrScale;
2437
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2437
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2438
2438
  if (useQuaternion) {
2439
2439
  var q = babylonTransformNode.rotationQuaternion;
2440
2440
  basePositionRotationOrScale = (q !== null && q !== void 0 ? q : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Identity()).asArray();
@@ -2451,7 +2451,7 @@ var _GLTFAnimation = /** @class */ (function () {
2451
2451
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalArray3FromRef(basePositionRotationOrScale);
2452
2452
  }
2453
2453
  }
2454
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2454
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2455
2455
  var p = babylonTransformNode.position;
2456
2456
  basePositionRotationOrScale = (p !== null && p !== void 0 ? p : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()).asArray();
2457
2457
  if (convertToRightHandedSystem) {
@@ -2481,7 +2481,7 @@ var _GLTFAnimation = /** @class */ (function () {
2481
2481
  var animationType = animation.dataType;
2482
2482
  if (animationType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_VECTOR3) {
2483
2483
  value = keyFrame.value.asArray();
2484
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2484
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2485
2485
  var array = core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(value);
2486
2486
  var rotationQuaternion = core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.RotationYawPitchRoll(array.y, array.x, array.z);
2487
2487
  if (convertToRightHandedSystem) {
@@ -2492,7 +2492,7 @@ var _GLTFAnimation = /** @class */ (function () {
2492
2492
  }
2493
2493
  value = rotationQuaternion.asArray();
2494
2494
  }
2495
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2495
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2496
2496
  if (convertToRightHandedSystem) {
2497
2497
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalArray3FromRef(value);
2498
2498
  if (!babylonTransformNode.parent) {
@@ -2504,14 +2504,14 @@ var _GLTFAnimation = /** @class */ (function () {
2504
2504
  outputs.push(value); // scale vector.
2505
2505
  }
2506
2506
  else if (animationType === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation.ANIMATIONTYPE_FLOAT) {
2507
- if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2507
+ if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2508
2508
  outputs.push([keyFrame.value]);
2509
2509
  }
2510
2510
  else {
2511
2511
  // handles single component x, y, z or w component animation by using a base property and animating over a component.
2512
2512
  newPositionRotationOrScale = this._ConvertFactorToVector3OrQuaternion(keyFrame.value, babylonTransformNode, animation, animationChannelTargetPath, convertToRightHandedSystem, useQuaternion);
2513
2513
  if (newPositionRotationOrScale) {
2514
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2514
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2515
2515
  var posRotScale = useQuaternion
2516
2516
  ? newPositionRotationOrScale
2517
2517
  : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.RotationYawPitchRoll(newPositionRotationOrScale.y, newPositionRotationOrScale.x, newPositionRotationOrScale.z).normalize();
@@ -2523,7 +2523,7 @@ var _GLTFAnimation = /** @class */ (function () {
2523
2523
  }
2524
2524
  outputs.push(posRotScale.asArray());
2525
2525
  }
2526
- else if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2526
+ else if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2527
2527
  if (convertToRightHandedSystem) {
2528
2528
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedNormalVector3FromRef(newPositionRotationOrScale);
2529
2529
  if (!babylonTransformNode.parent) {
@@ -2560,44 +2560,44 @@ var _GLTFAnimation = /** @class */ (function () {
2560
2560
  var interpolationType;
2561
2561
  var shouldBakeAnimation = false;
2562
2562
  var key;
2563
- if (animationChannelTargetPath === "rotation" /* ROTATION */ && !useQuaternion) {
2564
- return { interpolationType: "LINEAR" /* LINEAR */, shouldBakeAnimation: true };
2563
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */ && !useQuaternion) {
2564
+ return { interpolationType: "LINEAR" /* AnimationSamplerInterpolation.LINEAR */, shouldBakeAnimation: true };
2565
2565
  }
2566
2566
  for (var i = 0, length_2 = keyFrames.length; i < length_2; ++i) {
2567
2567
  key = keyFrames[i];
2568
2568
  if (key.inTangent || key.outTangent) {
2569
2569
  if (interpolationType) {
2570
- if (interpolationType !== "CUBICSPLINE" /* CUBICSPLINE */) {
2571
- interpolationType = "LINEAR" /* LINEAR */;
2570
+ if (interpolationType !== "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
2571
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2572
2572
  shouldBakeAnimation = true;
2573
2573
  break;
2574
2574
  }
2575
2575
  }
2576
2576
  else {
2577
- interpolationType = "CUBICSPLINE" /* CUBICSPLINE */;
2577
+ interpolationType = "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */;
2578
2578
  }
2579
2579
  }
2580
2580
  else {
2581
2581
  if (interpolationType) {
2582
- if (interpolationType === "CUBICSPLINE" /* CUBICSPLINE */ ||
2583
- (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP && interpolationType !== "STEP" /* STEP */)) {
2584
- interpolationType = "LINEAR" /* LINEAR */;
2582
+ if (interpolationType === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */ ||
2583
+ (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP && interpolationType !== "STEP" /* AnimationSamplerInterpolation.STEP */)) {
2584
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2585
2585
  shouldBakeAnimation = true;
2586
2586
  break;
2587
2587
  }
2588
2588
  }
2589
2589
  else {
2590
2590
  if (key.interpolation && key.interpolation === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.AnimationKeyInterpolation.STEP) {
2591
- interpolationType = "STEP" /* STEP */;
2591
+ interpolationType = "STEP" /* AnimationSamplerInterpolation.STEP */;
2592
2592
  }
2593
2593
  else {
2594
- interpolationType = "LINEAR" /* LINEAR */;
2594
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2595
2595
  }
2596
2596
  }
2597
2597
  }
2598
2598
  }
2599
2599
  if (!interpolationType) {
2600
- interpolationType = "LINEAR" /* LINEAR */;
2600
+ interpolationType = "LINEAR" /* AnimationSamplerInterpolation.LINEAR */;
2601
2601
  }
2602
2602
  return { interpolationType: interpolationType, shouldBakeAnimation: shouldBakeAnimation };
2603
2603
  };
@@ -2617,8 +2617,8 @@ var _GLTFAnimation = /** @class */ (function () {
2617
2617
  _GLTFAnimation._AddSplineTangent = function (babylonTransformNode, tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, frameDelta, useQuaternion, convertToRightHandedSystem) {
2618
2618
  var tangent;
2619
2619
  var tangentValue = tangentType === _TangentType.INTANGENT ? keyFrame.inTangent : keyFrame.outTangent;
2620
- if (interpolation === "CUBICSPLINE" /* CUBICSPLINE */) {
2621
- if (animationChannelTargetPath === "rotation" /* ROTATION */) {
2620
+ if (interpolation === "CUBICSPLINE" /* AnimationSamplerInterpolation.CUBICSPLINE */) {
2621
+ if (animationChannelTargetPath === "rotation" /* AnimationChannelTargetPath.ROTATION */) {
2622
2622
  if (tangentValue) {
2623
2623
  if (useQuaternion) {
2624
2624
  tangent = tangentValue.asArray();
@@ -2638,7 +2638,7 @@ var _GLTFAnimation = /** @class */ (function () {
2638
2638
  tangent = [0, 0, 0, 0];
2639
2639
  }
2640
2640
  }
2641
- else if (animationChannelTargetPath === "weights" /* WEIGHTS */) {
2641
+ else if (animationChannelTargetPath === "weights" /* AnimationChannelTargetPath.WEIGHTS */) {
2642
2642
  if (tangentValue) {
2643
2643
  tangent = [tangentValue];
2644
2644
  }
@@ -2650,7 +2650,7 @@ var _GLTFAnimation = /** @class */ (function () {
2650
2650
  if (tangentValue) {
2651
2651
  tangent = tangentValue.asArray();
2652
2652
  if (convertToRightHandedSystem) {
2653
- if (animationChannelTargetPath === "translation" /* TRANSLATION */) {
2653
+ if (animationChannelTargetPath === "translation" /* AnimationChannelTargetPath.TRANSLATION */) {
2654
2654
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_1__._GLTFUtilities._GetRightHandedPositionArray3FromRef(tangent);
2655
2655
  if (!babylonTransformNode.parent) {
2656
2656
  tangent[0] *= -1; // x
@@ -2737,10 +2737,10 @@ var GLTFData = /** @class */ (function () {
2737
2737
  mimeType = { type: "model/gltf+json" };
2738
2738
  }
2739
2739
  else if (endsWith(key, ".jpeg") || endsWith(key, ".jpg")) {
2740
- mimeType = { type: "image/jpeg" /* JPEG */ };
2740
+ mimeType = { type: "image/jpeg" /* ImageMimeType.JPEG */ };
2741
2741
  }
2742
2742
  else if (endsWith(key, ".png")) {
2743
- mimeType = { type: "image/png" /* PNG */ };
2743
+ mimeType = { type: "image/png" /* ImageMimeType.PNG */ };
2744
2744
  }
2745
2745
  link.href = window.URL.createObjectURL(new Blob([blob], mimeType));
2746
2746
  link.click();
@@ -3385,19 +3385,19 @@ var _Exporter = /** @class */ (function () {
3385
3385
  }
3386
3386
  var writeBinaryFunc;
3387
3387
  switch (attributeComponentKind) {
3388
- case 5121 /* UNSIGNED_BYTE */: {
3388
+ case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {
3389
3389
  writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);
3390
3390
  break;
3391
3391
  }
3392
- case 5123 /* UNSIGNED_SHORT */: {
3392
+ case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {
3393
3393
  writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);
3394
3394
  break;
3395
3395
  }
3396
- case 5125 /* UNSIGNED_INT */: {
3396
+ case 5125 /* AccessorComponentType.UNSIGNED_INT */: {
3397
3397
  writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);
3398
3398
  break;
3399
3399
  }
3400
- case 5126 /* FLOAT */: {
3400
+ case 5126 /* AccessorComponentType.FLOAT */: {
3401
3401
  writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);
3402
3402
  break;
3403
3403
  }
@@ -3488,19 +3488,19 @@ var _Exporter = /** @class */ (function () {
3488
3488
  }
3489
3489
  var writeBinaryFunc;
3490
3490
  switch (attributeComponentKind) {
3491
- case 5121 /* UNSIGNED_BYTE */: {
3491
+ case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {
3492
3492
  writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);
3493
3493
  break;
3494
3494
  }
3495
- case 5123 /* UNSIGNED_SHORT */: {
3495
+ case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {
3496
3496
  writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);
3497
3497
  break;
3498
3498
  }
3499
- case 5125 /* UNSIGNED_INT */: {
3499
+ case 5125 /* AccessorComponentType.UNSIGNED_INT */: {
3500
3500
  writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);
3501
3501
  break;
3502
3502
  }
3503
- case 5126 /* FLOAT */: {
3503
+ case 5126 /* AccessorComponentType.FLOAT */: {
3504
3504
  writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);
3505
3505
  break;
3506
3506
  }
@@ -3853,10 +3853,10 @@ var _Exporter = /** @class */ (function () {
3853
3853
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + "_NORMAL");
3854
3854
  this._bufferViews.push(bufferView);
3855
3855
  var bufferViewIndex = this._bufferViews.length - 1;
3856
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "NORMAL", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3856
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "NORMAL", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3857
3857
  this._accessors.push(accessor);
3858
3858
  target.NORMAL = this._accessors.length - 1;
3859
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexNormals, morphNormals, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3859
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexNormals, morphNormals, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3860
3860
  }
3861
3861
  if (babylonMorphTarget.hasPositions) {
3862
3862
  var vertexPositions = babylonSubMesh.getMesh().getVerticesData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind);
@@ -3868,10 +3868,10 @@ var _Exporter = /** @class */ (function () {
3868
3868
  this._bufferViews.push(bufferView);
3869
3869
  var bufferViewIndex = this._bufferViews.length - 1;
3870
3870
  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) };
3871
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "POSITION", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3871
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "POSITION", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3872
3872
  this._accessors.push(accessor);
3873
3873
  target.POSITION = this._accessors.length - 1;
3874
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexPositions, morphPositions, byteStride / 4, binaryWriter, convertToRightHandedSystem, minMax);
3874
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexPositions, morphPositions, byteStride / 4, binaryWriter, convertToRightHandedSystem, minMax);
3875
3875
  accessor.min = minMax.min.asArray();
3876
3876
  accessor.max = minMax.max.asArray();
3877
3877
  }
@@ -3884,10 +3884,10 @@ var _Exporter = /** @class */ (function () {
3884
3884
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + "_NORMAL");
3885
3885
  this._bufferViews.push(bufferView);
3886
3886
  var bufferViewIndex = this._bufferViews.length - 1;
3887
- var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "TANGENT", "VEC3" /* VEC3 */, 5126 /* FLOAT */, count, 0, null, null);
3887
+ var accessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + " - " + "TANGENT", "VEC3" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);
3888
3888
  this._accessors.push(accessor);
3889
3889
  target.TANGENT = this._accessors.length - 1;
3890
- this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, 5126 /* FLOAT */, babylonSubMesh, babylonMorphTarget, vertexTangents, morphTangents, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3890
+ this.writeMorphTargetAttributeData(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, babylonMorphTarget, vertexTangents, morphTangents, byteStride / 4, binaryWriter, convertToRightHandedSystem);
3891
3891
  }
3892
3892
  meshPrimitive.targets.push(target);
3893
3893
  }
@@ -3914,31 +3914,31 @@ var _Exporter = /** @class */ (function () {
3914
3914
  break;
3915
3915
  }
3916
3916
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.TriangleStripDrawMode: {
3917
- meshPrimitive.mode = 5 /* TRIANGLE_STRIP */;
3917
+ meshPrimitive.mode = 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */;
3918
3918
  break;
3919
3919
  }
3920
3920
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.TriangleFanDrawMode: {
3921
- meshPrimitive.mode = 6 /* TRIANGLE_FAN */;
3921
+ meshPrimitive.mode = 6 /* MeshPrimitiveMode.TRIANGLE_FAN */;
3922
3922
  break;
3923
3923
  }
3924
3924
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.PointListDrawMode: {
3925
- meshPrimitive.mode = 0 /* POINTS */;
3925
+ meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;
3926
3926
  break;
3927
3927
  }
3928
3928
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.PointFillMode: {
3929
- meshPrimitive.mode = 0 /* POINTS */;
3929
+ meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;
3930
3930
  break;
3931
3931
  }
3932
3932
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineLoopDrawMode: {
3933
- meshPrimitive.mode = 2 /* LINE_LOOP */;
3933
+ meshPrimitive.mode = 2 /* MeshPrimitiveMode.LINE_LOOP */;
3934
3934
  break;
3935
3935
  }
3936
3936
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineListDrawMode: {
3937
- meshPrimitive.mode = 1 /* LINES */;
3937
+ meshPrimitive.mode = 1 /* MeshPrimitiveMode.LINES */;
3938
3938
  break;
3939
3939
  }
3940
3940
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Material.LineStripDrawMode: {
3941
- meshPrimitive.mode = 3 /* LINE_STRIP */;
3941
+ meshPrimitive.mode = 3 /* MeshPrimitiveMode.LINE_STRIP */;
3942
3942
  break;
3943
3943
  }
3944
3944
  }
@@ -4016,16 +4016,16 @@ var _Exporter = /** @class */ (function () {
4016
4016
  bufferMesh = babylonTransformNode.sourceMesh;
4017
4017
  }
4018
4018
  var attributeData = [
4019
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, accessorType: "VEC3" /* VEC3 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 12 },
4020
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, accessorType: "VEC3" /* VEC3 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 12 },
4021
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.ColorKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
4022
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
4023
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UVKind, accessorType: "VEC2" /* VEC2 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 8 },
4024
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UV2Kind, accessorType: "VEC2" /* VEC2 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 8 },
4025
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5123 /* UNSIGNED_SHORT */, byteStride: 8 },
4026
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesExtraKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5123 /* UNSIGNED_SHORT */, byteStride: 8 },
4027
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
4028
- { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsExtraKind, accessorType: "VEC4" /* VEC4 */, accessorComponentType: 5126 /* FLOAT */, byteStride: 16 },
4019
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind, accessorType: "VEC3" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },
4020
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind, accessorType: "VEC3" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },
4021
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.ColorKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
4022
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.TangentKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
4023
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UVKind, accessorType: "VEC2" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },
4024
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UV2Kind, accessorType: "VEC2" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },
4025
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },
4026
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesIndicesExtraKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },
4027
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
4028
+ { kind: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.MatricesWeightsExtraKind, accessorType: "VEC4" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },
4029
4029
  ];
4030
4030
  if (bufferMesh) {
4031
4031
  var indexBufferViewIndex = null;
@@ -4043,7 +4043,7 @@ var _Exporter = /** @class */ (function () {
4043
4043
  ? vertexBuffer.getSize() * core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.GetTypeByteLength(attribute.accessorComponentType)
4044
4044
  : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.DeduceStride(attributeKind) * 4;
4045
4045
  if (attribute.byteStride === 12) {
4046
- attribute.accessorType = "VEC3" /* VEC3 */;
4046
+ attribute.accessorType = "VEC3" /* AccessorType.VEC3 */;
4047
4047
  }
4048
4048
  this._createBufferViewKind(attributeKind, attributeComponentKind, babylonTransformNode, binaryWriter, attribute.byteStride, convertToRightHandedSystem);
4049
4049
  attribute.bufferViewIndex = this._bufferViews.length - 1;
@@ -4125,7 +4125,7 @@ var _Exporter = /** @class */ (function () {
4125
4125
  }
4126
4126
  if (indexBufferViewIndex) {
4127
4127
  // Create accessor
4128
- 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);
4128
+ 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);
4129
4129
  this._accessors.push(accessor);
4130
4130
  meshPrimitive.indices = this._accessors.length - 1;
4131
4131
  }
@@ -4255,12 +4255,12 @@ var _Exporter = /** @class */ (function () {
4255
4255
  babylonScene.cameras.forEach(function (camera) {
4256
4256
  if (!_this._options.shouldExportNode || _this._options.shouldExportNode(camera)) {
4257
4257
  var glTFCamera = {
4258
- type: camera.mode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.PERSPECTIVE_CAMERA ? "perspective" /* PERSPECTIVE */ : "orthographic" /* ORTHOGRAPHIC */,
4258
+ type: camera.mode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.PERSPECTIVE_CAMERA ? "perspective" /* CameraType.PERSPECTIVE */ : "orthographic" /* CameraType.ORTHOGRAPHIC */,
4259
4259
  };
4260
4260
  if (camera.name) {
4261
4261
  glTFCamera.name = camera.name;
4262
4262
  }
4263
- if (glTFCamera.type === "perspective" /* PERSPECTIVE */) {
4263
+ if (glTFCamera.type === "perspective" /* CameraType.PERSPECTIVE */) {
4264
4264
  glTFCamera.perspective = {
4265
4265
  aspectRatio: camera.getEngine().getAspectRatio(camera),
4266
4266
  yfov: camera.fovMode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Camera.FOVMODE_VERTICAL_FIXED ? camera.fov : camera.fov * camera.getEngine().getAspectRatio(camera),
@@ -4268,7 +4268,7 @@ var _Exporter = /** @class */ (function () {
4268
4268
  zfar: camera.maxZ,
4269
4269
  };
4270
4270
  }
4271
- else if (glTFCamera.type === "orthographic" /* ORTHOGRAPHIC */) {
4271
+ else if (glTFCamera.type === "orthographic" /* CameraType.ORTHOGRAPHIC */) {
4272
4272
  var halfWidth = camera.orthoLeft && camera.orthoRight ? 0.5 * (camera.orthoRight - camera.orthoLeft) : camera.getEngine().getRenderWidth() * 0.5;
4273
4273
  var halfHeight = camera.orthoBottom && camera.orthoTop ? 0.5 * (camera.orthoTop - camera.orthoBottom) : camera.getEngine().getRenderHeight() * 0.5;
4274
4274
  glTFCamera.orthographic = {
@@ -4283,7 +4283,7 @@ var _Exporter = /** @class */ (function () {
4283
4283
  }
4284
4284
  });
4285
4285
  var _a = this._getExportNodes(nodes), exportNodes = _a[0], exportMaterials = _a[1];
4286
- return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(exportMaterials, "image/png" /* PNG */, true).then(function () {
4286
+ return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(exportMaterials, "image/png" /* ImageMimeType.PNG */, true).then(function () {
4287
4287
  return _this._createNodeMapAndAnimationsAsync(babylonScene, exportNodes, binaryWriter).then(function (nodeMap) {
4288
4288
  return _this._createSkinsAsync(babylonScene, nodeMap, binaryWriter).then(function (skinMap) {
4289
4289
  _this._nodeMap = nodeMap;
@@ -4549,7 +4549,7 @@ var _Exporter = /** @class */ (function () {
4549
4549
  var bufferView = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateBufferView(0, bufferViewOffset, byteLength, undefined, "InverseBindMatrices" + " - " + skeleton.name);
4550
4550
  this._bufferViews.push(bufferView);
4551
4551
  var bufferViewIndex = this._bufferViews.length - 1;
4552
- var bindMatrixAccessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, "InverseBindMatrices" + " - " + skeleton.name, "MAT4" /* MAT4 */, 5126 /* FLOAT */, inverseBindMatrices.length, null, null, null);
4552
+ var bindMatrixAccessor = _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._CreateAccessor(bufferViewIndex, "InverseBindMatrices" + " - " + skeleton.name, "MAT4" /* AccessorType.MAT4 */, 5126 /* AccessorComponentType.FLOAT */, inverseBindMatrices.length, null, null, null);
4553
4553
  var inverseBindAccessorIndex = this._accessors.push(bindMatrixAccessor) - 1;
4554
4554
  skin.inverseBindMatrices = inverseBindAccessorIndex;
4555
4555
  this._skins.push(skin);
@@ -4852,11 +4852,11 @@ __webpack_require__.r(__webpack_exports__);
4852
4852
 
4853
4853
  function getFileExtensionFromMimeType(mimeType) {
4854
4854
  switch (mimeType) {
4855
- case "image/jpeg" /* JPEG */:
4855
+ case "image/jpeg" /* ImageMimeType.JPEG */:
4856
4856
  return ".jpg";
4857
- case "image/png" /* PNG */:
4857
+ case "image/png" /* ImageMimeType.PNG */:
4858
4858
  return ".png";
4859
- case "image/webp" /* WEBP */:
4859
+ case "image/webp" /* ImageMimeType.WEBP */:
4860
4860
  return ".webp";
4861
4861
  }
4862
4862
  }
@@ -5039,10 +5039,10 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5039
5039
  */
5040
5040
  _GLTFMaterialExporter._SetAlphaMode = function (glTFMaterial, babylonMaterial) {
5041
5041
  if (babylonMaterial.needAlphaBlending()) {
5042
- glTFMaterial.alphaMode = "BLEND" /* BLEND */;
5042
+ glTFMaterial.alphaMode = "BLEND" /* MaterialAlphaMode.BLEND */;
5043
5043
  }
5044
5044
  else if (babylonMaterial.needAlphaTesting()) {
5045
- glTFMaterial.alphaMode = "MASK" /* MASK */;
5045
+ glTFMaterial.alphaMode = "MASK" /* MaterialAlphaMode.MASK */;
5046
5046
  glTFMaterial.alphaCutoff = babylonMaterial.alphaCutOff;
5047
5047
  }
5048
5048
  };
@@ -5104,7 +5104,7 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5104
5104
  }
5105
5105
  if (babylonStandardMaterial.alpha < 1.0 || babylonStandardMaterial.opacityTexture) {
5106
5106
  if (babylonStandardMaterial.alphaMode === core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Constants.ALPHA_COMBINE) {
5107
- material.alphaMode = "BLEND" /* BLEND */;
5107
+ material.alphaMode = "BLEND" /* MaterialAlphaMode.BLEND */;
5108
5108
  }
5109
5109
  else {
5110
5110
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Tools.Warn(babylonStandardMaterial.name + ": glTF 2.0 does not support alpha mode: " + babylonStandardMaterial.alphaMode.toString());
@@ -5471,72 +5471,72 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5471
5471
  return sampler;
5472
5472
  }
5473
5473
  var wrapS = this._getGLTFTextureWrapMode(texture.wrapU);
5474
- if (wrapS !== 10497 /* REPEAT */) {
5474
+ if (wrapS !== 10497 /* TextureWrapMode.REPEAT */) {
5475
5475
  sampler.wrapS = wrapS;
5476
5476
  }
5477
5477
  var wrapT = this._getGLTFTextureWrapMode(texture.wrapV);
5478
- if (wrapT !== 10497 /* REPEAT */) {
5478
+ if (wrapT !== 10497 /* TextureWrapMode.REPEAT */) {
5479
5479
  sampler.wrapT = wrapT;
5480
5480
  }
5481
5481
  switch (texture.samplingMode) {
5482
5482
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR: {
5483
- sampler.magFilter = 9729 /* LINEAR */;
5484
- sampler.minFilter = 9729 /* LINEAR */;
5483
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5484
+ sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;
5485
5485
  break;
5486
5486
  }
5487
5487
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST: {
5488
- sampler.magFilter = 9729 /* LINEAR */;
5489
- sampler.minFilter = 9728 /* NEAREST */;
5488
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5489
+ sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;
5490
5490
  break;
5491
5491
  }
5492
5492
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR: {
5493
- sampler.magFilter = 9728 /* NEAREST */;
5494
- sampler.minFilter = 9729 /* LINEAR */;
5493
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5494
+ sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;
5495
5495
  break;
5496
5496
  }
5497
5497
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR_MIPLINEAR: {
5498
- sampler.magFilter = 9728 /* NEAREST */;
5499
- sampler.minFilter = 9987 /* LINEAR_MIPMAP_LINEAR */;
5498
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5499
+ sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;
5500
5500
  break;
5501
5501
  }
5502
5502
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST: {
5503
- sampler.magFilter = 9728 /* NEAREST */;
5504
- sampler.minFilter = 9728 /* NEAREST */;
5503
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5504
+ sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;
5505
5505
  break;
5506
5506
  }
5507
5507
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_LINEAR_MIPNEAREST: {
5508
- sampler.magFilter = 9728 /* NEAREST */;
5509
- sampler.minFilter = 9985 /* LINEAR_MIPMAP_NEAREST */;
5508
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5509
+ sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;
5510
5510
  break;
5511
5511
  }
5512
5512
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST_MIPNEAREST: {
5513
- sampler.magFilter = 9729 /* LINEAR */;
5514
- sampler.minFilter = 9984 /* NEAREST_MIPMAP_NEAREST */;
5513
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5514
+ sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;
5515
5515
  break;
5516
5516
  }
5517
5517
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_NEAREST_MIPLINEAR: {
5518
- sampler.magFilter = 9729 /* LINEAR */;
5519
- sampler.minFilter = 9986 /* NEAREST_MIPMAP_LINEAR */;
5518
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5519
+ sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;
5520
5520
  break;
5521
5521
  }
5522
5522
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST_MIPLINEAR: {
5523
- sampler.magFilter = 9728 /* NEAREST */;
5524
- sampler.minFilter = 9986 /* NEAREST_MIPMAP_LINEAR */;
5523
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5524
+ sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;
5525
5525
  break;
5526
5526
  }
5527
5527
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR_MIPLINEAR: {
5528
- sampler.magFilter = 9729 /* LINEAR */;
5529
- sampler.minFilter = 9987 /* LINEAR_MIPMAP_LINEAR */;
5528
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5529
+ sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;
5530
5530
  break;
5531
5531
  }
5532
5532
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.LINEAR_LINEAR_MIPNEAREST: {
5533
- sampler.magFilter = 9729 /* LINEAR */;
5534
- sampler.minFilter = 9985 /* LINEAR_MIPMAP_NEAREST */;
5533
+ sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;
5534
+ sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;
5535
5535
  break;
5536
5536
  }
5537
5537
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_NEAREST_MIPNEAREST: {
5538
- sampler.magFilter = 9728 /* NEAREST */;
5539
- sampler.minFilter = 9984 /* NEAREST_MIPMAP_NEAREST */;
5538
+ sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;
5539
+ sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;
5540
5540
  break;
5541
5541
  }
5542
5542
  }
@@ -5545,17 +5545,17 @@ var _GLTFMaterialExporter = /** @class */ (function () {
5545
5545
  _GLTFMaterialExporter.prototype._getGLTFTextureWrapMode = function (wrapMode) {
5546
5546
  switch (wrapMode) {
5547
5547
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.WRAP_ADDRESSMODE: {
5548
- return 10497 /* REPEAT */;
5548
+ return 10497 /* TextureWrapMode.REPEAT */;
5549
5549
  }
5550
5550
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE: {
5551
- return 33071 /* CLAMP_TO_EDGE */;
5551
+ return 33071 /* TextureWrapMode.CLAMP_TO_EDGE */;
5552
5552
  }
5553
5553
  case core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Texture.MIRROR_ADDRESSMODE: {
5554
- return 33648 /* MIRRORED_REPEAT */;
5554
+ return 33648 /* TextureWrapMode.MIRRORED_REPEAT */;
5555
5555
  }
5556
5556
  default: {
5557
5557
  core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Tools.Error("Unsupported Texture Wrap Mode ".concat(wrapMode, "!"));
5558
- return 10497 /* REPEAT */;
5558
+ return 10497 /* TextureWrapMode.REPEAT */;
5559
5559
  }
5560
5560
  }
5561
5561
  };
@@ -6118,19 +6118,19 @@ var _GLTFUtilities = /** @class */ (function () {
6118
6118
  };
6119
6119
  _GLTFUtilities._GetDataAccessorElementCount = function (accessorType) {
6120
6120
  switch (accessorType) {
6121
- case "MAT2" /* MAT2 */:
6121
+ case "MAT2" /* AccessorType.MAT2 */:
6122
6122
  return 4;
6123
- case "MAT3" /* MAT3 */:
6123
+ case "MAT3" /* AccessorType.MAT3 */:
6124
6124
  return 9;
6125
- case "MAT4" /* MAT4 */:
6125
+ case "MAT4" /* AccessorType.MAT4 */:
6126
6126
  return 16;
6127
- case "SCALAR" /* SCALAR */:
6127
+ case "SCALAR" /* AccessorType.SCALAR */:
6128
6128
  return 1;
6129
- case "VEC2" /* VEC2 */:
6129
+ case "VEC2" /* AccessorType.VEC2 */:
6130
6130
  return 2;
6131
- case "VEC3" /* VEC3 */:
6131
+ case "VEC3" /* AccessorType.VEC3 */:
6132
6132
  return 3;
6133
- case "VEC4" /* VEC4 */:
6133
+ case "VEC4" /* AccessorType.VEC4 */:
6134
6134
  return 4;
6135
6135
  }
6136
6136
  };