forked from Tresjs/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/30-landing-page-with-product
- Loading branch information
Showing
46 changed files
with
2,250 additions
and
2,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import { useGLTF } from '@tresjs/cientos'; | ||
import { DoubleSide, MeshBasicMaterial, Texture } from 'three'; | ||
const props = defineProps<{ | ||
texture: Texture | ||
}>() | ||
const { nodes } = await useGLTF( | ||
'/models/potions-classroom/wizard-potions-classroom.glb', | ||
{ | ||
draco: true, | ||
}, | ||
) | ||
const books = Object.values(nodes).filter(node => node.name.includes('Book')) | ||
props.texture.flipY = false | ||
const bakedMaterial = new MeshBasicMaterial({ | ||
map: props.texture, | ||
side: DoubleSide, | ||
}) | ||
books.forEach(book => { | ||
book.material = bakedMaterial | ||
}) | ||
</script> | ||
<template> | ||
<primitive v-for="book of books" :object="book" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
import { useGLTF } from '@tresjs/cientos'; | ||
const { nodes } = await useGLTF( | ||
'/models/potions-classroom/wizard-potions-classroom.glb', | ||
{ | ||
draco: true, | ||
}, | ||
) | ||
const bottles = Object.values(nodes).filter(node => node.name.includes('Bottle')) | ||
</script> | ||
<template> | ||
<primitive v-for="bottle of bottles" :object="bottle" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import { useGLTF } from '@tresjs/cientos'; | ||
import { DoubleSide, MeshBasicMaterial, Texture } from 'three'; | ||
const props = defineProps<{ | ||
texture: Texture | ||
}>() | ||
const { nodes } = await useGLTF( | ||
'/models/potions-classroom/wizard-potions-classroom.glb', | ||
{ | ||
draco: true, | ||
}, | ||
) | ||
const bricks = Object.values(nodes).filter(node => node.name.includes('Brick')) | ||
props.texture.flipY = false | ||
const bakedMaterial = new MeshBasicMaterial({ | ||
map: props.texture, | ||
side: DoubleSide, | ||
}) | ||
bricks.forEach(brick => { | ||
brick.material = bakedMaterial | ||
}) | ||
</script> | ||
<template> | ||
<primitive v-for="brick of bricks" :object="brick" /> | ||
</template> |
Oops, something went wrong.