round geometry
This commit is contained in:
parent
e895404677
commit
2382914f0c
|
@ -5,24 +5,25 @@ import { OrbitControls, vLightHelper } from '@tresjs/cientos'
|
||||||
import Canvas from './model/canvas.vue';
|
import Canvas from './model/canvas.vue';
|
||||||
|
|
||||||
const controlsState = reactive({
|
const controlsState = reactive({
|
||||||
minDistance: 0,
|
minDistance: 6,
|
||||||
maxDistance: 10,
|
maxDistance: 10,
|
||||||
// enablePan: false,
|
// enablePan: false,
|
||||||
// enebleZoom: false,
|
enableZoom: false,
|
||||||
maxPolarAngle: (Math.PI / 2) - 0.02,
|
maxPolarAngle: (Math.PI / 2) - 0.2,
|
||||||
// distance: 3
|
|
||||||
})
|
})
|
||||||
// console.log(controlsState)
|
// console.log(controlsState)
|
||||||
// const { scene: backLight } = await useGLTF('/models_light/back_light.glb')
|
// const { scene: backLight } = await useGLTF('/models_light/back_light.glb')
|
||||||
// const { scene: primaryLight } = await useGLTF('/models_light/primary_light.glb')
|
// const { scene: primaryLight } = await useGLTF('/models_light/primary_light.glb')
|
||||||
// const { scene: secondaryLight } = await useGLTF('/models_light/secondary_light.glb')
|
// const { scene: secondaryLight } = await useGLTF('/models_light/secondary_light.glb')
|
||||||
// console.log({ backLight, primaryLight, secondaryLight })
|
// console.log({ backLight, primaryLight, secondaryLight })
|
||||||
|
watch(controlsState, ()=>{
|
||||||
|
console.log(controlsState)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container min-w-full">
|
||||||
<TresCanvas shadows>
|
<TresCanvas shadows>
|
||||||
<TresPerspectiveCamera :position="[-7, 2, 3]" :distance="3" />
|
<TresPerspectiveCamera :position="[2, 3, 6]" />
|
||||||
<OrbitControls v-bind="controlsState" make-default />
|
<OrbitControls v-bind="controlsState" make-default />
|
||||||
<Canvas />
|
<Canvas />
|
||||||
<TresDirectionalLight :position="[2, 2, 2]" :intensity="2" color="lightgreen" cast-shadow />
|
<TresDirectionalLight :position="[2, 2, 2]" :intensity="2" color="lightgreen" cast-shadow />
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
import Item from './item.vue';
|
import Item from './item.vue';
|
||||||
const lSize = 0.1
|
const lSize = 0.1
|
||||||
const lamelles_count = useState('lamelles_count')
|
const lamelles_count = useState('lamelles_count')
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<TresMesh :position="[0, 0, 0]" :rotate-x="Math.PI * -0.5" receive-shadow cast-shadow>
|
<TresMesh :position="[0, 0, 0]" :rotate-x="Math.PI * -0.5" receive-shadow cast-shadow>
|
||||||
<TresBoxGeometry :args="[8, 8, 0.05]" />
|
<TresCircleGeometry :args="[8, 8, 0.05]" />
|
||||||
<TresMeshStandardMaterial color="pink" />
|
<TresMeshStandardMaterial color="pink" />
|
||||||
</TresMesh>
|
</TresMesh>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
|
@ -24,7 +23,8 @@ const lamelles_count = useState('lamelles_count')
|
||||||
<template v-for="i in lamelles_count">
|
<template v-for="i in lamelles_count">
|
||||||
<Item model-url="/models_one/planka.glb" :position="[0, (lSize * i), 0]" :remove-pos="true" />
|
<Item model-url="/models_one/planka.glb" :position="[0, (lSize * i), 0]" :remove-pos="true" />
|
||||||
</template>
|
</template>
|
||||||
<Item model-url="/models_one/verh.glb" :position="[0, (lamelles_count + 1) * lSize, 0]" :remove-pos="true" />
|
<Item model-url="/models_one/verh.glb" :position="[0, (lamelles_count + 1) * lSize, 0]"
|
||||||
|
:remove-pos="true" />
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</template>
|
</template>
|
Loading…
Reference in New Issue