由于最近在GLFTLoader(https://github.com/mrdoob/three.js/pull/19518)中增加了BitmapLoader的用法,使用特定文件格式的处理程序将从BitmapLoader中覆盖。
在r117中支持gltf文件的基础纹理,您只需添加
var basisLoader = new BasisTextureLoader();
basisLoader.setTranscoderPath( 'js/libs/basis/' );
basisLoader.detectSupport( renderer );
THREE.DefaultLoadingManager.addHandler( /\.basis$/, basisLoader );
这不再可能,因为解决方案将在此处覆盖: https :
我收到以下错误:
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)
使用glTF-dds
扩展名时,其中一个官方示例发生相同的错误:
@JohannesDeml您能否检查链接的PR是否解决了您的问题? 至少我可以用它来修复DDS示例^^。
@ Mugen87是的,这确实为我解决了问题。 非常感谢您如此迅速地解决了该错误!
最有用的评论
@ Mugen87是的,这确实为我解决了问题。 非常感谢您如此迅速地解决了该错误!