Pārlūkot izejas kodu

do not attach the same mesh twice in gizmo manager

Trevor Baron 7 gadi atpakaļ
vecāks
revīzija
06dc152933
2 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 3 1
      src/Gizmos/babylon.gizmoManager.ts
  2. 1 1
      tests/validation/config.json

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

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

+ 1 - 1
tests/validation/config.json

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