Explorar o código

fix resolveURL for url startWidth //

06wj %!s(int64=8) %!d(string=hai) anos
pai
achega
d7a365c3f2
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      examples/js/loaders/GLTF2Loader.js
  2. 2 2
      examples/js/loaders/GLTFLoader.js

+ 2 - 2
examples/js/loaders/GLTF2Loader.js

@@ -632,8 +632,8 @@ THREE.GLTF2Loader = ( function () {
 		if ( typeof url !== 'string' || url === '' )
 			return '';
 
-		// Absolute URL
-		if ( /^https?:\/\//i.test( url ) ) {
+		// Absolute URL http://,https://,//
+		if ( /^(https?:)?\/\//i.test( url ) ) {
 
 			return url;
 

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

@@ -644,8 +644,8 @@ THREE.GLTFLoader = ( function () {
 		if ( typeof url !== 'string' || url === '' )
 			return '';
 
-		// Absolute URL
-		if ( /^https?:\/\//i.test( url ) ) {
+		// Absolute URL http://,https://,//
+		if ( /^(https?:)?\/\//i.test( url ) ) {
 
 			return url;