From f76f7ebf21d5eb3a562b7fc1260ddbe374222790 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 20 Sep 2024 16:29:20 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D1=81=D1=82=D0=BE=D1=80=D0=BE=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B1=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calcModels.vue | 2 +- components/model/line.vue | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/components/calcModels.vue b/components/calcModels.vue index c7121c9..9903eab 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -13,7 +13,7 @@ const max_size = use_max_size() const controlsState = reactive({ distance: section_count.value, minDistance: 10, - maxDistance: 10, + maxDistance: 20, position: { x: 0, y: 0, z: 0 }, // enablePan: false, minPolarAngle: degToRad(30), diff --git a/components/model/line.vue b/components/model/line.vue index b5b9bab..19292ce 100644 --- a/components/model/line.vue +++ b/components/model/line.vue @@ -8,11 +8,11 @@ const rotate = () => { case 1: return degToRad(0) case 2: - return degToRad(90) + return degToRad(180) case 3: return degToRad(270) case 4: - return degToRad(180) + return degToRad(90) } } const { seekByName } = useSeek() @@ -29,6 +29,7 @@ const count_pos = () => { const line = seekByName(scene.value, `line_${props.number}`) const line_size = new Vector3() const line_pos = new Vector3() + const line_lpos = new Vector3() if (line && line.children.length) { line.updateMatrixWorld() new Box3().expandByObject(line).getSize(line_size) @@ -43,19 +44,20 @@ const count_pos = () => { line1.getWorldPosition(line1_pos) console.log('first', line1, line1_size, line1_pos) } + const k = 12 * line1_size.z switch (props.number) { case 1: break; case 2: - // position.value.x = line_size.y - position.value.z = line1_size.z * -1 + position.value.z = line1_size.x * -1 + position.value.x = line1_size.x - k * 2 break; case 3: - position.value.z = line1_size.x * -1 - position.value.x = line1_size.x + position.value.z = line1_size.x * -1 + k + position.value.x = -1 * k break; case 4: - position.value.z = line1_size.x * -1 - position.value.x = line1_size.x + position.value.z = -1 * k + position.value.x = line1_size.x - k break; } } From 767bcb6c47a3201e9f619b99a1e4719cbdc2d41d Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 20 Sep 2024 16:52:40 +0300 Subject: [PATCH 2/3] angle --- components/calcModels.vue | 2 +- components/model/fence.vue | 4 ++-- components/model/line.vue | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/calcModels.vue b/components/calcModels.vue index 9903eab..76ab119 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -22,7 +22,7 @@ const controlsState = reactive({ const cameraStat = reactive({ position: [-4, 2, 8], aspect: 1920 / 600, - fov: 40, + // fov: 40, }) const pointLight = ref() diff --git a/components/model/fence.vue b/components/model/fence.vue index 63cd5ea..1a8a206 100644 --- a/components/model/fence.vue +++ b/components/model/fence.vue @@ -1,7 +1,7 @@