Intro
I have a web service that returns a json result that contains an image path. These images are not necessarily square images (e.g. 200px x 250px).
Problem
It seems non-square images are not supported for texture mapping. In order for the texture mapping to work I have to manually download the image, resize it, and use that image for the texture mapping (and it works).
Questions
A) Could there be a way to make three.js/webgl use non-square images for texture mapping?
B) Could there be a way to programmatically load & resize an image and subsequently load it for texture mapping?
Thanks all.
Possible Solution?
I found what could be a viable option. Let me know what you guys think of this.
Basically, I will load the remote image and draw to a Canvas element which is square in size. Then I can get the image from the canvas (.getImageData) and save it to my web server's image folder (if this cant be done then I can just keep the image on the canvas). Finally, load the image for texture mapping.
I know this is pretty vague and simplistic. But hey, simpler the better, right? Will this work?