Skip to content

Commit 8d94483

Browse files
committed
docs: translation for your first scene
1 parent 1004b9b commit 8d94483

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

docs/es/guide/your-first-scene.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Your first scene
1+
# Tu primera escena
22

3-
This guide will help you to create your first Tres scene. 🍩
3+
Esta guía te ayudará a crear tu primera escena en Tres. 🍩
44

55
<ClientOnly>
66
<div style="aspect-ratio: 16/9; height: auto; margin: 2rem 0; border-radius: 8px; overflow:hidden;">
77
<DonutExample />
88
</div>
99
</ClientOnly>
1010

11-
## Setting up the experience Canvas
11+
## Configurando el Canvas
1212

13-
Before we can create a Scene, we need somewhere to display it. Using plain [ThreeJS](https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene) we would need to create a `canvas` HTML element to mount the `WebglRenderer` and initialize the `scene`
13+
Antes de poder crear una escena, necesitamos un lugar donde mostrarla. Usando solo [ThreeJS](https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene), tendríamos que crear un elemento HTML `canvas` para montar el `WebglRenderer` e inicializar la `scene`.
1414

15-
With **TresJS** you only need to import the default component `<TresCanvas />` and add it to the template of your Vue component.
15+
Con **TresJS**, solo necesitas importar el componente predeterminado `<TresCanvas />` y agregarlo al template de tu componente Vue.
1616

1717
```vue
1818
<script lang="ts" setup>
@@ -27,17 +27,17 @@ import { TresCanvas } from '@tresjs/core'
2727
```
2828

2929
::: warning
30-
It's important that all components related to the scene live between the `<TresCanvas />` component. Otherwise, they will be not rendered.
30+
Es importante que todos los componentes relacionados con la escena estén dentro del componente `<TresCanvas />`. De lo contrario, no se renderizarán.
3131
:::
3232

33-
The `TresCanvas` component is going to do some setup work behind the scene:
33+
El componente `TresCanvas` realizará algunas configuraciones detrás de escena:
3434

