Debido al uso recientemente agregado de BitmapLoader en GLFTLoader (https://github.com/mrdoob/three.js/pull/19518), el uso de controladores para formatos de archivo específicos se sobrescribirá desde BitmapLoader.
En r117 para admitir texturas base para archivos gltf, solo necesitaría agregar
var basisLoader = new BasisTextureLoader();
basisLoader.setTranscoderPath( 'js/libs/basis/' );
basisLoader.detectSupport( renderer );
THREE.DefaultLoadingManager.addHandler( /\.basis$/, basisLoader );
Esto ya no es posible, ya que la resolución se sobrescribirá aquí: https://github.com/mrdoob/three.js/blob/7df06a0e4054247f87a7b5aa555ca97cd6b15662/examples/jsm/loaders/GLTFLoader.js#L2077 -L2093
Recibo el siguiente error:
THREE.WebGLState: TypeError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': No function was found that matched the signature provided.
at Object.texImage2D (three.module.js:21828)
at uploadTexture (three.module.js:22749)
at setTexture2D (three.module.js:22274)
at WebGLTextures.safeSetTexture2D (three.module.js:23169)
at SingleUniform.setValueT1 [as setValue] (three.module.js:17755)
at Function.WebGLUniforms.upload (three.module.js:18260)
at setProgram (three.module.js:26406)
at WebGLRenderer.renderBufferDirect (three.module.js:25441)
at renderObject (three.module.js:25994)
at renderObjects (three.module.js:25966)
El mismo error ocurre con uno de los ejemplos oficiales cuando se usa la extensión glTF-dds
:
@JohannesDeml ¿Puede verificar si el PR vinculado resuelve su problema? Al menos podría arreglar el ejemplo de DDS con él ^^.
@ Mugen87 Sí, eso me soluciona el problema. ¡Muchas gracias por encargarte del error tan rápido!
Comentario más útil
@ Mugen87 Sí, eso me soluciona el problema. ¡Muchas gracias por encargarte del error tan rápido!