|
@@ -1,10 +1,9 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { sRGBEncoding, BasicShadowMap, NoToneMapping, Vector3 } from 'three'
|
|
|
+import { sRGBEncoding, BasicShadowMap, NoToneMapping } from 'three'
|
|
|
import { reactive, ref } from 'vue'
|
|
|
import { TresCanvas } from '/@/components/TresCanvas'
|
|
|
-import { OrbitControls, TransformControls } from '@tresjs/cientos'
|
|
|
+import { OrbitControls, TransformControls } from '@tresjs/cientos'
|
|
|
import { useRenderLoop } from '/@/'
|
|
|
-/* import { OrbitControls, GLTFModel } from '@tresjs/cientos' */
|
|
|
|
|
|
const state = reactive({
|
|
|
clearColor: '#201919',
|
|
@@ -27,15 +26,16 @@ onLoop(({ elapsed }) => {
|
|
|
</script>
|
|
|
<template>
|
|
|
<TresCanvas v-bind="state">
|
|
|
- <TresPerspectiveCamera :position="[5, 5, 5]" :fov="45" :near="0.1" :far="1000" :look-at="[0,0,0]" />
|
|
|
+ <TresPerspectiveCamera :position="[5, 5, 5]" :fov="45" :near="0.1" :far="1000"
|
|
|
+ :look-at="[0,0,0]" />
|
|
|
<OrbitControls />
|
|
|
<TresAmbientLight :intensity="0.5" />
|
|
|
|
|
|
<TresMesh ref="sphereRef" :position="[0, 4, 0]" cast-shadow>
|
|
|
<TresSphereGeometry :args="[2,32,32]"/>
|
|
|
<TresMeshToonMaterial color="cyan" />
|
|
|
- <!-- <TresMeshToonMaterial color="#FBB03B" /> -->
|
|
|
</TresMesh>
|
|
|
+
|
|
|
<TresDirectionalLight :position="[0, 8, 4]" :intensity="0.7" cast-shadow />
|
|
|
<TresMesh :rotation="[-Math.PI / 2, 0, 0]" receive-shadow>
|
|
|
<TresPlaneGeometry :args="[10, 10, 10, 10]" />
|