Quellcode durchsuchen

GLTFLoader method chainable register/unregister

Takahiro vor 5 Jahren
Ursprung
Commit
c2fe64e18c
2 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 4 0
      examples/js/loaders/GLTFLoader.js
  2. 4 0
      examples/jsm/loaders/GLTFLoader.js

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

@@ -121,6 +121,8 @@ THREE.GLTFLoader = ( function () {
 
 			}
 
+			return this;
+
 		},
 
 		unregister: function ( plugin ) {
@@ -131,6 +133,8 @@ THREE.GLTFLoader = ( function () {
 
 			}
 
+			return this;
+
 		},
 
 		parse: function ( data, path, onLoad, onError ) {

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

@@ -185,6 +185,8 @@ var GLTFLoader = ( function () {
 
 			}
 
+			return this;
+
 		},
 
 		unregister: function ( plugin ) {
@@ -195,6 +197,8 @@ var GLTFLoader = ( function () {
 
 			}
 
+			return this;
+
 		},
 
 		parse: function ( data, path, onLoad, onError ) {