Hi everyone.
I am trying to render an <octahedronGeometry args={[1.5, 0]} / > in react.js.
function Octahedron() {
const colorMap = useTexture([
“/geometry/alpine.jpg”,
“/geometry/ferrari.jpg”,
“/geometry/rb.jpg”,
“/geometry/mclaren.jpg”,
“/geometry/am.jpg”,
“/geometry/mercedes.jpg”,
“/geometry/am.jpg”,
“/geometry/mercedes.jpg”,
]);
return (
<octahedronGeometry args={[1.5, 0]} />
{colorMap.map((texture, idx) => (
<meshBasicMaterial
key={texture.id}
attach={material-${idx}
}
map={texture}
/>
))}
);
}
this is my code. in this case the component is not rendering. If i comment the map function, the shape will render but empty. i tried multiple types of materials but none work.
If i use instead of the octahedron, the faces of the cube are filled with my images.
Can i have some support/ guidance on this?