35-
- It creates a [**WebGLRenderer**](https://threejs.org/docs/index.html?q=webglrend#api/en/renderers/WebGLRenderer) that automatically updates every frame.
36-
- It sets the render loop to be called on every frame based on the browser refresh rate.
35+
- Crea un [**WebGLRenderer**](https://threejs.org/docs/index.html?q=webglrend#api/en/renderers/WebGLRenderer) que se actualiza automáticamente en cada fotograma.
36+
- Establece el bucle de renderizado para que se llame en cada fotograma en función de la frecuencia de actualización del navegador.
3737

38-
## Canvas size
38+
## Tamaño del lienzo
3939

40-
By default, `TresCanvas` component will take the **parent's width and height**, if you are experiencing a blank page make sure the parent element has a proper size.
40+
De forma predeterminada, el componente `TresCanvas` tomará el **ancho y alto del elemento padre**. Si estás experimentando una página en blanco, asegúrate de que el elemento padre tenga un tamaño adecuado.
4141

4242
```vue
4343
<script lang="ts" setup>
@@ -65,7 +65,7 @@ body {
6565
</style>
6666
```
6767

68-
If your scene is not gonna be part of a UI, you can also force the canvas to take the width and height of the full window by using the `window-size` prop like this:
68+
Si tu escena no va a formar parte de una interfaz de usuario, también puedes hacer que el lienzo ocupe el ancho y alto de toda la ventana utilizando la propiedad `window-size` de la siguiente manera:
6969

7070
```vue
7171
<script lang="ts" setup>
@@ -79,21 +79,21 @@ import { TresCanvas } from '@tresjs/core'
7979
</template>
8080
```
8181

82-
## Creating a scene
82+
## Creando una escena
8383

84-
We need 4 core elements to create a 3D experience:
84+
Necesitamos 4 elementos principales para crear una experiencia en 3D:
8585

86-
- A [**Scene**](https://threejs.org/docs/index.html?q=scene#api/en/scenes/Scene) to hold the camera and the object(s) together.
87-
- A [**Renderer**](https://threejs.org/docs/index.html?q=renderer#api/en/renderers/WebGLRenderer) to render the scene into the DOM.
88-
- A [**Camera**](https://threejs.org/docs/index.html?q=camera#api/en/cameras/Camera)
89-
- An [**Object**](https://threejs.org/docs/index.html?q=object#api/en/core/Object3D)
86+
- Una [**Escena**](https://threejs.org/docs/index.html?q=scene#api/en/scenes/Scene) para contener la cámara y el/los objetos juntos.
87+
- Un [**Renderizador**](https://threejs.org/docs/index.html?q=renderer#api/en/renderers/WebGLRenderer) para renderizar la escena en el DOM.
88+
- Una [**Cámara**](https://threejs.org/docs/index.html?q=camera#api/en/cameras/Camera)
89+
- Un [**Objeto**](https://threejs.org/docs/index.html?q=object#api/en/core/Object3D)
9090

91-
With **TresJS** you only need to add the `<TresCanvas />` component to the template of your Vue component and it will automatically create a `Renderer` (`canvas` DOM Element) and `Scene` for you.
91+
Con **TresJS**, solo necesitas agregar el componente `<TresCanvas />` al template de tu componente Vue y automáticamente creará un `Renderizador` (elemento DOM `canvas`) y una `Escena` para ti.
9292

9393
```vue
9494
<template>
9595
<TresCanvas window-size>
96-
<!-- Your scene goes here -->
96+
<!-- Tu escena vive aqui -->
9797
</TresCanvas>
9898
</template>
9999
```
@@ -109,12 +109,12 @@ Then you can add a [**PerspectiveCamera**](https://threejs.org/docs/index.html?q
109109
```
110110

111111
::: warning
112-
A common issue is that the camera default position is the origin of the scene (0,0,0), TresJS will automatically set the position of your camera to `[3,3,3]` if the prop `position`. If no camera is defined in you scene, a perspective camera is added automatically.`
112+
Un problema común es que la posición predeterminada de la cámara es el origen de la escena (0,0,0). TresJS establecerá automáticamente la posición de tu cámara en `[3,3,3]` si la propiedad `position` no está definida. Si no se define ninguna cámara en tu escena, se agregará automáticamente una cámara de perspectiva.
113113
:::
114114

115-
## Adding a 🍩
115+
## Agregando un 🍩
116116

117-
That scene looks a little empty, let's add a basic object. If we were using plain **ThreeJS** we would need to create a [**Mesh**](https://threejs.org/docs/index.html?q=mesh#api/en/objects/Mesh) object and attach to it a [**Material**](https://threejs.org/docs/index.html?q=material#api/en/materials/Material) and a [**Geometry**](https://threejs.org/docs/index.html?q=geometry#api/en/core/BufferGeometry) like this:
117+
Esa escena se ve un poco vacía, vamos a agregar un objeto básico. Si estuviéramos usando **ThreeJS** puro, necesitaríamos crear un objeto [**Mesh**](https://threejs.org/docs/index.html?q=mesh#api/en/objects/Mesh) y adjuntarle un [**Material**](https://threejs.org/docs/index.html?q=material#api/en/materials/Material) y una [**Geometry**](https://threejs.org/docs/index.html?q=geometry#api/en/core/BufferGeometry) de la siguiente manera:
118118

119119
```ts
120120
const geometry = new THREE.TorusGeometry(1, 0.5, 16, 32)
@@ -123,9 +123,9 @@ const donut = new THREE.Mesh(geometry, material)
123123
scene.add(donut)
124124
```
125125

126-
A **Mesh** is a basic scene object in three.js, and it's used to hold the geometry and the material needed to represent a shape in 3D space.
126+
Un **Mesh** es un objeto básico de la escena en three.js, y se utiliza para contener la geometría y el material necesarios para representar una forma en el espacio 3D.
127127

128-
Now let's see how we can easily achieve the same with **TresJS**. To do that we are going to use `<TresMesh />` component, and between the default slots, we are going to pass a `<TresTorusGeometry />` and a `<TresMeshBasicMaterial />`.
128+
Ahora veamos cómo podemos lograr lo mismo fácilmente con **TresJS**. Para hacer eso, vamos a usar el componente `<TresMesh />` y entre los slots predeterminados, vamos a pasar un `<TresTorusGeometry />` y un `<TresMeshBasicMaterial />`.
129129

130130
```vue
131131
<template>
@@ -140,7 +140,7 @@ Now let's see how we can easily achieve the same with **TresJS**. To do that we
140140
```
141141

142142
::: info
143-
Notice that we don't need to import anything, that's because **TresJS** automatically generate a **Vue Component based on the Three Object you want to use in CamelCase with a Tres prefix**. For example, if you want to use an `AmbientLight` you would use `<TresAmbientLight />` component.
143+
Observa que no necesitamos importar nada, esto se debe a que **TresJS** genera automáticamente un **Componente Vue basado en el objeto Three que deseas usar en CamelCase con un prefijo Tres**. Por ejemplo, si quieres usar una `AmbientLight`, puedes usar el componente `<TresAmbientLight />`.
144144
:::
145145

146146

@@ -168,6 +168,6 @@ import { TresCanvas } from '@tresjs/core'
168168
</template>
169169
```
170170

171-
From here onwards you can start adding more objects to your scene and start playing with the properties of the components to see how they affect the scene.
171+
A partir de aquí puedes comenzar a agregar más objetos a tu escena y jugar con las propiedades de los componentes para ver cómo afectan la escena.
172172

173173
<SandboxDemo url="https://play.tresjs.org/#eNqVVMtu2kAU/ZWRu8iiYIcQoojSikCjqlXTRi27OIuJfYGBeWlmzKOIf+8d2zhD2kZU8oI5955z3+yiiQF7o3W8KiDqRwObGaYdseAKTTiVs/dp5GwafUglE1oZR3bEU8ZUrqglezI1SpCzoUNsYZNMGTh7l8pBUgkhDR8OhObUAb4IGQT0jAM17UxxZTDOm+uLj6NxL43ImslcrduW/ao4NesejNWQObaCMRVgaGUjpK+VZY4piSoP3Rbx32MaNeapWqHlEqUbiCu1bFPnCect4r+GkIQx78DO63eNTJQp7CdQApzZkj41M+tVOigR91qkc4XBL1Cs0QmURtSy7A5bYRjl5FC4MthoCBiD5EXoUuBGPDGQ7iubzR3pM+lAYtVbFOg03IpZtReBQRL0PmpF1Qzbgup4YZXEie88K60NOOg+KRGPhUP1hjSaO6dtP0myXCI/B85WJpbgEqlFEroPu3EvPk9yZl3iYfROo9Yfwr4cVQY9VbtioPxVKF/Dx1HcGuhSU3lK7o3v8DI+jzu18gGMBfOcUHtu4CRd7zdExd415vsWrAjbgDdXWDi5v4H7sIO7hop4J7CJxXF3az87pwby/xCuCK9Jo2M7B8FOED24+uIv46uEs6dQ0ivuU7nHnXQ2U3LKZi82MlNCMw7mu/aHfbyZlHO1/lJizhTQ5JfNIVv+BV/YTZXyPS4LmBW2+3mUeMDgKvPtz2+wwd+NUai84PVw/mH8AVbxwudYuY0KmWPagV+Z7efywJicTeztprzcuqijRN1WQ4k+HP46ml2rgMeycaV/OY7xK116rqwbd5uG738DogXwDg==" />

0 commit comments

Comments
 (0)