From d986562a2ba478f32db50fb38f2c1187a5102b29 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 3 Sep 2024 12:13:44 +0300 Subject: [PATCH] red box --- front/src/assets/sidebar.scss | 7 ++++--- front/src/components/Promo/load_models.vue | 13 ++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/front/src/assets/sidebar.scss b/front/src/assets/sidebar.scss index 46e8eb9..77ff516 100644 --- a/front/src/assets/sidebar.scss +++ b/front/src/assets/sidebar.scss @@ -69,6 +69,7 @@ $boxShadow: 0px 0px 8px rgba(0, 0, 0, .25); >a { line-height: 1; + font-size: 0; color: inherit; width: 100%; height: 100%; @@ -96,10 +97,10 @@ $boxShadow: 0px 0px 8px rgba(0, 0, 0, .25); } - &-enter { + &-deep { svg { - width: 80%; - height: 80%; + width: 70%; + height: 70%; } } } diff --git a/front/src/components/Promo/load_models.vue b/front/src/components/Promo/load_models.vue index 8956e58..b4adf92 100644 --- a/front/src/components/Promo/load_models.vue +++ b/front/src/components/Promo/load_models.vue @@ -43,6 +43,8 @@ const camera_moveto_count = ref(COUNT) const camera_rotatetoto = ref() as Ref; const camera_rotatetoto_count = ref(COUNT) +const vis_target = ref() + const sidebar = usePromoSidebar(); const sidebar_scene = usePromoScene(); const clickable = useClickable() @@ -261,7 +263,7 @@ watch(() => sidebar.is_open && sidebar.id_clickable, () => { const target_vector = new Vector3(); el.getWorldPosition(target_vector); - target_vector.y = 10; + target_vector.y = raw_dataStore.data.min_distance > 50 ? raw_dataStore.data.min_distance / 10 : 1; const quaternion = new Quaternion(); quaternion.setFromEuler(new Euler( @@ -275,6 +277,7 @@ watch(() => sidebar.is_open && sidebar.id_clickable, () => { camera_rotatetoto.value = quaternion controls_targetto.value = target_vector; camera_moveto.value = target_vector; + vis_target.value = target_vector; } } }, { deep: true }) @@ -308,7 +311,7 @@ onAfterRender(() => { camera.value?.position.lerp(camera_moveto.value, koef); camera_moveto_count.value -= 1 if (camera_moveto_count.value == 0) { - // camera.value?.lookAt(camera_moveto.value) + camera.value?.lookAt(camera_moveto.value) camera_moveto.value = undefined; camera_moveto_count.value = COUNT; } @@ -324,7 +327,7 @@ onAfterRender(() => { } camera.value?.updateMatrixWorld() } - // (controls.value as any).update() + (controls.value as any).update() }) const timer = useTimer() @@ -403,6 +406,10 @@ onUnmounted(() => { + + + +