-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
KTX2Loader: Support loading uncompressed DataTexture and Data3DTexture #24129
Conversation
Seems like |
I'm seeing alternating failures in CI for:
But both look OK locally... a bit confused what might have broken here. Do these examples break locally for anyone else? |
I've downloaded your branch and tested both examples on my iMac (macOS, Chrome 102.0.5005.61). They break with the following error:
|
9433289
to
469afc1
Compare
Ah thanks! This depended on the |
Both examples work now 🎉 . |
Thanks! |
I could imagine that the There is no |
I think maybe it is already time to remove |
We have stated in #20568 (comment) that |
Originally KTX2Loader was added without an At some point I would like to get KTX2Loader working with much smaller/lighter wasm dependencies, and we will need the ktx-parse dependency for that (with or without this DataTexture / Data3DTexture support). I guess the alternative to support |
Is there a UMD version of import * as ktxParse from '../libs/ktx-parse.module.js'; Assuming I'm also fine with inlining |
I don't include a UMD module with the |
Adds support for loading KTX 2.0 textures in uncompressed formats. With #24102, THREE.KTX2Exporter (new) can export DataTexture and Data3DTexture instances to these formats.
✅ Included:
❌ Breaking change:
loader.load( 'path/to/texture.ktx2', onLoad )
no longer returns a CompressedTexture instance synchronously, because we cannot know in advance whether the return type will be CompressedTexture, DataTexture, or Data3DTexture. A callback or the async pattern,const texture = await loader.loadAsync( 'path/to/texture.ktx2' )
, should be used instead.See #24102 for more details.