2
0
Эх сурвалжийг харах

GLTFLoader: Add .setPath()

Takahiro 6 жил өмнө
parent
commit
f0832eaca0

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

@@ -31,6 +31,7 @@ THREE.GLTFLoader = ( function () {
 
 
 			var loader = new THREE.FileLoader( scope.manager );
 			var loader = new THREE.FileLoader( scope.manager );
 
 
+			loader.setPath( this.path );
 			loader.setResponseType( 'arraybuffer' );
 			loader.setResponseType( 'arraybuffer' );
 
 
 			loader.load( url, function ( data ) {
 			loader.load( url, function ( data ) {
@@ -64,6 +65,13 @@ THREE.GLTFLoader = ( function () {
 
 
 		},
 		},
 
 
+		setPath: function ( value ) {
+
+			this.path = value;
+			return this;
+
+		},
+
 		setResourcePath: function ( value ) {
 		setResourcePath: function ( value ) {
 
 
 			this.resourcePath = value;
 			this.resourcePath = value;