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

Merge pull request #12887 from takahirox/MethodChaining

Enable LoadingManager and GLTFLoader Method chaining
Mr.doob 7 жил өмнө
parent
commit
97e7bf605d

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

@@ -57,12 +57,14 @@ THREE.GLTFLoader = ( function () {
 		setCrossOrigin: function ( value ) {
 
 			this.crossOrigin = value;
+			return this;
 
 		},
 
 		setPath: function ( value ) {
 
 			this.path = value;
+			return this;
 
 		},
 

+ 1 - 0
src/loaders/LoadingManager.js

@@ -83,6 +83,7 @@ function LoadingManager( onLoad, onProgress, onError ) {
 	this.setURLModifier = function ( transform ) {
 
 		urlModifier = transform;
+		return this;
 
 	};