Skip to content

Commit

Permalink
fix: useTexture docs detail (#395)
Browse files Browse the repository at this point in the history
Co-authored-by: Alvaro Saburido <[email protected]>
  • Loading branch information
JaimeTorrealba and alvarosabu authored Sep 13, 2023
1 parent 18453f1 commit 158d4c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/examples/load-textures.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ const pbrTexture = await useTexture({
displacementMap: '/textures/black-rock/Rock035_2K_Displacement.jpg',
roughnessMap: '/textures/black-rock/Rock035_2K_Roughness.jpg',
normalMap: '/textures/black-rock/Rock035_2K_NormalDX.jpg',
ambientOcclusion: '/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',
aoMap: '/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',
metalnessMap: '/textures/black-rock/myMetalnessTexture.jpg',
matcap: '/textures/black-rock/myMatcapTexture.jpg',
alphaMap: '/textures/black-rock/myAlphaMapTexture.jpg'
})
```

Similar to the previous example, we can pass all the textures to a material via props:

```html
Expand All @@ -66,7 +68,7 @@ Similar to the previous example, we can pass all the textures to a material via
:displacementMap="pbrTexture.displacementMap"
:roughnessMap="pbrTexture.roughnessMap"
:normalMap="pbrTexture.normalMap"
:ambientOcclusionMap="pbrTexture.ambientOcclusionMap"
:aoMap="pbrTexture.ambientOcclusionMap"
/>
</TresMesh>
</TresCanvas>
Expand Down

0 comments on commit 158d4c3

Please sign in to comment.