Explorar o código

docs: added scene to text 3d at core docs

Alvaro %!s(int64=2) %!d(string=hai) anos
pai
achega
47b33a8954

+ 1 - 8
docs/.vitepress/theme/components/FirstScene.vue

@@ -16,14 +16,7 @@ onMounted(() => {
 </script>
 
 <template>
-  <TresCanvas
-    clear-color="#82DBC5"
-    shadows
-    alpha
-    physically-correct-lights
-    :output-encoding="sRGBEncoding"
-    :tone-mapping="ACESFilmicToneMapping"
-  >
+  <TresCanvas clear-color="#82DBC5" shadows alpha physically-correct-lights :output-encoding="sRGBEncoding">
     <OrbitControls />
     <TresPerspectiveCamera :position="[11, 11, 11]" :fov="45" :aspect="1" :near="0.1" :far="1000" />
     <TresScene>

+ 13 - 13
docs/examples/text-3d.md

@@ -1,9 +1,9 @@
 # Text3D
 
-<!-- <StackBlitzEmbed projectId="tresjs-orbit-controls" /> -->
-
 [TextGeometry](https://threejs.org/docs/index.html?q=text#examples/en/geometries/TextGeometry) is one of the ways we can add 3D text in our scene.
 
+<StackBlitzEmbed projectId="tresjs-text3d-cientos" />
+
 However, it is not part of the core of ThreeJS. So to use it you would need to import it from the `three/examples/jsm/controls/TextGeometry` module.
 
 This creates a problem because **TresJS** automatically creates a catalog of the core of Three so you can use them as components.
@@ -156,25 +156,25 @@ It just works. 💯 (if not text is provided, the text will be TresJS)
 
 We can pass the options as props
 
-```js
-      <Text3D :font="fontPath" :text="my 3d text" :size="0.8" />
+```html
+<Text3D :font="fontPath" :text="my 3d text" :size="0.8" />
 ```
 
 in case the options are not provided the default values are:
 
 ```js
-    size: 0.5,
-    height: 0.2,
-    curveSegments: 5,
-    bevelEnabled: true,
-    bevelThickness: 0.05,
-    bevelSize: 0.02,
-    bevelOffset: 0,
-    bevelSegments: 4,
+size: 0.5,
+height: 0.2,
+curveSegments: 5,
+bevelEnabled: true,
+bevelThickness: 0.05,
+bevelSize: 0.02,
+bevelOffset: 0,
+bevelSegments: 4,
 ```
 
 By default text in ThreeJS starts at the mesh initial position, so it's [0,0,0] the text will start there but we can center it by just passing the flag "center"
 
 ```js
-      <Text3D :font="fontPath" :text="my 3d text" center  />
+<Text3D :font="fontPath" :text="my 3d text" center  />
 ```

+ 1 - 0
docs/guide/index.md

@@ -3,6 +3,7 @@
 <ClientOnly>
     <FirstScene style="aspect-ratio: 16/9; height: auto; margin: 2rem 0; border-radius: 8px; overflow:hidden;"/>
 </ClientOnly>
+
 ```
 npm install three @tresjs/core -D
 ```