hello everyone ,i am using react three fiber and i have a room fbx model
on the wall there is a frame and i want to add an image to this frame.
the problem i have here is the image doesn’t appear instead of that a dark gray color appear.
but if i changed the color of the material to red by example the color appear,but when i add a texture the image don’t appear
my code:
const obj = useLoader(FBXLoader, “./frame-test.FBX”);
const texture = useTexture(“./three.jpg”);
useEffect(() => {
obj.traverse((child) => {
if (child.isMesh && child.name === "image") {
child.material.map=texture,
child.material.needsUpdate = true
}
});
}, [obj, texture]);
return (
)