Skip to content

Commit 1004b9b

Browse files
committed
docs: translated guides to spanish
1 parent c4c6181 commit 1004b9b

File tree

6 files changed

+131
-126
lines changed

6 files changed

+131
-126
lines changed

docs/es/guide/getting-started.md

+20-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Installation
1+
# Instalación
22

3-
Learn how to install TresJS
3+
Aprende cómo instalar TresJS
44

55
::: code-group
66

@@ -18,11 +18,11 @@ yarn add three @tresjs/core
1818

1919
:::
2020

21-
> Better use with Vue 3.x and composition API
21+
> Mejor usar con Vue 3.x y Composition API
2222
2323
## Typescript
2424

25-
TresJS is written in Typescript and it's fully typed. If you are using Typescript, you will get the full benefit of the typings. Just make sure you install the types for three.
25+
TresJS está escrito en Typescript y está completamente tipado. Si estás utilizando Typescript, obtendrás todos los beneficios de los tipos. Solo asegúrate de instalar los tipos para three.
2626

2727
::: code-group
2828

@@ -40,28 +40,28 @@ pnpm add @types/three -D
4040

4141
:::
4242

43-
## Getting started
43+
## Empezando
4444

45-
You can install TresJS as any other Vue plugin
45+
Puedes instalar TresJS como cualquier otro complemento de Vue
4646

4747
```ts
4848
import { createApp } from 'vue'
49-
import App from './App.vue'
50-
5149
import Tres from '@tresjs/core'
50+
import App from './App.vue'
5251

5352
export const app = createApp(App)
5453

5554
app.use(Tres)
5655
app.mount('#app')
5756
```
5857

59-
Or you can use it directly in your component
58+
O puedes usarlo directamente en tu componente
6059

6160
```vue
6261
<script setup lang="ts">
6362
import { TresCanvas } from '@tresjs/core'
6463
</script>
64+
6565
<template>
6666
<TresCanvas>
6767
<!-- Your scene here -->
@@ -70,23 +70,24 @@ import { TresCanvas } from '@tresjs/core'
7070
```
7171

7272
::: tip
73-
This is recommended for performance and bundle size reasons, tree-shaking will work better and you will only import the components that you use.
73+
Esto es recomendado por razones de rendimiento y tamaño del paquete, el tree-shaking funcionará mejor y solo importarás los componentes que uses.
7474
:::
7575

7676
## Vite
7777

78-
Since v2 is a custom renderer, we need to let the `vue-compiler` of your app know that the components of Tres are ok to be included to avoid the `[Vue warn]: Failed to resolve component` warning.
78+
Dado que la versión 2 es un renderizador personalizado, necesitamos informar al `vue-compiler` de tu aplicación que los componentes de Tres están permitidos para ser incluidos y evitar la advertencia `[Vue warn]: Failed to resolve component`.
7979

80-
You just need to add this to your `vite.config.ts` inside of the vue plugin:
80+
Solo necesitas agregar esto a tu archivo `vite.config.ts` dentro del plugin de Vue:
8181

8282
```ts
83+
import { templateCompilerOptions } from '@tresjs/core'
84+
8385
export default defineConfig({
84-
plugins: [vue({
85-
template: {
86-
compilerOptions: {
87-
isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',
88-
},
89-
},
90-
}),
86+
plugins: [
87+
vue({
88+
// Other config
89+
...templateCompilerOptions
90+
}),
91+
]
9192
})
9293
```

docs/es/guide/index.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Introduction
1+
# Introduccion
22

33
<ClientOnly>
44
<div style="aspect-ratio: 16/9; height: auto; margin: 2rem 0; border-radius: 8px; overflow:hidden;">
@@ -24,7 +24,7 @@ pnpm add @tresjs/core three
2424

2525
## Typescript
2626

27-
TresJS is written in Typescript and it's fully typed. If you are using Typescript, you will get the full benefit of the typings. Just make sure you install the types for three.
27+
TresJS está escrito en Typescript y está completamente tipado. Si estás utilizando Typescript, obtendrás todos los beneficios de los tipos. Solo asegúrate de instalar los tipos para three.
2828

2929
::: code-group
3030

@@ -44,7 +44,7 @@ pnpm add @types/three -D
4444

4545
## Vite
4646

47-
If you are using Vite, you have add the following to your `vite.config.ts`:
47+
Si estás utilizando Vite, debes agregar lo siguiente a tu `vite.config.ts`:
4848

4949
```ts
5050
import { templateCompilerOptions } from '@tresjs/core'
@@ -59,39 +59,39 @@ export default defineConfig({
5959
}),
6060
```
6161

62-
This is required to make the template compiler work with the custom renderer and not throw warnings on the console. For more info check [here](/guide/troubleshooting.html).
62+
Esto es necesario para que el compilador de plantillas funcione con el renderizador personalizado y no lance advertencias en la consola. Para obtener más información, consulta [aquí](/guide/troubleshooting.html).
6363

64-
## Try it online
64+
## Pruébalo en línea
6565

6666
### Sandbox
6767

68-
You can try TresJS online using the official [sandbox](https://play.tresjs.org/). Check it out:
68+
Puedes probar TresJS en línea utilizando el [sandbox](https://play.tresjs.org/) oficial. ¡Échale un vistazo:
6969

7070
<iframe src="https://play.tresjs.org/" class="w-full rounded shadow-lg outline-none border-none aspect-4/3"></iframe>
7171

7272
### StackBlitz
7373

74-
We have a brand new [StackBlitz](https://stackblitz.com/) starter to try TresJS online. Check it out:
74+
Tenemos un nuevo inicio de [StackBlitz](https://stackblitz.com/) para probar TresJS en línea. ¡Échale un vistazo:
7575

7676
![](/stackblitz-starter.png)
7777

7878
<StackBlitzEmbed projectId="tresjs-basic" />
7979

8080
## Playground
8181

82-
We also have a playground where you can try TresJS online. Check it out [here](https://playground.tresjs.org/).
82+
También tenemos un playground donde puedes probar TresJS en línea. Échale un vistazo [aquí](https://playground.tresjs.org/).
8383

8484
![](/playground.png)
8585

86-
## Motivation
86+
## Motivación
8787

88-
[ThreeJS](https://threejs.org/) is a wonderful library to create awesome **WebGL** 3D websites. Is also a constantly updated library that makes hard for wrapper maintainers like [TroisJS](https://troisjs.github.io/) to keep up with all the enhancements.
88+
[ThreeJS](https://threejs.org/) es una maravillosa biblioteca para crear increíbles sitios web 3D con WebGL. También es una biblioteca constantemente actualizada que dificulta a los mantenedores de envoltorios como [TroisJS](https://troisjs.github.io/) mantenerse al día con todas las mejoras.
8989

90-
React ecosystem has an impresive **custom render** solution called [React-three-fiber](https://docs.pmnd.rs/react-three-fiber) that allows you build your scenes declaratively with re-usable, self-contained components that react to state.
90+
El ecosistema de React tiene una solución impresionante de **renderizado personalizado** llamada [React-three-fiber](https://docs.pmnd.rs/react-three-fiber) que te permite construir tus escenas de forma declarativa con componentes reutilizables y autocontenidos que reaccionan al estado.
9191

92-
In my search for something similar in the VueJS ecosystem, I found this amazing library called [Lunchbox](https://github.com/breakfast-studio/lunchboxjs) which works with the same concept that R3F, it provides a [custom Vue3 Renderer](https://vuejs.org/api/custom-renderer.html). I'm also contributing to improve this library so it gets as mature and feature-rich as R3F.
92+
En mi búsqueda de algo similar en el ecosistema de VueJS, encontré esta increíble biblioteca llamada [Lunchbox](https://github.com/breakfast-studio/lunchboxjs) que funciona con el mismo concepto que R3F, proporciona un [renderizador personalizado de Vue3](https://vuejs.org/api/custom-renderer.html). También estoy contribuyendo para mejorar esta biblioteca y que sea tan madura y rica en características como R3F.
9393

94-
The only problem is, mixing compilers renderers in Vue 3 is something the Vue community is still working on - see [here](https://github.com/vuejs/vue-loader/pull/1645) for more information.
94+
El único problema es que mezclar compiladores y renderizadores en Vue 3 es algo en lo que la comunidad de Vue todavía está trabajando. Puedes ver más información [aquí](https://github.com/vuejs/vue-loader/pull/1645).
9595

9696
```ts
9797
// Example Vite setup
@@ -110,5 +110,5 @@ const lunchboxApp = createLunchboxApp(LunchboxApp)
110110
lunchboxApp.mount('#lunchbox')
111111
```
112112

113-
So I was inspired by both libraries to create a Vue custom renderer for ThreeJS. That's **TresJS v2**.
113+
Así que me inspiré en ambas bibliotecas para crear un renderizador personalizado de Vue para ThreeJS. Eso es **TresJS v2**.
114114

0 commit comments

Comments
 (0)