babylonjs-serializers 5.12.1 → 5.13.2

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.
@@ -2552,7 +2552,6 @@ __webpack_require__.r(__webpack_exports__);
2552
2552
 
2553
2553
 
2554
2554
 
2555
-
2556
2555
  /**
2557
2556
  * Converts Babylon Scene into glTF 2.0.
2558
2557
  * @hidden
@@ -3549,8 +3548,8 @@ var _Exporter = /** @class */ (function () {
3549
3548
  if (!babylonCamera.position.equalsToFloats(0, 0, 0)) {
3550
3549
  node.translation = convertToRightHandedSystem ? _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._GetRightHandedPositionVector3(babylonCamera.position).asArray() : babylonCamera.position.asArray();
3551
3550
  }
3552
- var rotationQuaternion = babylonCamera.absoluteRotation;
3553
- if (!core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Quaternion.IsIdentity(rotationQuaternion)) {
3551
+ var rotationQuaternion = babylonCamera.rotationQuaternion; // we target the local transformation if one.
3552
+ if (rotationQuaternion && !core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Quaternion.IsIdentity(rotationQuaternion)) {
3554
3553
  if (convertToRightHandedSystem) {
3555
3554
  _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._GetRightHandedQuaternionFromRef(rotationQuaternion);
3556
3555
  }
@@ -4124,8 +4123,9 @@ var _Exporter = /** @class */ (function () {
4124
4123
  var babylonNode = nodes_2[_i];
4125
4124
  if (!this._options.shouldExportNode || this._options.shouldExportNode(babylonNode)) {
4126
4125
  exportNodes.push(babylonNode);
4127
- if (babylonNode instanceof core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.AbstractMesh) {
4128
- var material = babylonNode.material || babylonNode.getScene().defaultMaterial;
4126
+ var babylonMesh = babylonNode;
4127
+ if (babylonMesh.subMeshes && babylonMesh.subMeshes.length > 0) {
4128
+ var material = babylonMesh.material || babylonMesh.getScene().defaultMaterial;
4129
4129
  if (material instanceof core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.MultiMaterial) {
4130
4130
  for (var _a = 0, _b = material.subMaterials; _a < _b.length; _a++) {
4131
4131
  var subMaterial = _b[_a];