Ver código fonte

do not attach the same mesh twice in gizmo manager

Trevor Baron 7 anos atrás
pai
commit
06dc152933

+ 3 - 1
src/Gizmos/babylon.gizmoManager.ts

@@ -64,7 +64,9 @@ module BABYLON {
                             }
                             }
                         }
                         }
                         if(node instanceof AbstractMesh){
                         if(node instanceof AbstractMesh){
-                            this.attachToMesh(node);
+                            if(this._attachedMesh != node){
+                                this.attachToMesh(node);
+                            }
                         }else{
                         }else{
                             this.attachToMesh(null);
                             this.attachToMesh(null);
                         }
                         }

+ 1 - 1
tests/validation/config.json

@@ -3,7 +3,7 @@
   "tests": [
   "tests": [
     {
     {
       "title": "Simulate pointer",
       "title": "Simulate pointer",
-      "playgroundId": "#8MGKWK#66",
+      "playgroundId": "#8MGKWK#78",
       "referenceImage": "simulatePointer.png",
       "referenceImage": "simulatePointer.png",
       "excludeFromAutomaticTesting": true
       "excludeFromAutomaticTesting": true
     },
     },