Browse Source

whats new

Trevor Baron 6 năm trước cách đây
mục cha
commit
d13d07e051

+ 1 - 0
dist/preview release/what's new.md

@@ -107,6 +107,7 @@
 - TransformNode lookAt not working in world space when node's parent has rotation ([TrevorDev](https://github.com/TrevorDev))
 - MakeNotPickableAndWrapInBoundingBox had unexpected behavior when input had scaling of 0 on an axis ([TrevorDev](https://github.com/TrevorDev))
 - Fixed an issue with loading base64 encoded images in the glTF loader ([bghgary](https://github.com/bghgary))
+- In multi-camera scenes the inspector would cause the camera's interaction events to get detached ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 - Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))

+ 5 - 6
inspector/src/tools.ts

@@ -22,17 +22,16 @@ export class Tools {
         }
 
         const finalArray = new Array<any>();
-        items.forEach((i:any)=>{
+        items.forEach((i: any) => {
             // If the mesh is hidden, add it's children, this will handle the case of bounding box parenting for bounding box gizmo
-            if(i.reservedDataStore && i.reservedDataStore.hidden){
-                i.getChildMeshes().forEach((m:any) => {
+            if (i.reservedDataStore && i.reservedDataStore.hidden) {
+                i.getChildMeshes().forEach((m: any) => {
                     finalArray.push(m);
                 });
-            }else{
+            }else {
                 finalArray.push(i);
             }
-        })
-
+        });
 
         if (parent && parent.reservedDataStore && parent.reservedDataStore.detachedChildren) {
             finalArray.push(...parent.reservedDataStore.detachedChildren);

+ 1 - 1
src/Gizmos/babylon.boundingBoxGizmo.ts

@@ -517,7 +517,7 @@ module BABYLON {
             mesh.position.copyFrom(oldPos);
 
             // Reverse parenting
-            mesh.removeChild(box);            
+            mesh.removeChild(box);
 
             box.addChild(mesh);
             box.visibility = 0;

+ 4 - 4
src/Rendering/babylon.utilityLayerRenderer.ts

@@ -82,13 +82,13 @@ module BABYLON {
             this.utilityLayerScene.useRightHandedSystem = originalScene.useRightHandedSystem;
             this.utilityLayerScene._allowPostProcessClearColor = false;
             originalScene.getEngine().scenes.pop();
-            
+
             // Detach controls on utility scene, events will be fired by logic below to handle picking priority
             this.utilityLayerScene.detachControl();
 
             if (handleEvents) {
                 this._originalPointerObserver = originalScene.onPrePointerObservable.add((prePointerInfo, eventState) => {
-                    if(!this.utilityLayerScene.activeCamera){
+                    if (!this.utilityLayerScene.activeCamera) {
                         return;
                     }
                     if (!this.processAllEvents) {
@@ -256,9 +256,9 @@ module BABYLON {
         }
 
         private _updateCamera() {
-            if(this.originalScene.activeCameras.length > 1){
+            if (this.originalScene.activeCameras.length > 1) {
                 this.utilityLayerScene.activeCamera = this.originalScene.activeCameras[0];
-            }else{
+            }else {
                 this.utilityLayerScene.activeCamera = this.originalScene.activeCamera;
             }
         }