@babylonjs/loaders 8.8.4 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js +1 -1
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +5 -1
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
- package/glTF/2.0/glTFLoader.js +3 -1
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/package.json +3 -3
package/glTF/2.0/glTFLoader.js
CHANGED
@@ -635,6 +635,9 @@ export class GLTFLoader {
|
|
635
635
|
const camera = ArrayItem.Get(`${context}/camera`, this._gltf.cameras, node.camera);
|
636
636
|
promises.push(this.loadCameraAsync(`/cameras/${camera.index}`, camera, (babylonCamera) => {
|
637
637
|
babylonCamera.parent = babylonTransformNode;
|
638
|
+
if (!this._babylonScene.useRightHandedSystem) {
|
639
|
+
babylonTransformNode.scaling.x = -1; // Cancelling root node scaling for handedness so the view matrix does not end up flipped.
|
640
|
+
}
|
638
641
|
}));
|
639
642
|
}
|
640
643
|
if (node.children) {
|
@@ -1219,7 +1222,6 @@ export class GLTFLoader {
|
|
1219
1222
|
const babylonCamera = new FreeCamera(camera.name || `camera${camera.index}`, Vector3.Zero(), this._babylonScene, false);
|
1220
1223
|
babylonCamera._parentContainer = this._assetContainer;
|
1221
1224
|
this._babylonScene._blockEntityCollection = false;
|
1222
|
-
babylonCamera.ignoreParentScaling = true;
|
1223
1225
|
camera._babylonCamera = babylonCamera;
|
1224
1226
|
// Rotation by 180 as glTF has a different convention than Babylon.
|
1225
1227
|
babylonCamera.rotation.set(0, Math.PI, 0);
|