I'm using THREE.js r98. I have to make POST request with some payload that returns an image or texture in response and I want to use this API URL with ImageLoader, render the image onto canvas. I'm not sure ImageLoader supports this. Any workaround to use image response from POST request and load that onto mesh, add to scene. I'm using the below code which works for static image URL
var imgLoader = new THREE.ImageLoader();
imgLoader.load(imgPath, function(image) {
//do stuff with image like loading onto mesh etc
});
I tried calling that API with ajax, tried converting to base64 to load onto canvas but doesn't work(Weird characters in image response of POST request)