1
0

TheSmallExperience.vue 716 B

12345678910111213141516171819202122232425262728
  1. <script setup lang="ts">
  2. import { TresCanvas } from '/@/'
  3. import { OrbitControls } from '@tresjs/cientos/'
  4. </script>
  5. <template>
  6. <div class="container">
  7. <TresCanvas>
  8. <TresPerspectiveCamera :position="[5, 5, 5]" :fov="75" :aspect="1" :near="0.1" :far="1000" />
  9. <OrbitControls />
  10. <TresAmbientLight :color="0xffffff" :intensity="0.5" />
  11. <TresMesh ref="sphereRef" :scale="1" cast-shadow>
  12. <TresSphereGeometry :args="[1, 500, 500]" />
  13. <TresMeshToonMaterial color="#FBB03B" />
  14. </TresMesh>
  15. </TresCanvas>
  16. </div>
  17. </template>
  18. <style scoped>
  19. .container {
  20. position: absolute;
  21. top: 50%;
  22. left: 50%;
  23. aspect-ratio: 16/9;
  24. background: white;
  25. width: 50%;
  26. }
  27. </style>