فهرست منبع

docs: api docs

alvarosabu 2 سال پیش
والد
کامیت
92e8ce934c
3فایلهای تغییر یافته به همراه18 افزوده شده و 20 حذف شده
  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
 <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>
 ```
 
@@ -163,14 +165,12 @@ Then you can use the new component in your template. Notice that the new compone
 ```vue
 <template>
   <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>
 </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.
 

+ 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.
 

+ 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.
 
-```vue{2,7}
+```vue{2,5}
 <template>
   <TresCanvas shadows :output-encoding="sRGBEncoding">
     <TresPerspectiveCamera />
-    <TresScene>
       <!-- Your scene goes here -->
-    </TresScene>
   </TresCanvas>
 </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.