Directives.vue 603 B

12345678910111213141516171819202122232425
  1. <script setup lang="ts">
  2. import { TresCanvas } from '@tresjs/core'
  3. import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
  4. import { OrbitControls } from '@tresjs/cientos'
  5. const gl = {
  6. clearColor: '#82DBC5',
  7. shadows: true,
  8. alpha: false,
  9. shadowMapType: BasicShadowMap,
  10. outputColorSpace: SRGBColorSpace,
  11. toneMapping: NoToneMapping,
  12. }
  13. </script>
  14. <template>
  15. <TresCanvas v-bind="gl">
  16. <TresPerspectiveCamera :position="[3, 3, 3]" />
  17. <OrbitControls />
  18. <TresGridHelper />
  19. <DirectiveSubComponent />
  20. <TresAmbientLight :intensity="1" />
  21. </TresCanvas>
  22. </template>