-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webp images as texture on three.js #41
Comments
hello @ersenturgut — i believe it will be possible to use webp-hero for game textures you should be able to use webp-hero to convert all your webp textures to PNG images prior to loading them into the game engine i'm thinking you'll want to use one of these methods manually
then you feed the PNG images into your engine as textures additionally, you might want to take a peek at the proposed features in #39 that might be useful to your use-case, especially conditional loading to improve load times and also web workers to improve performance during the decoding process also, it might be worth consideration to implement a more proper integration for game engines like three.js and babylon.js, i'm open to ideas 👋 let me know how it goes |
Hi Chase I could not understand what you mean "you should be able to use webp-hero to convert all your webp textures to PNG images prior to loading them into the game engine" We want to convert our PNG images to WEBP. Our model mapping files are PNG. Maybe your second method works for us. I don't know yet. I have to check it. If there is an example I would be glad. Decode function reading webp images dynamically while loading as base64? and does it affect download speed? thanks... |
i will try to clear away any confusion webp-hero runs clientside within the browser, to decode webp images to PNG format, so that legacy browsers can display the images in your case, i imagine you might be looking for a workflow as follows:
so in other words, the concept with webp-hero is to reduce bandwidth data transfer by sending images down the wire as the efficient WEBP format. modern browsers can display webp natively, but for legacy browsers, we can use webp-hero to dynamically decode the downloaded webp images back into PNG format on the clientside, without any further downloading |
closing for now, feel free to reopen if you have any questions |
We are using webp hero on our website for images. Working well and no problem. But we are planning to add 3D models on our website via three.js. Tried to use webp image on our mappings but its not displaying...is there any way to use webp images on our models with webp hero?
thanks...
The text was updated successfully, but these errors were encountered: