bx-1379-redesign #15

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

View File

@ -36,7 +36,7 @@ const targetDistance = reactive({ max: 10, min: 0 })
let sidebar_clickable = [] as PromoScene[]
let sidebar_visible = [] as PromoScene[]
const COUNT = 30
const COUNT = 50
type smooth = {
value: Vector3 | Quaternion | undefined,
count: number
@ -232,8 +232,6 @@ const loadModels = async () => {
if (controls.value && (controls.value as any).autoRotate) {
(controls.value as any).autoRotate = false;
}
// process_loading.value = null
}
const gotoCenterAndDistance = () => {
@ -253,7 +251,6 @@ watch(() => props.source, () => {
}
console.log('props change')
sidebar.close()
// loadModels()
} else {
renderer.value.dispose()
}
@ -279,8 +276,11 @@ 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).setY(targetDistance.min)))
set_moveto(smooth_move, new Vector3(targetDistance.min, targetDistance.min, targetDistance.min))
set_moveto(smooth_move, new Vector3(
(target_vector.x / Math.abs(target_vector.x)) * targetDistance.min,
0,
(target_vector.z / Math.abs(target_vector.z)) * targetDistance.min
))
}
}
}, { deep: true })
@ -302,8 +302,8 @@ onBeforeRender(() => {
}
}
})
// const koef = (1 / COUNT) * 3
const koef = 0.05
const koef = (1 / COUNT) * 3
// const koef = 0.05
if (smooth_target.value || smooth_move.value) {
timer.resetTimer()
home_timer.resetTimer()