1
0
Эх сурвалжийг харах

docs(attach): rewording (#870)

* docs(attach): rewording

* chore: linter
andretchen0 6 сар өмнө
parent
commit
486eecd3dc

+ 3 - 3
docs/advanced/attach.md

@@ -14,7 +14,7 @@ The `attach` prop is not required for many common cases. For instance:
 
 ## Background
 
-Tres tries to automatically determine where to insert child tag into its parent. For example, in this code, Tres will:
+Tres tries to automatically determine where to insert a child tag into its parent. For example, in this code, Tres will:
 
 * automatically insert the geometry into `parent.geometry`
 * automatically insert the material into `parent.material`
@@ -97,7 +97,7 @@ You can deeply attach a child to a parent by "piercing" – i.e., using a kebab-
 
 First, here are a few simple pseudocode examples. This will attach `bar` at `foo.ab.cd`:
 
-```html
+```vue
 <foo>
   <bar attach="ab-cd" />
 </foo>
@@ -105,7 +105,7 @@ First, here are a few simple pseudocode examples. This will attach `bar` at `foo
 
 This will attach `bar` at `foo.ab.cd.ef`:
 
-```html
+```vue
 <foo>
   <bar attach="ab-cd-ef" />
 </foo>

+ 1 - 1
playground/vue/src/pages/advanced/attachBufferGeometry/index.vue

@@ -39,7 +39,7 @@ const positions = new Float32Array([
     <h1><code>attach</code>: BufferGeometry</h1>
     <h2>Setup</h2>
     <p>
-      In this scene, there is a Mesh with a BufferGeometry, created with JSX. The BufferGeometry has a JSX BufferAttribute, attached to the BufferGeometry's <code>attributes.position</code> using <code>attach</code>.
+      In this scene, there is a Mesh, BufferGeometry, and a BufferAttribute. All are created in <code>&lt;template&gt;</code>. The BufferAttribute is attached to the BufferGeometry's <code>attributes.position</code> using the <code>attach</code> prop.
     </p>
     <h2>Preview</h2>
     <img :src="previewDataUri" />

+ 4 - 1
playground/vue/src/pages/advanced/attachPostProcessing/index.vue

@@ -21,7 +21,10 @@ const previewDataUri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CA
     <h1><code>attach</code>: Post-processing</h1>
     <h2>Setup</h2>
     <p>
-      In this scene, there is a Box with a MeshNormalMaterial. The scene includes THREE post-processing passes added directly via JSX (using the <code>attach</code> prop), including "Unreal Bloom".
+      In this scene, there is a Box with a MeshNormalMaterial. The scene also includes a THREE EffectComposer and post-processing passes created in <code>&lt;template&gt;</code>.
+    </p>
+    <p>
+      The passes are inserted into <code>EffectComposer.passes</code> using the <code>attach</code> prop.
     </p>
     <h2>Preview</h2>
     <img :src="previewDataUri" />