dev #84
|
@ -17,10 +17,10 @@ const open_calc = use_open_calc()
|
|||
const goto_cam = use_goto_camera()
|
||||
const goto_target = use_goto_target()
|
||||
|
||||
const { scene, controls } = useTresContext()
|
||||
const { scene, controls, camera } = useTresContext()
|
||||
const { seek, seekAll } = useSeek()
|
||||
|
||||
const topper_models = {} as {[key:toppersIds]:Object3D}
|
||||
const topper_models = {} as { [key: toppersIds]: Object3D }
|
||||
for await (const element of toppers) {
|
||||
const { scene } = await useGLTF(getModel(element.id))
|
||||
topper_models[element.id] = scene
|
||||
|
@ -95,13 +95,13 @@ const setTarget = (smooth = false) => {
|
|||
goto_target.value = target
|
||||
goto_cam.value = new Vector3(f, f, f)
|
||||
} else {
|
||||
(controls.value as OrbitControlsProps).target = target
|
||||
// camera.value?.position.set(f, f, f)
|
||||
(controls.value as OrbitControlsProps).target = target;
|
||||
(controls.value as any).update()
|
||||
goto_cam.value = new Vector3(f, f, f)
|
||||
}
|
||||
}
|
||||
setTarget()
|
||||
watch([lamelles_count, fence_section], () => {
|
||||
setTarget(false)
|
||||
setTarget()
|
||||
open_calc.value = []
|
||||
})
|
||||
|
||||
|
@ -110,7 +110,9 @@ watch(open_calc, () => {
|
|||
setTarget(true)
|
||||
}
|
||||
})
|
||||
const min_for_square = 12
|
||||
const min_for_square = 12;
|
||||
|
||||
setTarget()
|
||||
</script>
|
||||
<template>
|
||||
<TresGroup name="base">
|
||||
|
|
Loading…
Reference in New Issue