提交 312439ef 编写于 作者: T Takahiro

Strict path check with undefined in GLTFLoader

上级 b8e3cf63
......@@ -24,7 +24,7 @@ THREE.GLTFLoader = ( function () {
var scope = this;
var path = this.path && ( typeof this.path === 'string' ) ? this.path : THREE.Loader.prototype.extractUrlBase( url );
var path = this.path !== undefined ? this.path : THREE.Loader.prototype.extractUrlBase( url );
var loader = new THREE.FileLoader( scope.manager );
......@@ -122,9 +122,11 @@ THREE.GLTFLoader = ( function () {
console.time( 'GLTFLoader' );
if ( path === undefined ) path = this.path !== undefined ? this.path : '';
var parser = new GLTFParser( json, extensions, {
path: path || this.path,
path: path,
crossOrigin: this.crossOrigin,
manager: this.manager
......@@ -1117,7 +1119,7 @@ THREE.GLTFLoader = ( function () {
}
// Relative URL
return ( path || '' ) + url;
return path + url;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册