3 lvl depth
Deploy / build_and_push_images (push) Successful in 1m24s Details
Deploy / deploy_to_server_dev (push) Successful in 34s Details

This commit is contained in:
Kseninia Mikhaylova 2024-07-25 17:01:14 +03:00
parent 017e37d5e3
commit 091f24b097
1 changed files with 22 additions and 22 deletions

View File

@ -25,7 +25,10 @@ const axis = [
{ axis: 'z', func: 'translateZ', },
]
type vectorType = 'x' | 'y' | 'z';
const expFunc = (element: typeof axis[0]) => {
onLoop(() => {
if (model.value && target.value) {
axis.forEach(element => {
if (target.value) {
const point = model.value.position[element.axis]
let step = stepbase * target.value[element.axis as vectorType]
@ -37,19 +40,16 @@ const expFunc = (element: typeof axis[0]) => {
try {
model.value[element.func](step)
} catch (error) {
expFunc(element)
console.log('lvl 1')
try { model.value[element.func](step) } catch {
console.log('lvl 2')
try { model.value[element.func](step) } catch {
console.log('lvl 3')
}
}
}
}
}
}
onLoop(() => {
if (model.value && target.value) {
axis.forEach(element => {
try {
expFunc(element)
} catch (error) {
console.log(error)
}
});
}