From fff3d118184e94a419f0d6c3ab74b2b581f39f85 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Mon, 23 Sep 2024 14:17:06 +0300 Subject: [PATCH] one fence item --- components/calcModels.vue | 18 +++++++----- components/calcValues.vue | 52 +++++++++++++++++---------------- components/model/line.vue | 4 +-- components/model/parametric.vue | 27 ++++++++++++++++- utils/material.ts | 4 +-- 5 files changed, 67 insertions(+), 38 deletions(-) diff --git a/components/calcModels.vue b/components/calcModels.vue index 30a76db..8e9b45d 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -5,18 +5,21 @@ import { degToRad } from 'three/src/math/MathUtils.js'; const section_count = use_section_count() const extra_section = use_extra_section() - +const lamelles_count = use_lamelles_count() +const lamelle_height = use_lamelle_height() +const defDistance = 3 const controlsState = reactive({ distance: section_count.value, - minDistance: 10, - maxDistance: 10, + minDistance: defDistance, + maxDistance: defDistance, position: { x: 0, y: 0, z: 0 }, enablePan: false, enableZoom: false, minPolarAngle: degToRad(60), - maxPolarAngle: degToRad(60), + maxPolarAngle: degToRad(90), }) const cameraStat = reactive({ + position: [0, 0, 5], aspect: 1920 / 600, // fov: 40, }) @@ -25,7 +28,7 @@ const camera = ref("camera") watch([section_count, extra_section], () => { let v = (section_count.value + ~~(!!extra_section.value)); - if (v <= 10) v = 10 + if (v <= defDistance) v = defDistance controlsState.minDistance = v; controlsState.maxDistance = v; (camera.value as any).position.normalize().multiplyScalar(v) @@ -41,16 +44,15 @@ watch([section_count, extra_section], () => { - + - + - diff --git a/components/calcValues.vue b/components/calcValues.vue index f5cf095..80a0ec1 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -151,7 +151,7 @@ const goal = (target: string, params: object) => {