drei
drei copied to clipboard
`useKTX2` does not allow to use external loader instances
Problem description:
There is no way with useKTX2() to use an external loader instance like useGLTF (see https://drei.docs.pmnd.rs/loaders/gltf-use-gltf#extendloader).
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.
Minimal example
https://codesandbox.io/p/sandbox/confident-hypatia-vp4s7q