asny / three-d

2D/3D renderer - makes it simple to draw stuff across platforms (including web)
MIT License
1.24k stars 105 forks source link

Texture for sphere #406

Closed guija closed 8 months ago

guija commented 8 months ago

Hi, I would like to render the earth with a texture. I tried using the texture example and replacing the texture file with a jpg of the earth surface, however I get the following error:

thread 'main' panicked at 'the material requires uv coordinate attributes but the geometry did not provide it', /home/guillermo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/three-d-0.16.1/src/renderer/geometry.rs:383:21

Do you have how I could achieve this? Thanks.

guija commented 8 months ago

Sorry, I just found this discussion thread: https://github.com/asny/three-d/discussions/363 I will of course try this. Closing this issue.