提交 a93688a7 编写于 作者: A Arseny Kapoulkine

When the decoder isn't specified or WebAssembly isn't supported, skip decoding

This makes sure that files with EXT_meshopt_compression used as a
non-required extension don't fail to load.
上级 191a7936
......@@ -742,9 +742,9 @@ THREE.GLTFLoader = ( function () {
var buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );
var decoder = this.parser.options.meshoptDecoder;
if ( !decoder ) {
if ( !decoder || !decoder.supported ) {
throw new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );
return null; // will use the fallback buffer if present
}
......
......@@ -805,9 +805,9 @@ var GLTFLoader = ( function () {
var buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );
var decoder = this.parser.options.meshoptDecoder;
if ( !decoder ) {
if ( !decoder || !decoder.supported ) {
throw new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );
return null; // will use the fallback buffer if present
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册