0
  const texture = useLoader(THREE.TextureLoader, 'assets/texture.png')
return (
  <mesh position={[-0.00008, -0.00008, -1.26303]}>
    {/*Alioth*/}
    <sphereBufferGeometry
      attach="geometry"
      args={[1.26068]}
    >
      <meshStandardMaterial map={texture} attach="material"/>
    </sphereBufferGeometry>
  </mesh>
)

I have the above code, the sphere does get rendered but the texture is not applied, when I look at my network tab I can see this texture is found and loaded correctly.

As far as I can tell this is what I am supposed to do per the documentation.

I have also tried to use @react-three/drei helper classes but I cannot get this texture to be loaded.

What am I missing?

user1383163
  • 577
  • 1
  • 7
  • 24

1 Answers1

1

It turns out this code works fine, I had just set the size of the sphere geometry too small, I had to do this to scale to a level where it would not cause a massive performance issue but have found a solution to this.

user1383163
  • 577
  • 1
  • 7
  • 24