Parcourir la source

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

GLTFLoader: Preload DRACO libraries on DRACO glTF load
Mr.doob il y a 5 ans
Parent
commit
92630a886c
2 fichiers modifiés avec 2 ajouts et 0 suppressions
  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();
 
 	}