From 027fc2e6bfbbc3e353f548a530784931143b2822 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 25 Sep 2024 15:13:07 +0300 Subject: [PATCH] target --- components/calc/models.vue | 17 ----------------- components/model/parametric.vue | 6 ++++-- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/components/calc/models.vue b/components/calc/models.vue index d13d2d7..1dcae39 100644 --- a/components/calc/models.vue +++ b/components/calc/models.vue @@ -3,14 +3,7 @@ import { TresCanvas } from '@tresjs/core' import { Stats, OrbitControls } from '@tresjs/cientos' import { degToRad } from 'three/src/math/MathUtils.js'; -const section_count = use_section_count() -const fence_section = use_fence_section() - -const defDistance = 3 const controlsState = reactive({ - distance: section_count.value, - minDistance: defDistance, - maxDistance: defDistance, position: { x: 0, y: 0, z: 0 }, enablePan: false, enableZoom: false, @@ -22,16 +15,6 @@ const cameraStat = reactive({ aspect: 1920 / 600, // fov: 40, }) - -const camera = ref("camera") - -watch(fence_section, () => { - let v = fence_section.value * 2; - if (v <= defDistance) v = defDistance - controlsState.minDistance = v; - controlsState.maxDistance = v; - (camera.value as any).position.normalize().multiplyScalar(v) -})