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.
- package/babylon.glTF2Serializer.js +5 -5
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.js +5 -5
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +2 -1
- package/package.json +3 -3
package/babylonjs.serializers.js
CHANGED
|
@@ -2758,7 +2758,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2758
2758
|
|
|
2759
2759
|
|
|
2760
2760
|
|
|
2761
|
-
|
|
2762
2761
|
/**
|
|
2763
2762
|
* Converts Babylon Scene into glTF 2.0.
|
|
2764
2763
|
* @hidden
|
|
@@ -3755,8 +3754,8 @@ var _Exporter = /** @class */ (function () {
|
|
|
3755
3754
|
if (!babylonCamera.position.equalsToFloats(0, 0, 0)) {
|
|
3756
3755
|
node.translation = convertToRightHandedSystem ? _glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._GetRightHandedPositionVector3(babylonCamera.position).asArray() : babylonCamera.position.asArray();
|
|
3757
3756
|
}
|
|
3758
|
-
var rotationQuaternion = babylonCamera.
|
|
3759
|
-
if (!core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Quaternion.IsIdentity(rotationQuaternion)) {
|
|
3757
|
+
var rotationQuaternion = babylonCamera.rotationQuaternion; // we target the local transformation if one.
|
|
3758
|
+
if (rotationQuaternion && !core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Quaternion.IsIdentity(rotationQuaternion)) {
|
|
3760
3759
|
if (convertToRightHandedSystem) {
|
|
3761
3760
|
_glTFUtilities__WEBPACK_IMPORTED_MODULE_3__._GLTFUtilities._GetRightHandedQuaternionFromRef(rotationQuaternion);
|
|
3762
3761
|
}
|
|
@@ -4330,8 +4329,9 @@ var _Exporter = /** @class */ (function () {
|
|
|
4330
4329
|
var babylonNode = nodes_2[_i];
|
|
4331
4330
|
if (!this._options.shouldExportNode || this._options.shouldExportNode(babylonNode)) {
|
|
4332
4331
|
exportNodes.push(babylonNode);
|
|
4333
|
-
|
|
4334
|
-
|
|
4332
|
+
var babylonMesh = babylonNode;
|
|
4333
|
+
if (babylonMesh.subMeshes && babylonMesh.subMeshes.length > 0) {
|
|
4334
|
+
var material = babylonMesh.material || babylonMesh.getScene().defaultMaterial;
|
|
4335
4335
|
if (material instanceof core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.MultiMaterial) {
|
|
4336
4336
|
for (var _a = 0, _b = material.subMaterials; _a < _b.length; _a++) {
|
|
4337
4337
|
var subMaterial = _b[_a];
|