Skip to content

Commit

Permalink
docs(cookbook): correct complete code examples (Tresjs#582)
Browse files Browse the repository at this point in the history
* docs(cookbook): correct complete code examples

* docs(cookbook): `trej`
  • Loading branch information
alvarosabu authored Mar 8, 2024
1 parent b702e3b commit b04e4aa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
13 changes: 10 additions & 3 deletions docs/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ const { camera, renderer } = useTresContext()
</template>
```

```vue [App.vue]
```vue [App.vue] {3,12}
<script setup lang="ts">
import { OrbitControls } from './OrbitControls.vue'
import { TresCanvas } from '@tresjs/core'
import OrbitControls from './OrbitControls.vue'
</script>
<template>
Expand All @@ -97,6 +98,7 @@ import { OrbitControls } from './OrbitControls.vue'
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<OrbitControls />
<TresGridHelper :args="[10, 10]" />
</TresCanvas>
</template>
```
Expand All @@ -111,7 +113,12 @@ The `cientos` package provides a component called `<OrbitControls />` which is a
The nicest part? You don't need to extend the catalog or pass any arguments.
It just works. 💯

```vue
```vue {3,12}
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
</script>
<template>
<TresCanvas
shadows
Expand Down
13 changes: 10 additions & 3 deletions docs/de/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ const { camera, renderer } = useTresContext()
</template>
```

```vue [App.vue]
```vue [App.vue] {3,12}
<script setup lang="ts">
import { OrbitControls } from './OrbitControls.vue'
import { TresCanvas } from '@tresjs/core'
import OrbitControls from './OrbitControls.vue'
</script>
<template>
Expand All @@ -95,6 +96,7 @@ import { OrbitControls } from './OrbitControls.vue'
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<OrbitControls />
<TresGridHelper :args="[10, 10]" />
</TresCanvas>
</template>
```
Expand All @@ -109,7 +111,12 @@ Das Paket `cientos` bietet eine Komponente namens `<OrbitControls />`, die ein W
Das Beste daran? Du musst den Katalog nicht erweitern oder irgendwelche Argumente übergeben.
Es funktioniert einfach. 💯

```vue
```vue {3,12}
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
</script>
<template>
<TresCanvas
shadows
Expand Down
13 changes: 10 additions & 3 deletions docs/es/cookbook/orbit-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ const { camera, renderer } = useTresContext()
</template>
```

```vue [App.vue]
```vue [App.vue] {3,12}
<script setup lang="ts">
import { OrbitControls } from './OrbitControls.vue'
import { TresCanvas } from '@tresjs/core'
import OrbitControls from './OrbitControls.vue'
</script>
<template>
Expand All @@ -97,6 +98,7 @@ import { OrbitControls } from './OrbitControls.vue'
>
<TresPerspectiveCamera :args="[45, 1, 0.1, 1000]" />
<OrbitControls />
<TresGridHelper :args="[10, 10]" />
</TresCanvas>
</template>
```
Expand All @@ -111,7 +113,12 @@ El paquete `cientos` proporciona un componente llamado `<OrbitControls />` que e
¿Lo mejor? No necesitas ampliar el catálogo ni pasar ningún argumento.
Simplemente funciona. 💯

```vue
```vue {3,12}
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
</script>
<template>
<TresCanvas
shadows
Expand Down

0 comments on commit b04e4aa

Please sign in to comment.