i want to add my 3d object “arrow.glb” multiple time in my scene but when i do, just one object apear.
Here is my code:
const gltf = useLoader(GLTFLoader, "/images/arrow.glb");
return (
<group>
{positions.map((position, i) => (
<sprite
key={i}
name={names[i]}
position={[position[0], position[1], position[2]]}
scale={new THREE.Vector3(8, 8, 8)}
onClick={() => {
onClick(i);
}}
onPointerEnter={() => setIsShown(true)}
onPointerLeave={() => setIsShown(false)}
>
<primitive
object={gltf.scene}
scale={20}
position={position}
rotation={[Math.PI / 2, 0, 1]}
/>
<Html>
{isShown || windowSize < 1536 ? (
<div className="text-blue-50 text-center w-52 -ml-[104px] -mr-[104px] -m-20 align-bottom drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,1)]">
{names[i]}
</div>
) : null}
</Html>
</sprite>
))}
</group>
);