elm-3d-scene
elm-3d-scene copied to clipboard
Add support for automatic texture mapping
To start:
- Planar (based on a sketch plane)
- Spherical (based on a frame)
- Cylindrical (based on a frame)
Would also need a way to specify the texture scale (meters per pixel? texture width? width and height?).
Should likely be implemented as functions that transform a Material
- convert one that requires UV coordinates into one that doesn't.
Perhaps simpler: have some nice helpers for generating UV coordinates when building a mesh, e.g.
Mesh.planarUv :
Rectangle3d Meters coordinates
-> Point3d Meters coordinates
-> ( Float, Float )
Mesh.sphericalUv :
Frame3d Meters coordinates defines
-> Point3d Meters coordinates
-> ( Float, Float )