import { useEffect, useRef } from 'react'
import { WorldRendererThree } from 'prismarine-viewer/viewer/lib/worldrendererThree'
import FullScreenWidget from './FullScreenWidget'
export const name = 'signs'
export default () => {
const signs = viewer.world instanceof WorldRendererThree ? [...viewer.world.chunkTextures.values()].flatMap(textures => {
return Object.entries(textures).map(([signPosKey, texture]) => {
const pos = signPosKey.split(',').map(Number)
return
})
}) : []
return
{signs.length} signs currently loaded:
{signs}
}
const AddElem = ({ elem }) => {
const ref = useRef(null)
useEffect(() => {
elem.style.width = '100%'
ref.current!.appendChild(elem)
return () => {
elem.remove()
}
}, [])
return
}
// for (const key of Object.keys(viewer.world.sectionObjects)) {
// const section = viewer.world.sectionObjects[key]
// for (const child of section.children) {
// if (child.name === 'mesh') child.visible = false
// }
// }