bx-1379-redesign #15
|
@ -279,7 +279,8 @@ watch(() => sidebar.is_open && sidebar.id_clickable, () => {
|
|||
target_vector.setComponent(1, targetDistance.min)
|
||||
|
||||
set_moveto(smooth_target, target_vector)
|
||||
set_moveto(smooth_move, target_vector.multiply(new Vector3(1.25, 1, 1.25)))
|
||||
// set_moveto(smooth_move, target_vector.multiply(new Vector3(1.25, 1, 1.25).setY(targetDistance.min)))
|
||||
set_moveto(smooth_move, new Vector3(targetDistance.min, targetDistance.min, targetDistance.min))
|
||||
}
|
||||
}
|
||||
}, { deep: true })
|
||||
|
@ -307,31 +308,34 @@ onBeforeRender(() => {
|
|||
timer.resetTimer()
|
||||
home_timer.resetTimer()
|
||||
|
||||
if (smooth_move.value) {
|
||||
camera.value?.position.lerp(smooth_move.value as Vector3, koef);
|
||||
camera.value?.updateMatrixWorld()
|
||||
smooth_move.count -= 1
|
||||
if (smooth_move.count == 1) {
|
||||
set_moveto(smooth_move, undefined)
|
||||
if (temp_smooth_move.value) {
|
||||
set_moveto(smooth_move, temp_smooth_move.value)
|
||||
set_moveto(temp_smooth_move, undefined)
|
||||
if (smooth_target.value) {
|
||||
(controls.value as any).target.lerp(smooth_target.value as Vector3, koef);
|
||||
(controls.value as any).update()
|
||||
smooth_target.count -= 1
|
||||
if (smooth_target.count == 1) {
|
||||
set_moveto(smooth_target, undefined)
|
||||
if (temp_smooth_target.value) {
|
||||
set_moveto(smooth_target, temp_smooth_target.value)
|
||||
set_moveto(temp_smooth_target, undefined)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (smooth_target.value) {
|
||||
(controls.value as any).target.lerp(smooth_target.value as Vector3, koef);
|
||||
if (smooth_move.value) {
|
||||
camera.value?.position.lerp(smooth_move.value as Vector3, koef);
|
||||
camera.value?.updateMatrixWorld();
|
||||
(controls.value as any).update()
|
||||
smooth_target.count -= 1
|
||||
if (smooth_target.count == 1) {
|
||||
set_moveto(smooth_target, undefined)
|
||||
if (temp_smooth_target.value) {
|
||||
set_moveto(smooth_target, temp_smooth_target.value)
|
||||
set_moveto(temp_smooth_target, undefined)
|
||||
|
||||
smooth_move.count -= 1
|
||||
if (smooth_move.count == 1) {
|
||||
set_moveto(smooth_move, undefined)
|
||||
if (temp_smooth_move.value) {
|
||||
set_moveto(smooth_move, temp_smooth_move.value)
|
||||
set_moveto(temp_smooth_move, undefined)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue