This commit is contained in:
Kseninia Mikhaylova 2024-08-19 10:20:36 +03:00
parent af63f8262c
commit 05046c22fb
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ const loadModels = async () => {
const { onAfterRender } = useLoop() const { onAfterRender } = useLoop()
onAfterRender(() => { onAfterRender(() => {
clickable_refs.value.map(el => { clickable_refs.value.map(el => {
if (el.value[0] && el.value[0].children[0] && typeof el.value[0].children[0].lookAt == 'function') { if (el.value[0] && el.value[0].children && el.value[0].children[0] && typeof el.value[0].children[0].lookAt == 'function') {
el.value[0].children[0].lookAt(camera.value?.position); el.value[0].children[0].lookAt(camera.value?.position);
el.value[0].children[1].lookAt(camera.value?.position); el.value[0].children[1].lookAt(camera.value?.position);
} }