|
@@ -1,7 +1,7 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { BasicShadowMap, NoToneMapping, sRGBEncoding } from 'three'
|
|
import { BasicShadowMap, NoToneMapping, sRGBEncoding } from 'three'
|
|
import { reactive, shallowRef, watch } from 'vue'
|
|
import { reactive, shallowRef, watch } from 'vue'
|
|
-import { Plane, OrbitControls } from '../../../cientos/src/'
|
|
|
|
|
|
+import { Plane, Box, OrbitControls } from '../../../cientos/src/'
|
|
|
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
clearColor: '#82DBC5',
|
|
clearColor: '#82DBC5',
|
|
@@ -24,10 +24,14 @@ watch(planeRef, plane => {
|
|
<TresPerspectiveCamera :position="[5, 5, 5]" :fov="75" :aspect="1" :near="0.1" :far="1000" />
|
|
<TresPerspectiveCamera :position="[5, 5, 5]" :fov="75" :aspect="1" :near="0.1" :far="1000" />
|
|
<OrbitControls />
|
|
<OrbitControls />
|
|
<TresScene>
|
|
<TresScene>
|
|
- <TresAmbientLight :color="0xffffff" :intensity="0.5" />
|
|
|
|
- <Plane ref="planeRef" :args="[8, 8]" :position="[0, 4, 0]">
|
|
|
|
|
|
+ <TresAmbientLight :color="0xffffff" :intensity="1" />
|
|
|
|
+ <TresDirectionalLight :position="[0, 8, 4]" :intensity="0.7" cast-shadow />
|
|
|
|
+ <Plane ref="planeRef" :args="[8, 8]" :position="[0, 4, 0]" receive-shadow>
|
|
<TresMeshToonMaterial color="teal" />
|
|
<TresMeshToonMaterial color="teal" />
|
|
</Plane>
|
|
</Plane>
|
|
|
|
+ <Box ref="boxRef" :args="[1, 1, 1]" :position="[0, 6, 0]" cast-shadow>
|
|
|
|
+ <TresMeshToonMaterial color="orange" />
|
|
|
|
+ </Box>
|
|
</TresScene>
|
|
</TresScene>
|
|
</TresCanvas>
|
|
</TresCanvas>
|
|
</template>
|
|
</template>
|