jnsmalm / pixi3d

The 3D renderer for PixiJS. Seamless integration with 2D applications.
https://pixi3d.org
MIT License
752 stars 43 forks source link

Support WEBP? [add findTextureSource()] #203

Closed MatsErdkamp closed 3 months ago

MatsErdkamp commented 4 months ago

Hi, I was running into an issue where webp files would not load due to texture.source being undefined. The source, in case of a webp file seems to be under 'texture.extensions.EXT_texture_webp.source'. To address this, I wrote a small function that searches for the 'source' key. I do not know if this is the 'right' fix, but it did fix my problem of webp's not loading.

jnsmalm commented 3 months ago

@MatsErdkamp Did this change not fix your issue?

MatsErdkamp commented 3 months ago

It did, but I made a typo in this version (as opposed to the patch-package version I was using locally. Will reopen the proper version.