Quellcode durchsuchen

refactor: update useLoop composable to replace raycaster with events

- Modified the `useLoop` composable to utilize `events` instead of `raycaster`, aligning with the recent changes in the Tres context structure.
- This change enhances the integration with the updated event system, ensuring better context handling during the rendering loop.
alvarosabu vor 3 Monaten
Ursprung
Commit
b974f4a042
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/composables/useLoop/index.ts

+ 2 - 2
src/composables/useLoop/index.ts

@@ -7,8 +7,8 @@ export function useLoop() {
     scene,
     renderer,
     loop,
-    raycaster,
     controls,
+    events,
   } = useTresContext()
 
   // Pass context to loop
@@ -16,8 +16,8 @@ export function useLoop() {
     camera,
     scene,
     renderer: renderer.instance,
-    raycaster,
     controls,
+    events,
   })
 
   function onBeforeRender(cb: LoopCallbackFn, index = 0) {