remove position hack for zone + fade-in-out anims

This commit is contained in:
wass08
2026-03-04 11:22:01 +01:00
parent add637e11c
commit 5e0c64b760
3 changed files with 15 additions and 27 deletions
@@ -25,16 +25,10 @@ export const ViewerZoneSystem = () => {
obj.visible = shouldShow
// Also hide the label
const label = obj.getObjectByName('label')
if (label) {
// Hide label if zone layer is off OR if in solo mode on a different level
const labelPosition = obj.userData.labelPosition as [number, number, number] | undefined
if (shouldShow && labelPosition) {
label.position.set(...labelPosition)
} else {
label.position.set(-9999, -9999, -9999)
}
const targetOpacity = shouldShow ? '1' : '0'
const labelEl = document.getElementById(`${id}-label`)
if (labelEl && labelEl.style.opacity !== targetOpacity) {
labelEl.style.opacity = targetOpacity
}
})
})