elm-3d-scene icon indicating copy to clipboard operation
elm-3d-scene copied to clipboard

Add support for texture atlases

Open ianmackenzie opened this issue 3 years ago • 0 comments

Generally make it easier to construct things like quads that refer to a particular subsection of a texture...this has come up a couple times already on the Elm Slack and could be done in a few different ways:

  • Have a version of Scene3d.quad (Scene3d.sprite maybe?) that allows specifying a custom UV range
  • Have a way to create a Material value from a section of a texture so that mesh UV coordinates can still range from 0 to 1 but will end up referring to a subsection of a texture

The latter is probably nicer (figuring out what sections of a texture atlas correspond to different objects does seem like more of a concern of the texture than the objects) but will require a bit more thought to figure out how it should work.

ianmackenzie avatar Sep 17 '20 13:09 ianmackenzie