remove numbers
This commit is contained in:
parent
a85ee1e362
commit
2015864f0d
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { FrontSide, RepeatWrapping } from 'three';
|
import { AdditiveBlending, FrontSide, RepeatWrapping } from 'three';
|
||||||
import { TresCanvas, useTexture } from '@tresjs/core'
|
import { TresCanvas, useTexture } from '@tresjs/core'
|
||||||
import { OrbitControls, Environment, useGLTF } from '@tresjs/cientos'
|
import { OrbitControls, Environment, useGLTF } from '@tresjs/cientos'
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ const groundMaterial = ref({
|
||||||
color: "#555",
|
color: "#555",
|
||||||
roughness: 0.2,
|
roughness: 0.2,
|
||||||
metalness: 0,
|
metalness: 0,
|
||||||
side: FrontSide
|
side: FrontSide,
|
||||||
})
|
})
|
||||||
const loadAll = async () => {
|
const loadAll = async () => {
|
||||||
const { scene: light } = await useGLTF('/models_light/zabor_so_svetom.glb')
|
const { scene: light } = await useGLTF('/models_light/zabor_so_svetom.glb')
|
||||||
|
@ -69,7 +69,7 @@ onMounted(() => {
|
||||||
loadAll()
|
loadAll()
|
||||||
})
|
})
|
||||||
watch(section_count, () => {
|
watch(section_count, () => {
|
||||||
let v = (section_count.value + ~~(!!extra_section.value))*1.5
|
let v = (section_count.value + ~~(!!extra_section.value)) * 1.5
|
||||||
if (v < controlsState.minDistance) v = controlsState.minDistance
|
if (v < controlsState.minDistance) v = controlsState.minDistance
|
||||||
if (v > controlsState.maxDistance) v = controlsState.maxDistance
|
if (v > controlsState.maxDistance) v = controlsState.maxDistance
|
||||||
camera.value.position.normalize().multiplyScalar(v)
|
camera.value.position.normalize().multiplyScalar(v)
|
||||||
|
@ -79,12 +79,10 @@ watch(section_count, () => {
|
||||||
<div class="container min-w-full relative h-[50vh]">
|
<div class="container min-w-full relative h-[50vh]">
|
||||||
<ClientOnly fallback-tag="div" fallback="Загрузка 3D модели">
|
<ClientOnly fallback-tag="div" fallback="Загрузка 3D модели">
|
||||||
<Loader />
|
<Loader />
|
||||||
|
<Stats />
|
||||||
<TresCanvas shadows>
|
<TresCanvas shadows>
|
||||||
<TresPerspectiveCamera v-bind="cameraStat" ref="camera" />
|
<TresPerspectiveCamera v-bind="cameraStat" ref="camera" />
|
||||||
<OrbitControls v-bind="controlsState" make-default />
|
<OrbitControls v-bind="controlsState" make-default />
|
||||||
<Suspense v-if="false">
|
|
||||||
<Environment files='/hdrmaps/kloppenheim_06_4k.hdr' :background="true" />
|
|
||||||
</Suspense>
|
|
||||||
<TresGroup :position-x="Math.min(section_count, 20) * fence_section * -1" :position-y="-3">
|
<TresGroup :position-x="Math.min(section_count, 20) * fence_section * -1" :position-y="-3">
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<ModelParametric />
|
<ModelParametric />
|
||||||
|
|
|
@ -90,10 +90,6 @@ watch(props, () => {
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<TresGroup :position="(props.position || [0, 0, 0])" ref="model">
|
<TresGroup :position="(props.position || [0, 0, 0])" ref="model">
|
||||||
<primitive :object="scene.children[0]" />
|
<primitive :object="scene.children[0]" />
|
||||||
<TresMesh v-if="props.map" :cast-shadow="false" :receive-shadow="false">
|
|
||||||
<TresPlaneGeometry :args="[size.x, size.y]" />
|
|
||||||
<TresMeshPhongMaterial :map="props.map" :transparent="true" :opacity="0.5" :side="DoubleSide" />
|
|
||||||
</TresMesh>
|
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</template>
|
</template>
|
Loading…
Reference in New Issue