Hi, I exported glb object from Blender which has image emission:
It all works fine, but is it possible to dynamically change image that’s being used on emissive mesh, for now I tried this but it doesn’t seem to work:
gltfLoader.load(
'./ipad3.glb',
gltf => {
scene.add(gltf.scene)
gltf.scene.traverse(item => {
if (item.name === "Screen"){
btn.addEventListener("click", () => {
const map = imageBitmapLoader.load("./wallpaper.jpg", imageBitmap => {
console.log(imageBitmap)
item.material.emissiveMap.source.data = imageBitmap
})
})
}
})
}
)
I want when I click on button for image being used in emissiveMap to change. Is this thing even possible to do?