GLTFModel.vue 733 B

12345678910111213141516171819
  1. <script setup lang="ts">
  2. import { sRGBEncoding } from 'three'
  3. import { OrbitControls, GLTFModel } from '@tresjs/cientos'
  4. </script>
  5. <template>
  6. <Suspense>
  7. <TresCanvas clear-color="#82DBC5" shadows alpha window-size :output-encoding="sRGBEncoding">
  8. <OrbitControls />
  9. <TresPerspectiveCamera :position="[5, 5, 5]" :fov="75" :near="0.1" :far="1000" />
  10. <TresScene :fog="'#82DBC5'">
  11. <TresAmbientLight :color="0xffffff" :intensity="0.25" />
  12. <TresDirectionalLight :position="[0, 8, 4]" :intensity="0.7" cast-shadow />
  13. <GLTFModel path="https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/aku-aku/AkuAku.gltf" draco />
  14. </TresScene>
  15. </TresCanvas>
  16. </Suspense>
  17. </template>