Browse Source

fix: update elapsed time retrieval in useCreateRafLoop to use the latest clock property (#1046)

Tino Koch 1 week ago
parent
commit
1b3971c27c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/composables/useCreateRafLoop/index.ts

+ 1 - 1
src/composables/useCreateRafLoop/index.ts

@@ -17,7 +17,7 @@ export const useCreateRafLoop = (cycleFn: () => void) => {
   const { pause, resume, isActive } = useRafFn(() => {
     const getContextWithClock = (): RafLoopContext => ({
       delta: clock.getDelta(),
-      elapsed: clock.getElapsedTime(),
+      elapsed: clock.elapsedTime,
     })
 
     eventHooks.before.trigger(getContextWithClock())