Skip to content

Commit

Permalink
chore: correct typos and PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Jan 22, 2024
1 parent 628a38f commit f196a38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/advanced/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ You can do that by setting the `renderMode` prop to `on-demand` or `manual`:

#### Automatic Invalidation

When using `render-mode="on-demand"`, Tres.js will automatically invalidate the current frame by observing component props and lyfecycle hooks like `onMounted` and `onUnmounted`. It will also invalidate the frame when resizing the window or change any prop from the `<TresCanvas>` component like `clearColor` or `antialias`.
When using `render-mode="on-demand"`, Tres.js will automatically invalidate the current frame by observing component props and lifecycle hooks like `onMounted` and `onUnmounted`. It will also invalidate the frame when resizing the window or changing any prop from the `<TresCanvas>` component like `clearColor` or `antialias`.

This will trigger a new render:
The code below updates TresMesh's position-x prop every second, triggering a new render.

```vue
<script setup>
Expand All @@ -59,7 +59,7 @@ setTimeout(() => {

#### Manual Invalidation

Since is not really possible to observe all the possible changes in your application, you can also manually invalidate the frame by calling the `invalidate()` method from the [`useTresContext` composable](../api/composables.md#usetrescontext):
Since it is not really possible to observe all the possible changes in your application, you can also manually invalidate the frame by calling the `invalidate()` method from the [`useTresContext` composable](../api/composables.md#usetrescontext):


::: code-group
Expand Down

0 comments on commit f196a38

Please sign in to comment.