Skip to content

Commit

Permalink
chore(docs): Updated delta definition in onLoop documentation to matc…
Browse files Browse the repository at this point in the history
…h source (#752)

Co-authored-by: Alvaro Saburido <[email protected]>
  • Loading branch information
nart4hire and alvarosabu authored Jul 3, 2024
1 parent f09367b commit 0d2767f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/composables.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ onBeforeRender(() => {

All callbacks receive an object with the following properties:

- `delta`: The delta time between the current and the last frame. This is the time in miliseconds since the last frame.
- `delta`: The delta time between the current and the last frame. This is the time in seconds since the last frame.
- `elapsed`: The elapsed time since the start of the render loop.
- `clock`: The [THREE clock](https://threejs.org/docs/?q=clock#api/en/core/Clock) instance.
- `renderer`: The [WebGLRenderer](https://threejs.org/docs/#api/en/renderers/WebGLRenderer) of your scene.
Expand Down Expand Up @@ -359,7 +359,7 @@ Be mindful of the performance implications of using this composable. It will run

The `onLoop` callback receives an object with the following properties based on the [THREE clock](https://threejs.org/docs/?q=clock#api/en/core/Clock):

- `delta`: The delta time between the current and the last frame. This is the time in milliseconds since the last frame.
- `delta`: The delta time between the current and the last frame. This is the time in seconds since the last frame.
- `elapsed`: The elapsed time since the start of the render loop.

This composable is based on `useRafFn` from [vueuse](https://vueuse.org/core/useRafFn/). Thanks to [@wheatjs](https://github.com/wheatjs) for the amazing contribution.
Expand Down

0 comments on commit 0d2767f

Please sign in to comment.