bx-1316-refactoring #14
|
@ -210,12 +210,20 @@ const loadModels = async () => {
|
|||
|
||||
const { onAfterRender } = useLoop()
|
||||
onAfterRender(() => {
|
||||
let i = 0.01
|
||||
clickable_refs.value.map(el => {
|
||||
// i += 2
|
||||
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[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 (timer.value == 0) {
|
||||
|
|
Loading…
Reference in New Issue