Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cookbook): Fix the OrbitControls code throws in the docs. #635

Merged
merged 5 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/de/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Da [OrbitControls](https://threejs.org/docs/index.html?q=orbit#examples/en/contr
```ts
import { useTres } from '@tresjs/core'

const { state } = useTres()
const { camera, renderer } = useTres()
```

Dann würde der finale Code etwa so aussehen:
Expand Down Expand Up @@ -100,6 +100,7 @@ import OrbitControls from './OrbitControls.vue'
</TresCanvas>
</template>
```

:::

## OrbitControls von `cientos`
Expand Down
12 changes: 6 additions & 6 deletions docs/fr/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Vous pouvez maintenant utiliser le composant `TresOrbitControls` dans votre scè
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<TresOrbitControls
v-if="state.renderer"
:args="[state.camera, state.renderer?.domElement]"
v-if="renderer"
:args="[camera, renderer?.domElement]"
/>
</TresCanvas>
</template>
Expand All @@ -61,7 +61,7 @@ Vous pouvez utiliser le composable [useTres](/api/composables#usetres) pour obte
```ts
import { useTres } from '@tresjs/core'

const { state } = useTres()
const { camera, renderer } = useTres()
```

Le code final ressemblerait donc à ceci :
Expand All @@ -73,7 +73,7 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls'

extend({ OrbitControls })

const { state } = useTres()
const { camera, renderer } = useTres()
</script>

<template>
Expand All @@ -83,8 +83,8 @@ const { state } = useTres()
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<TresOrbitControls
v-if="state.renderer"
:args="[state.camera, state.renderer?.domElement]"
v-if="renderer"
:args="[camera, renderer?.domElement]"
/>
</TresCanvas>
</template>
Expand Down
12 changes: 6 additions & 6 deletions docs/zh/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ extend({ OrbitControls })
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<TresOrbitControls
v-if="state.renderer"
:args="[state.camera, state.renderer?.domElement]"
v-if="renderer"
:args="[camera, renderer?.domElement]"
/>
</TresCanvas>
</template>
Expand All @@ -61,7 +61,7 @@ extend({ OrbitControls })
```ts
import { useTres } from '@tresjs/core'

const { state } = useTres()
const { camera, renderer } = useTres()
```

因此,最终代码如下所示:
Expand All @@ -73,7 +73,7 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls'

extend({ OrbitControls })

const { state } = useTres()
const { camera, renderer } = useTres()
</script>

<template>
Expand All @@ -83,8 +83,8 @@ const { state } = useTres()
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<TresOrbitControls
v-if="state.renderer"
:args="[state.camera, state.renderer?.domElement]"
v-if="renderer"
:args="[camera, renderer?.domElement]"
/>
</TresCanvas>
</template>
Expand Down