Merge branch 'bx-696-startproject' of https://git.svs-tech.pro/ksenia_mikhailova/mns-mini-zabor into bx-696-startproject
This commit is contained in:
commit
8acb3e45f4
|
@ -5,24 +5,25 @@ import { OrbitControls, vLightHelper } from '@tresjs/cientos'
|
|||
import Canvas from './model/canvas.vue';
|
||||
|
||||
const controlsState = reactive({
|
||||
minDistance: 0,
|
||||
minDistance: 6,
|
||||
maxDistance: 10,
|
||||
// enablePan: false,
|
||||
// enebleZoom: false,
|
||||
maxPolarAngle: (Math.PI / 2) - 0.02,
|
||||
// distance: 3
|
||||
enableZoom: false,
|
||||
maxPolarAngle: (Math.PI / 2) - 0.2,
|
||||
})
|
||||
// console.log(controlsState)
|
||||
// const { scene: backLight } = await useGLTF('/models_light/back_light.glb')
|
||||
// const { scene: primaryLight } = await useGLTF('/models_light/primary_light.glb')
|
||||
// const { scene: secondaryLight } = await useGLTF('/models_light/secondary_light.glb')
|
||||
// console.log({ backLight, primaryLight, secondaryLight })
|
||||
|
||||
watch(controlsState, ()=>{
|
||||
console.log(controlsState)
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="container min-w-full">
|
||||
<TresCanvas shadows>
|
||||
<TresPerspectiveCamera :position="[-7, 2, 3]" :distance="3" />
|
||||
<TresPerspectiveCamera :position="[2, 3, 6]" />
|
||||
<OrbitControls v-bind="controlsState" make-default />
|
||||
<Canvas />
|
||||
<TresDirectionalLight :position="[2, 2, 2]" :intensity="2" color="lightgreen" cast-shadow />
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
import Item from './item.vue';
|
||||
const lSize = 0.1
|
||||
const lamelles_count = useState('lamelles_count')
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<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" />
|
||||
</TresMesh>
|
||||
<Suspense>
|
||||
|
@ -24,7 +23,8 @@ const lamelles_count = useState('lamelles_count')
|
|||
<template v-for="i in lamelles_count">
|
||||
<Item model-url="/models_one/planka.glb" :position="[0, (lSize * i), 0]" :remove-pos="true" />
|
||||
</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>
|
||||
</Suspense>
|
||||
</template>
|
Loading…
Reference in New Issue