examples/FBXLoader.js
function ( textureNode, images ) {

			var fileName;

			var currentPath = this.textureLoader.path;

			var children = connections.get( textureNode.id ).children;

			if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {

				fileName = images[ children[ 0 ].ID ];

				if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {

					this.textureLoader.setPath( undefined );

				}

			}

			var texture;

			var extension = textureNode.FileName.slice( - 3 ).toLowerCase();

			if ( extension === 'tga' ) {

				var loader = THREE.Loader.Handlers.get( '.tga' );

				if ( loader === null ) {

					console.warn( 'FBXLoader: TGALoader not found, creating empty placeholder texture for', fileName );
					texture = new THREE.Texture();

				} else {

					texture = loader.load( fileName );

				}

			} else if ( extension === 'psd' ) {

				console.warn( 'FBXLoader: PSD textures are not supported, creating empty placeholder texture for', fileName );
				texture = new THREE.Texture();

			} else {

				texture = this.textureLoader.load( fileName );

			}

			this.textureLoader.setPath( currentPath );

			return texture;

		}
function ( textureNode, images ) {

			var fileName;

			var currentPath = this.textureLoader.path;

			var children = connections.get( textureNode.id ).children;

			if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {

				fileName = images[ children[ 0 ].ID ];

				if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {

					this.textureLoader.setPath( undefined );

				}

			}

			var texture;

			var extension = textureNode.FileName.slice( - 3 ).toLowerCase();

			if ( extension === 'tga' ) {

				var loader = THREE.Loader.Handlers.get( '.tga' );

				if ( loader === null ) {

					console.warn( 'FBXLoader: TGALoader not found, creating empty placeholder texture for', fileName );
					texture = new THREE.Texture();

				} else {

					texture = loader.load( fileName );

				}

			} else if ( extension === 'psd' ) {

				console.warn( 'FBXLoader: PSD textures are not supported, creating empty placeholder texture for', fileName );
				texture = new THREE.Texture();

			} else {

				texture = this.textureLoader.load( fileName );

			}

			this.textureLoader.setPath( currentPath );

			return texture;

		}
function ( textureNode , images ) { var fileName ; var currentPath = this . textureLoader . path ; var children = connections . get ( textureNode . id ) . children ; if ( children !== undefined && children . length > 0 && images [ children [ 0 ] . ID ] !== undefined ) { fileName = images [ children [ 0 ] . ID ] ; if ( fileName . indexOf ( 'blob:' ) === 0 || fileName . indexOf ( 'data:' ) === 0 ) { this . textureLoader . setPath ( undefined ) ; } } var texture ; var extension = textureNode . FileName . slice ( - 3 ) . toLowerCase ( ) ; if ( extension === 'tga' ) { var loader = THREE . Loader . Handlers . get ( '.tga' ) ; if ( loader === null ) { console . warn ( 'FBXLoader: TGALoader not found, creating empty placeholder texture for' , fileName ) ; texture = new THREE . Texture ( ) ; } else { texture = loader . load ( fileName ) ; } } else if ( extension === 'psd' ) { console . warn ( 'FBXLoader: PSD textures are not supported, creating empty placeholder texture for' , fileName ) ; texture = new THREE . Texture ( ) ; } else { texture = this . textureLoader . load ( fileName ) ; } this . textureLoader . setPath ( currentPath ) ; return texture ; }
load a texture specified as a blob or data URI, or via an external URL using THREE.TextureLoader
load a texture specified as a blob or data URI or via an external URL using THREE . TextureLoader