diff --git a/docs/advanced/attach.md b/docs/advanced/attach.md index 50f0849f3..8fa2569ae 100644 --- a/docs/advanced/attach.md +++ b/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 @@ -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 diff --git a/playground/vue/src/pages/advanced/attachBufferGeometry/index.vue b/playground/vue/src/pages/advanced/attachBufferGeometry/index.vue index 821cbd60f..8f5a3967b 100644 --- a/playground/vue/src/pages/advanced/attachBufferGeometry/index.vue +++ b/playground/vue/src/pages/advanced/attachBufferGeometry/index.vue @@ -39,7 +39,7 @@ const positions = new Float32Array([

attach: BufferGeometry

Setup

- In this scene, there is a Mesh with a BufferGeometry, created with JSX. The BufferGeometry has a JSX BufferAttribute, attached to the BufferGeometry's attributes.position using attach. + In this scene, there is a Mesh, BufferGeometry, and a BufferAttribute. All are created in <template>. The BufferAttribute is attached to the BufferGeometry's attributes.position using the attach prop.

Preview

diff --git a/playground/vue/src/pages/advanced/attachPostProcessing/index.vue b/playground/vue/src/pages/advanced/attachPostProcessing/index.vue index 77fba53b9..bcdee3c47 100644 --- a/playground/vue/src/pages/advanced/attachPostProcessing/index.vue +++ b/playground/vue/src/pages/advanced/attachPostProcessing/index.vue @@ -21,7 +21,10 @@ const previewDataUri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CA

attach: Post-processing

Setup

- In this scene, there is a Box with a MeshNormalMaterial. The scene includes THREE post-processing passes added directly via JSX (using the attach 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 <template>. +

+

+ The passes are inserted into EffectComposer.passes using the attach prop.

Preview