1
0

DonutExample.vue 548 B

12345678910111213141516171819202122232425
  1. <script setup lang="ts">
  2. import { OrbitControls } from '@tresjs/cientos'
  3. import { TresCanvas } from '@tresjs/core'
  4. const gl = {
  5. clearColor: '#82DBC5',
  6. shadows: true,
  7. }
  8. </script>
  9. <template>
  10. <TresCanvas v-bind="gl">
  11. <TresPerspectiveCamera
  12. :position="[3, 3, 3]"
  13. :fov="45"
  14. :look-at="[0, 0, 0]"
  15. />
  16. <OrbitControls />
  17. <TresMesh>
  18. <TresTorusGeometry :args="[1, 0.5, 16, 32]" />
  19. <TresMeshBasicMaterial color="orange" />
  20. </TresMesh>
  21. <TresAmbientLight :intensity="1" />
  22. </TresCanvas>
  23. </template>