Explorar o código

Merge pull request #18066 from TyLindberg/gltf-draco-preload

GLTFLoader: Preload DRACO libraries on DRACO glTF load
Mr.doob %!s(int64=5) %!d(string=hai) anos
pai
achega
92630a886c
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      examples/js/loaders/GLTFLoader.js
  2. 1 0
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 0
examples/js/loaders/GLTFLoader.js

@@ -490,6 +490,7 @@ THREE.GLTFLoader = ( function () {
 		this.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;
 		this.json = json;
 		this.dracoLoader = dracoLoader;
+		this.dracoLoader.preload();
 
 	}
 

+ 1 - 0
examples/jsm/loaders/GLTFLoader.js

@@ -557,6 +557,7 @@ var GLTFLoader = ( function () {
 		this.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;
 		this.json = json;
 		this.dracoLoader = dracoLoader;
+		this.dracoLoader.preload();
 
 	}