Skip to content

useKTX2 does not allow to use external loader instances #2418

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

Open
davcri opened this issue Apr 9, 2025 · 0 comments
Open

useKTX2 does not allow to use external loader instances #2418

davcri opened this issue Apr 9, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@davcri
Copy link
Contributor

davcri commented Apr 9, 2025

Problem description:

There is no way with useKTX2() to use an external loader instance like useGLTF.

Minimal example: https://codesandbox.io/p/sandbox/confident-hypatia-vp4s7q

Related issues

I recently needed to use useGLTF() and useKTX2() at the same time and I got this warning coming from three-stdlib/loaders/KTX2Loader.js :

THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues.

This warning means that some resources are downloaded twice and two web workers are spawned.

I'm currently submitting a PR to investigate in a possible solution.

@davcri davcri added the enhancement New feature or request label Apr 9, 2025
davcri added a commit to davcri/drei that referenced this issue Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant