I'm looking for the ability to pull images (from a database or wherever) and overlay these onto a THREE.Mesh (three.js) based on some user input. What I think I need to do is the following:
1) Create a new material with texture from an image and add to geometry
2) Determine the faces onto which the image will be overlaid
3) For each vertex, determine and assign the UV coordinates for the image
4) Change the materialIndex for each face to the new material
I'm just uncertain whether this will work and how to make the proper assignments to an existing Mesh. Any help would be greatly appreciated.
UPDATE
Anyone know if this is possible/easier using another library such as SceneJS?