Răsfoiți Sursa

chore: cleaning code

Jaime A Torrealba C 2 ani în urmă
părinte
comite
fa12849efd
1 a modificat fișierele cu 1 adăugiri și 5 ștergeri
  1. 1 5
      src/components/TresScene.ts

+ 1 - 5
src/components/TresScene.ts

@@ -99,13 +99,13 @@ export const TresScene = defineComponent<TresSceneProps>({
             if (prevInstance === null) {
               currentInstance.object?.events?.onPointerEnter?.(currentInstance)
             }
+            currentInstance.object?.events?.onPointerMove?.(currentInstance)
           } else {
             if (prevInstance !== null) {
               currentInstance?.object?.events?.onPointerLeave?.(prevInstance)
               currentInstance = null
             }
           }
-
           prevInstance = currentInstance
         }
       })
@@ -114,10 +114,6 @@ export const TresScene = defineComponent<TresSceneProps>({
         if (currentInstance === null) return
         currentInstance.object?.events?.onClick?.(currentInstance)
       })
-      useEventListener(canvas.value, 'mousemove', () => {
-        if (currentInstance === null) return
-        currentInstance.object?.events?.onPointerMove?.(currentInstance)
-      })
     }
 
     let app: App