examples/FBXLoader.js
function ( videoNode ) {

			var content = videoNode.Content;
			var fileName = videoNode.RelativeFilename || videoNode.Filename;
			var extension = fileName.slice( fileName.lastIndexOf( '.' ) + 1 ).toLowerCase();

			var type;

			switch ( extension ) {

				case 'bmp':

					type = 'image/bmp';
					break;

				case 'jpg':
				case 'jpeg':

					type = 'image/jpeg';
					break;

				case 'png':

					type = 'image/png';
					break;

				case 'tif':

					type = 'image/tiff';
					break;

				case 'tga':

					if ( typeof THREE.TGALoader !== 'function' ) {

						console.warn( 'FBXLoader: THREE.TGALoader is required to load TGA textures' );
						return;

					} else {

						if ( THREE.Loader.Handlers.get( '.tga' ) === null ) {

							THREE.Loader.Handlers.add( /\.tga$/i, new THREE.TGALoader() );

						}

						type = 'image/tga';
						break;

					}

				default:

					console.warn( 'FBXLoader: Image type "' + extension + '" is not supported.' );
					return;

			}

			if ( typeof content === 'string' ) { // ASCII format

				return 'data:' + type + ';base64,' + content;

			} else { // Binary Format

				var array = new Uint8Array( content );
				return window.URL.createObjectURL( new Blob( [ array ], { type: type } ) );

			}

		}
function ( videoNode ) {

			var content = videoNode.Content;
			var fileName = videoNode.RelativeFilename || videoNode.Filename;
			var extension = fileName.slice( fileName.lastIndexOf( '.' ) + 1 ).toLowerCase();

			var type;

			switch ( extension ) {

				case 'bmp':

					type = 'image/bmp';
					break;

				case 'jpg':
				case 'jpeg':

					type = 'image/jpeg';
					break;

				case 'png':

					type = 'image/png';
					break;

				case 'tif':

					type = 'image/tiff';
					break;

				case 'tga':

					if ( typeof THREE.TGALoader !== 'function' ) {

						console.warn( 'FBXLoader: THREE.TGALoader is required to load TGA textures' );
						return;

					} else {

						if ( THREE.Loader.Handlers.get( '.tga' ) === null ) {

							THREE.Loader.Handlers.add( /\.tga$/i, new THREE.TGALoader() );

						}

						type = 'image/tga';
						break;

					}

				default:

					console.warn( 'FBXLoader: Image type "' + extension + '" is not supported.' );
					return;

			}

			if ( typeof content === 'string' ) { // ASCII format

				return 'data:' + type + ';base64,' + content;

			} else { // Binary Format

				var array = new Uint8Array( content );
				return window.URL.createObjectURL( new Blob( [ array ], { type: type } ) );

			}

		}
function ( videoNode ) { var content = videoNode . Content ; var fileName = videoNode . RelativeFilename || videoNode . Filename ; var extension = fileName . slice ( fileName . lastIndexOf ( '.' ) + 1 ) . toLowerCase ( ) ; var type ; switch ( extension ) { case 'bmp' : type = 'image/bmp' ; break ; case 'jpg' : case 'jpeg' : type = 'image/jpeg' ; break ; case 'png' : type = 'image/png' ; break ; case 'tif' : type = 'image/tiff' ; break ; case 'tga' : if ( typeof THREE . TGALoader !== 'function' ) { console . warn ( 'FBXLoader: THREE.TGALoader is required to load TGA textures' ) ; return ; } else { if ( THREE . Loader . Handlers . get ( '.tga' ) === null ) { THREE . Loader . Handlers . add ( / \.tga$ / i , new THREE . TGALoader ( ) ) ; } type = 'image/tga' ; break ; } default : console . warn ( 'FBXLoader: Image type "' + extension + '" is not supported.' ) ; return ; } if ( typeof content === 'string' ) { // ASCII format return 'data:' + type + ';base64,' + content ; } else { // Binary Format var array = new Uint8Array ( content ) ; return window . URL . createObjectURL ( new Blob ( [ array ] , { type : type } ) ) ; } }
Parse embedded image data in FBXTree.Video.Content
Parse embedded image data in FBXTree . Video . Content