未验证 提交 bee2b8ac 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15943 from mrdoob/donmccurdy-gltfloader-draco-global

GLTFLoader: Remove dependency on 'THREE.DRACOLoader' global
......@@ -58,6 +58,9 @@
// Optional: Provide a DRACOLoader instance to decode compressed mesh data
THREE.DRACOLoader.setDecoderPath( '/examples/js/libs/draco' );
loader.setDRACOLoader( new THREE.DRACOLoader() );
// Optional: Pre-fetch Draco WASM/JS module, to save time while parsing.
THREE.DRACOLoader.getDecoderModule();
// Load a glTF resource
loader.load(
......
......@@ -496,7 +496,6 @@ THREE.GLTFLoader = ( function () {
this.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;
this.json = json;
this.dracoLoader = dracoLoader;
THREE.DRACOLoader.getDecoderModule();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册