bx-1316-refactoring #14

Merged
ksenia_mikhailova merged 46 commits from bx-1316-refactoring into dev 2024-08-28 15:06:52 +03:00
1 changed files with 9 additions and 1 deletions
Showing only changes of commit 6c5b34ffe8 - Show all commits

View File

@ -210,12 +210,20 @@ const loadModels = async () => {
const { onAfterRender } = useLoop() const { onAfterRender } = useLoop()
onAfterRender(() => { onAfterRender(() => {
let i = 0.01
clickable_refs.value.map(el => { clickable_refs.value.map(el => {
// i += 2
if (el.value[0].children[0] && typeof el.value[0].children[0].lookAt == 'function') { if (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);
// el.value[0].updateMatrixWorld()
} }
if (el.value[0].children[1].position.y < 50 && el.value[0].children[1].position.y > 20) {
el.value[0].children[1].position.y -= i
} else if (el.value[0].children[1].position.y > 20) {
el.value[0].children[1].position.y += i
}
// el.value[0].updateMatrixWorld()
el.value[0]._needsUpdate = true
}) })
if (controls.value) { if (controls.value) {
if (timer.value == 0) { if (timer.value == 0) {