In the release (r119), GltfLoader has few changes,
Image type (normal image to canvas image) and
standard material to physical material changes
I need to use the source image data, so i can save the texture images in the png/jpeg (small sized) when i export the data using .toJSON, this used to work in the older version. I do understand the changes, but what can be done to seamlessly export as required?
Is there any option so that we can obtain Image with url as before rather than canvas Image?
Also for info … why do we use “Canvas Images” … just asking …
This is done, in browsers that support it, because it allows models to be loaded without freezing the page during texture->GPU upload as much. If exporting is not working after loading models, you may want to file a bug on the three.js repo with a demo to reproduce the issue.
It works, that’s not the issue!
The only issue (specific to me) is that since image is converted to canvas or url … then while exporting using .toJSON after the scene has loaded, causes to re-encode the data to a higher file size …
So i have used an hackish way to additional pass data url as src (i may or may not have used inline async call to fileread blob) … that way the toJSON uses the original encoded data (saving up to 1/4 of the data while exporting of default way)
If any other way is suggested i’ll be ready to use that …