bx-1379-redesign #15

Merged
ksenia_mikhailova merged 124 commits from bx-1379-redesign into dev 2024-09-06 15:39:13 +03:00
2 changed files with 10 additions and 8 deletions
Showing only changes of commit 78abb52a1d - Show all commits

View File

@ -48,7 +48,6 @@ const controlsState = reactive({
const raw_dataStore = useRawData()
const route = useRoute()
const clickable = useClickable()
const sidebarScene = usePromoScene()
watch(() => route.params.target, sidebar.close)

View File

@ -40,7 +40,7 @@ const controls_targetto_count = ref(COUNT)
const camera_moveto = ref() as Ref<Vector3 | undefined>;
const camera_moveto_count = ref(COUNT)
const camera_rotatetoto = ref() as Ref<Quaternion | undefined>;
const camera_rotatetoto_count = ref(COUNT)
const camera_rotatetoto_count = ref(10)
const sidebar = usePromoSidebar();
const sidebar_scene = usePromoScene();
@ -264,9 +264,11 @@ watch(() => sidebar.is_open && sidebar.id_clickable, () => {
controls_targetto.value = target_vector;
const quaternion = new Quaternion();
quaternion.setFromAxisAngle(new Vector3(1, 0, 0), -45 * 4 * (Math.PI / 180));
quaternion.setFromAxisAngle(new Vector3(1, 0, 0), -15 * (Math.PI / 180));
// quaternion.setFromAxisAngle(new Vector3(0, 1, 0), -25 * (Math.PI / 180));
// quaternion.setFromAxisAngle(new Vector3(0, 0, 1), 10 * (Math.PI / 180));
camera_rotatetoto.value = quaternion
// camera.value.rotation.z += Math.PI/2
camera_moveto.value = target_vector;
}
}
@ -310,15 +312,16 @@ onAfterRender(() => {
}
if (!camera_moveto.value && !controls_targetto.value && camera_rotatetoto.value) {
timer.stopTimer();
camera.value?.quaternion.slerp(camera_rotatetoto.value, koef);
// camera.value?.quaternion.normalize();
camera.value?.quaternion.slerp(camera_rotatetoto.value, 0.5);
camera.value?.quaternion.normalize()
camera_rotatetoto_count.value -= 1;
if (camera_rotatetoto_count.value == 0) {
camera_rotatetoto_count.value = COUNT;
camera_rotatetoto_count.value = 10;
camera_rotatetoto.value = undefined
}
camera.value?.updateMatrixWorld()
}
(controls.value as any).update()
// (controls.value as any).update()
})
const timer = useTimer()