瀏覽代碼

Update GLTFLoader.js

gilnoycloudinary 6 年之前
父節點
當前提交
bc73e5bd42
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      examples/js/loaders/GLTFLoader.js

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

@@ -371,7 +371,8 @@ THREE.GLTFLoader = ( function () {
 
 		lightNode.name = lightDef.name || ( 'light_' + lightIndex );
 
-		return Promise.resolve( lightNode );
+		return Promise.
+		( lightNode );
 
 	};
 
@@ -1248,8 +1249,8 @@ THREE.GLTFLoader = ( function () {
 		if ( typeof url !== 'string' || url === '' ) return '';
 		
 		// Host Relative URL
-		if (/^https?:\/\//i.test(path) && /^\//.test(url)) {
-      			path = path.replace(/(^https?:\/\/[^\/]+).*/i, "$1");
+		if ( /^https?:\/\//i.test(path) && /^\//.test(url) ) {
+			path = path.replace( /(^https?:\/\/[^\/]+).*/i , '$1' );
 		}
 
 		// Absolute URL http://,https://,//