Ver código fonte

docs: api docs

alvarosabu 2 anos atrás
pai
commit
92e8ce934c
3 arquivos alterados com 18 adições e 20 exclusões
  1. 15 15
      docs/api/composables.md
  2. 1 1
      docs/api/events.md
  3. 2 4
      docs/api/renderer.md

+ 15 - 15
docs/api/composables.md

@@ -127,17 +127,19 @@ Then you can bind the textures to the material.
 
 
 ```vue
 ```vue
 <template>
 <template>
-  <TresMesh>
-    <TresMeshSphereGeometry />
-    <TresMeshStandardMaterial
-      :map="map"
-      :displacementMap="displacementMap"
-      :normalMap="normalMap"
-      :roughnessMap="roughnessMap"
-      :metalnessMap="metalnessMap"
-      :aoMap="aoMap"
-    />
-  </TresMesh>
+  <TresCanvas>
+    <TresMesh>
+      <TresMeshSphereGeometry />
+      <TresMeshStandardMaterial
+        :map="map"
+        :displacementMap="displacementMap"
+        :normalMap="normalMap"
+        :roughnessMap="roughnessMap"
+        :metalnessMap="metalnessMap"
+        :aoMap="aoMap"
+      />
+    </TresMesh>
+  </TresCanvas>
 </template>
 </template>
 ```
 ```
 
 
@@ -163,14 +165,12 @@ Then you can use the new component in your template. Notice that the new compone
 ```vue
 ```vue
 <template>
 <template>
   <TresCanvas shadows alpha>
   <TresCanvas shadows alpha>
-    <TresScene>
-      <TresOrbitControls v-if="state.renderer" :args="[state.camera, state.renderer?.domElement]" />
-    </TresScene>
+    <TresOrbitControls v-if="state.renderer" :args="[state.camera, state.renderer?.domElement]" />
   </TresCanvas>
   </TresCanvas>
 </template>
 </template>
 ```
 ```
 
 
-## useTres <Badge type="warning" text="^1.7.0" />
+## useTres
 
 
 This composable aims to provide access to the state model which contains the default renderer, camera, scene, and other useful properties.
 This composable aims to provide access to the state model which contains the default renderer, camera, scene, and other useful properties.
 
 

+ 1 - 1
docs/api/events.md

@@ -1,4 +1,4 @@
-# Events <Badge type="warning" text="^1.6.0" />
+# Events
 
 
 **TresJS** Mesh objects emit pointer events when they are interacted with using `raycaster` and `pointer` objects under the hood.
 **TresJS** Mesh objects emit pointer events when they are interacted with using `raycaster` and `pointer` objects under the hood.
 
 

+ 2 - 4
docs/api/renderer.md

@@ -2,13 +2,11 @@
 
 
 The `Renderer` component is the main component of Tres. It's the one that creates the ThreeJS `WebGLRenderer` and define your Tres Scene.
 The `Renderer` component is the main component of Tres. It's the one that creates the ThreeJS `WebGLRenderer` and define your Tres Scene.
 
 
-```vue{2,7}
+```vue{2,5}
 <template>
 <template>
   <TresCanvas shadows :output-encoding="sRGBEncoding">
   <TresCanvas shadows :output-encoding="sRGBEncoding">
     <TresPerspectiveCamera />
     <TresPerspectiveCamera />
-    <TresScene>
       <!-- Your scene goes here -->
       <!-- Your scene goes here -->
-    </TresScene>
   </TresCanvas>
   </TresCanvas>
 </template>
 </template>
 ```
 ```
@@ -42,7 +40,7 @@ body {
 }
 }
 ```
 ```
 
 
-## Presets <Badge warning text="v1.7.0+" />
+## Presets
 
 
 Tres comes with a few presets for the `Renderer` component. You can use them by setting the `preset` prop.
 Tres comes with a few presets for the `Renderer` component. You can use them by setting the `preset` prop.