|
@@ -1246,6 +1246,11 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
// Invalid URL
|
|
// Invalid URL
|
|
if ( typeof url !== 'string' || url === '' ) return '';
|
|
if ( typeof url !== 'string' || url === '' ) return '';
|
|
|
|
+
|
|
|
|
+ // Host Relative URL
|
|
|
|
+ if (/^https?:\/\//i.test(path) && /^\//.test(url)) {
|
|
|
|
+ path = path.replace(/(^https?:\/\/[^\/]+).*/i, "$1");
|
|
|
|
+ }
|
|
|
|
|
|
// Absolute URL http://,https://,//
|
|
// Absolute URL http://,https://,//
|
|
if ( /^(https?:)?\/\//i.test( url ) ) return url;
|
|
if ( /^(https?:)?\/\//i.test( url ) ) return url;
|