Mugen87 преди 7 години
родител
ревизия
6296fcda01

+ 44 - 39
examples/js/exporters/GLTFExporter.js

@@ -2,9 +2,9 @@
  * @author fernandojsg / http://fernandojsg.com
  * @author fernandojsg / http://fernandojsg.com
  */
  */
 
 
- //------------------------------------------------------------------------------
- // Constants
- //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
 var WEBGL_CONSTANTS = {
 var WEBGL_CONSTANTS = {
 	POINTS: 0x0000,
 	POINTS: 0x0000,
 	LINES: 0x0001,
 	LINES: 0x0001,
@@ -37,7 +37,7 @@ var THREE_TO_WEBGL = {
 	1006: WEBGL_CONSTANTS.LINEAR,
 	1006: WEBGL_CONSTANTS.LINEAR,
 	1007: WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST,
 	1007: WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST,
 	1008: WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR
 	1008: WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR
- };
+};
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 // GLTF Exporter
 // GLTF Exporter
@@ -96,11 +96,11 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function equalArray( array1, array2 ) {
 		function equalArray( array1, array2 ) {
 
 
-			return ( array1.length === array2.length ) && array1.every( function( element, index ) {
+			return ( array1.length === array2.length ) && array1.every( function ( element, index ) {
 
 
 				return element === array2[ index ];
 				return element === array2[ index ];
 
 
-			});
+			} );
 
 
 		}
 		}
 
 
@@ -118,9 +118,9 @@ THREE.GLTFExporter.prototype = {
 
 
 			};
 			};
 
 
-			for ( var i = 0; i < attribute.count; i++ ) {
+			for ( var i = 0; i < attribute.count; i ++ ) {
 
 
-				for ( var a = 0; a < attribute.itemSize; a++ ) {
+				for ( var a = 0; a < attribute.itemSize; a ++ ) {
 
 
 					var value = attribute.array[ i * attribute.itemSize + a ];
 					var value = attribute.array[ i * attribute.itemSize + a ];
 					output.min[ a ] = Math.min( output.min[ a ], value );
 					output.min[ a ] = Math.min( output.min[ a ], value );
@@ -131,6 +131,7 @@ THREE.GLTFExporter.prototype = {
 			}
 			}
 
 
 			return output;
 			return output;
+
 		}
 		}
 
 
 		/**
 		/**
@@ -141,7 +142,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processBuffer( attribute, componentType, start, count ) {
 		function processBuffer( attribute, componentType, start, count ) {
 
 
-			if ( !outputJSON.buffers ) {
+			if ( ! outputJSON.buffers ) {
 
 
 				outputJSON.buffers = [
 				outputJSON.buffers = [
 
 
@@ -164,9 +165,9 @@ THREE.GLTFExporter.prototype = {
 
 
 			var dataView = new DataView( new ArrayBuffer( byteLength ) );
 			var dataView = new DataView( new ArrayBuffer( byteLength ) );
 
 
-			for ( var i = start; i < start + count; i++ ) {
+			for ( var i = start; i < start + count; i ++ ) {
 
 
-				for (var a = 0; a < attribute.itemSize; a++ ) {
+				for ( var a = 0; a < attribute.itemSize; a ++ ) {
 
 
 					var value = attribute.array[ i * attribute.itemSize + a ];
 					var value = attribute.array[ i * attribute.itemSize + a ];
 
 
@@ -195,6 +196,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			// Always using just one buffer
 			// Always using just one buffer
 			return 0;
 			return 0;
+
 		}
 		}
 
 
 		/**
 		/**
@@ -206,7 +208,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			var isVertexAttributes = componentType === WEBGL_CONSTANTS.FLOAT;
 			var isVertexAttributes = componentType === WEBGL_CONSTANTS.FLOAT;
 
 
-			if ( !outputJSON.bufferViews ) {
+			if ( ! outputJSON.bufferViews ) {
 
 
 				outputJSON.bufferViews = [];
 				outputJSON.bufferViews = [];
 
 
@@ -250,7 +252,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processAccessor( attribute, geometry ) {
 		function processAccessor( attribute, geometry ) {
 
 
-			if ( !outputJSON.accessors ) {
+			if ( ! outputJSON.accessors ) {
 
 
 				outputJSON.accessors = [];
 				outputJSON.accessors = [];
 
 
@@ -293,8 +295,10 @@ THREE.GLTFExporter.prototype = {
 
 
 			// @TODO Indexed buffer geometry with drawRange not supported yet
 			// @TODO Indexed buffer geometry with drawRange not supported yet
 			if ( options.truncateDrawRange && geometry.index === null ) {
 			if ( options.truncateDrawRange && geometry.index === null ) {
+
 				start = geometry.drawRange.start;
 				start = geometry.drawRange.start;
 				count = geometry.drawRange.count !== Infinity ? geometry.drawRange.count : attribute.count;
 				count = geometry.drawRange.count !== Infinity ? geometry.drawRange.count : attribute.count;
+
 			}
 			}
 
 
 			var bufferView = processBufferView( attribute, componentType, start, count );
 			var bufferView = processBufferView( attribute, componentType, start, count );
@@ -330,7 +334,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			}
 			}
 
 
-			if ( !outputJSON.images ) {
+			if ( ! outputJSON.images ) {
 
 
 				outputJSON.images = [];
 				outputJSON.images = [];
 
 
@@ -365,7 +369,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processSampler( map ) {
 		function processSampler( map ) {
 
 
-			if ( !outputJSON.samplers ) {
+			if ( ! outputJSON.samplers ) {
 
 
 				outputJSON.samplers = [];
 				outputJSON.samplers = [];
 
 
@@ -393,7 +397,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processTexture( map ) {
 		function processTexture( map ) {
 
 
-			if (!outputJSON.textures) {
+			if ( ! outputJSON.textures ) {
 
 
 				outputJSON.textures = [];
 				outputJSON.textures = [];
 
 
@@ -425,7 +429,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			}
 			}
 
 
-			if ( !outputJSON.materials ) {
+			if ( ! outputJSON.materials ) {
 
 
 				outputJSON.materials = [];
 				outputJSON.materials = [];
 
 
@@ -439,7 +443,7 @@ THREE.GLTFExporter.prototype = {
 			}
 			}
 
 
 
 
-			if ( !( material instanceof THREE.MeshStandardMaterial ) ) {
+			if ( ! ( material instanceof THREE.MeshStandardMaterial ) ) {
 
 
 				console.warn( 'GLTFExporter: Currently just THREE.StandardMaterial is supported. Material conversion may lose information.' );
 				console.warn( 'GLTFExporter: Currently just THREE.StandardMaterial is supported. Material conversion may lose information.' );
 
 
@@ -455,7 +459,7 @@ THREE.GLTFExporter.prototype = {
 			// pbrMetallicRoughness.baseColorFactor
 			// pbrMetallicRoughness.baseColorFactor
 			var color = material.color.toArray().concat( [ material.opacity ] );
 			var color = material.color.toArray().concat( [ material.opacity ] );
 
 
-			if ( !equalArray( color, [ 1, 1, 1, 1 ] ) ) {
+			if ( ! equalArray( color, [ 1, 1, 1, 1 ] ) ) {
 
 
 				gltfMaterial.pbrMetallicRoughness.baseColorFactor = color;
 				gltfMaterial.pbrMetallicRoughness.baseColorFactor = color;
 
 
@@ -468,8 +472,8 @@ THREE.GLTFExporter.prototype = {
 
 
 			} else {
 			} else {
 
 
-					gltfMaterial.pbrMetallicRoughness.metallicFactor = 0.5;
-					gltfMaterial.pbrMetallicRoughness.roughnessFactor = 0.5;
+				gltfMaterial.pbrMetallicRoughness.metallicFactor = 0.5;
+				gltfMaterial.pbrMetallicRoughness.roughnessFactor = 0.5;
 
 
 			}
 			}
 
 
@@ -493,7 +497,7 @@ THREE.GLTFExporter.prototype = {
 				// emissiveFactor
 				// emissiveFactor
 				var emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity ).toArray();
 				var emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity ).toArray();
 
 
-				if ( !equalArray( emissive, [ 0, 0, 0 ] ) ) {
+				if ( ! equalArray( emissive, [ 0, 0, 0 ] ) ) {
 
 
 					gltfMaterial.emissiveFactor = emissive;
 					gltfMaterial.emissiveFactor = emissive;
 
 
@@ -521,11 +525,11 @@ THREE.GLTFExporter.prototype = {
 
 
 				};
 				};
 
 
-				if ( material.normalScale.x !== -1 ) {
+				if ( material.normalScale.x !== - 1 ) {
 
 
 					if ( material.normalScale.x !== material.normalScale.y ) {
 					if ( material.normalScale.x !== material.normalScale.y ) {
 
 
-						console.warn('GLTFExporter: Normal scale components are different, ignoring Y and exporting X');
+						console.warn( 'THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.' );
 
 
 					}
 					}
 
 
@@ -594,7 +598,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processMesh( mesh ) {
 		function processMesh( mesh ) {
 
 
-			if ( !outputJSON.meshes ) {
+			if ( ! outputJSON.meshes ) {
 
 
 				outputJSON.meshes = [];
 				outputJSON.meshes = [];
 
 
@@ -623,7 +627,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			} else {
 			} else {
 
 
-				if ( !geometry.isBufferGeometry ) {
+				if ( ! geometry.isBufferGeometry ) {
 
 
 					var geometryTemp = new THREE.BufferGeometry();
 					var geometryTemp = new THREE.BufferGeometry();
 					geometryTemp.fromGeometry( geometry );
 					geometryTemp.fromGeometry( geometry );
@@ -673,7 +677,6 @@ THREE.GLTFExporter.prototype = {
 
 
 			// We've just one primitive per mesh
 			// We've just one primitive per mesh
 			var gltfAttributes = gltfMesh.primitives[ 0 ].attributes;
 			var gltfAttributes = gltfMesh.primitives[ 0 ].attributes;
-			var attributes = geometry.attributes;
 
 
 			// Conversion between attributes names in threejs and gltf spec
 			// Conversion between attributes names in threejs and gltf spec
 			var nameConversion = {
 			var nameConversion = {
@@ -699,6 +702,7 @@ THREE.GLTFExporter.prototype = {
 			outputJSON.meshes.push( gltfMesh );
 			outputJSON.meshes.push( gltfMesh );
 
 
 			return outputJSON.meshes.length - 1;
 			return outputJSON.meshes.length - 1;
+
 		}
 		}
 
 
 		/**
 		/**
@@ -708,7 +712,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processCamera( camera ) {
 		function processCamera( camera ) {
 
 
-			if ( !outputJSON.cameras ) {
+			if ( ! outputJSON.cameras ) {
 
 
 				outputJSON.cameras = [];
 				outputJSON.cameras = [];
 
 
@@ -755,6 +759,7 @@ THREE.GLTFExporter.prototype = {
 			outputJSON.cameras.push( gltfCamera );
 			outputJSON.cameras.push( gltfCamera );
 
 
 			return outputJSON.cameras.length - 1;
 			return outputJSON.cameras.length - 1;
+
 		}
 		}
 
 
 		/**
 		/**
@@ -771,7 +776,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			}
 			}
 
 
-			if ( !outputJSON.nodes ) {
+			if ( ! outputJSON.nodes ) {
 
 
 				outputJSON.nodes = [];
 				outputJSON.nodes = [];
 
 
@@ -785,19 +790,19 @@ THREE.GLTFExporter.prototype = {
 				var position = object.position.toArray();
 				var position = object.position.toArray();
 				var scale = object.scale.toArray();
 				var scale = object.scale.toArray();
 
 
-				if ( !equalArray( rotation, [ 0, 0, 0, 1 ] ) ) {
+				if ( ! equalArray( rotation, [ 0, 0, 0, 1 ] ) ) {
 
 
 					gltfNode.rotation = rotation;
 					gltfNode.rotation = rotation;
 
 
 				}
 				}
 
 
-				if ( !equalArray( position, [ 0, 0, 0 ] ) ) {
+				if ( ! equalArray( position, [ 0, 0, 0 ] ) ) {
 
 
 					gltfNode.position = position;
 					gltfNode.position = position;
 
 
 				}
 				}
 
 
-				if ( !equalArray( scale, [ 1, 1, 1 ] ) ) {
+				if ( ! equalArray( scale, [ 1, 1, 1 ] ) ) {
 
 
 					gltfNode.scale = scale;
 					gltfNode.scale = scale;
 
 
@@ -806,7 +811,7 @@ THREE.GLTFExporter.prototype = {
 			} else {
 			} else {
 
 
 				object.updateMatrix();
 				object.updateMatrix();
-				if (! equalArray( object.matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ) ) {
+				if ( ! equalArray( object.matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ) ) {
 
 
 					gltfNode.matrix = object.matrix.elements;
 					gltfNode.matrix = object.matrix.elements;
 
 
@@ -826,9 +831,9 @@ THREE.GLTFExporter.prototype = {
 
 
 					gltfNode.extras = JSON.parse( JSON.stringify( object.userData ) );
 					gltfNode.extras = JSON.parse( JSON.stringify( object.userData ) );
 
 
-				} catch (e) {
+				} catch ( e ) {
 
 
-					throw new Error( 'GLTFExporter: userData can\'t be serialized' );
+					throw new Error( 'THREE.GLTFExporter: userData can\'t be serialized' );
 
 
 				}
 				}
 
 
@@ -889,7 +894,7 @@ THREE.GLTFExporter.prototype = {
 		 */
 		 */
 		function processScene( scene ) {
 		function processScene( scene ) {
 
 
-			if ( !outputJSON.scenes ) {
+			if ( ! outputJSON.scenes ) {
 
 
 				outputJSON.scenes = [];
 				outputJSON.scenes = [];
 				outputJSON.scene = 0;
 				outputJSON.scene = 0;
@@ -947,7 +952,7 @@ THREE.GLTFExporter.prototype = {
 			var scene = new THREE.Scene();
 			var scene = new THREE.Scene();
 			scene.name = 'AuxScene';
 			scene.name = 'AuxScene';
 
 
-			for ( var i = 0; i < objects.length; i++ ) {
+			for ( var i = 0; i < objects.length; i ++ ) {
 
 
 				// We push directly to children instead of calling `add` to prevent
 				// We push directly to children instead of calling `add` to prevent
 				// modify the .parent and break its original scene and hierarchy
 				// modify the .parent and break its original scene and hierarchy
@@ -965,7 +970,7 @@ THREE.GLTFExporter.prototype = {
 
 
 			var objectsWithoutScene = [];
 			var objectsWithoutScene = [];
 
 
-			for ( var i = 0; i < input.length; i++ ) {
+			for ( var i = 0; i < input.length; i ++ ) {
 
 
 				if ( input[ i ] instanceof THREE.Scene ) {
 				if ( input[ i ] instanceof THREE.Scene ) {
 
 
@@ -1011,7 +1016,7 @@ THREE.GLTFExporter.prototype = {
 
 
 		} else {
 		} else {
 
 
-			onDone ( outputJSON );
+			onDone( outputJSON );
 
 
 		}
 		}
 
 

+ 5 - 6
examples/js/exporters/MMDExporter.js

@@ -37,7 +37,7 @@ THREE.MMDExporter = function () {
 
 
 		for ( var i = 0, il = str.length; i < il; i ++ ) {
 		for ( var i = 0, il = str.length; i < il; i ++ ) {
 
 
-			var code = str.charCodeAt( i )
+			var code = str.charCodeAt( i );
 
 
 			var value = u2sTable[ code ];
 			var value = u2sTable[ code ];
 
 
@@ -104,7 +104,7 @@ THREE.MMDExporter = function () {
 
 
 			var a = num.toString();
 			var a = num.toString();
 
 
-			if ( a.indexOf( '.' ) === -1 ) {
+			if ( a.indexOf( '.' ) === - 1 ) {
 
 
 				a += '.';
 				a += '.';
 
 
@@ -180,9 +180,9 @@ THREE.MMDExporter = function () {
 			var qArray = quaternion2.copy( bone2.quaternion ).conjugate().multiply( quaternion ).toArray();
 			var qArray = quaternion2.copy( bone2.quaternion ).conjugate().multiply( quaternion ).toArray();
 
 
 			// right to left
 			// right to left
-			pArray[ 2 ] = -pArray[ 2 ];
-			qArray[ 0 ] = -qArray[ 0 ];
-			qArray[ 1 ] = -qArray[ 1 ];
+			pArray[ 2 ] = - pArray[ 2 ];
+			qArray[ 0 ] = - qArray[ 0 ];
+			qArray[ 1 ] = - qArray[ 1 ];
 
 
 			array.push( 'Bone' + i + '{' + bone.name );
 			array.push( 'Bone' + i + '{' + bone.name );
 			array.push( '  ' + toStringsFromArray( pArray ) + ';' );
 			array.push( '  ' + toStringsFromArray( pArray ) + ';' );
@@ -208,4 +208,3 @@ THREE.MMDExporter = function () {
 	*/
 	*/
 
 
 };
 };
-

+ 16 - 15
examples/js/exporters/OBJExporter.js

@@ -51,14 +51,16 @@ THREE.OBJExporter.prototype = {
 
 
 				// name of the mesh material
 				// name of the mesh material
 				if ( mesh.material && mesh.material.name ) {
 				if ( mesh.material && mesh.material.name ) {
+
 					output += 'usemtl ' + mesh.material.name + '\n';
 					output += 'usemtl ' + mesh.material.name + '\n';
+
 				}
 				}
 
 
 				// vertices
 				// vertices
 
 
-				if( vertices !== undefined ) {
+				if ( vertices !== undefined ) {
 
 
-					for ( i = 0, l = vertices.count; i < l; i ++, nbVertex++ ) {
+					for ( i = 0, l = vertices.count; i < l; i ++, nbVertex ++ ) {
 
 
 						vertex.x = vertices.getX( i );
 						vertex.x = vertices.getX( i );
 						vertex.y = vertices.getY( i );
 						vertex.y = vertices.getY( i );
@@ -76,9 +78,9 @@ THREE.OBJExporter.prototype = {
 
 
 				// uvs
 				// uvs
 
 
-				if( uvs !== undefined ) {
+				if ( uvs !== undefined ) {
 
 
-					for ( i = 0, l = uvs.count; i < l; i ++, nbVertexUvs++ ) {
+					for ( i = 0, l = uvs.count; i < l; i ++, nbVertexUvs ++ ) {
 
 
 						uv.x = uvs.getX( i );
 						uv.x = uvs.getX( i );
 						uv.y = uvs.getY( i );
 						uv.y = uvs.getY( i );
@@ -92,11 +94,11 @@ THREE.OBJExporter.prototype = {
 
 
 				// normals
 				// normals
 
 
-				if( normals !== undefined ) {
+				if ( normals !== undefined ) {
 
 
 					normalMatrixWorld.getNormalMatrix( mesh.matrixWorld );
 					normalMatrixWorld.getNormalMatrix( mesh.matrixWorld );
 
 
-					for ( i = 0, l = normals.count; i < l; i ++, nbNormals++ ) {
+					for ( i = 0, l = normals.count; i < l; i ++, nbNormals ++ ) {
 
 
 						normal.x = normals.getX( i );
 						normal.x = normals.getX( i );
 						normal.y = normals.getY( i );
 						normal.y = normals.getY( i );
@@ -114,11 +116,11 @@ THREE.OBJExporter.prototype = {
 
 
 				// faces
 				// faces
 
 
-				if( indices !== null ) {
+				if ( indices !== null ) {
 
 
 					for ( i = 0, l = indices.count; i < l; i += 3 ) {
 					for ( i = 0, l = indices.count; i < l; i += 3 ) {
 
 
-						for( m = 0; m < 3; m ++ ){
+						for ( m = 0; m < 3; m ++ ) {
 
 
 							j = indices.getX( i + m ) + 1;
 							j = indices.getX( i + m ) + 1;
 
 
@@ -135,7 +137,7 @@ THREE.OBJExporter.prototype = {
 
 
 					for ( i = 0, l = vertices.count; i < l; i += 3 ) {
 					for ( i = 0, l = vertices.count; i < l; i += 3 ) {
 
 
-						for( m = 0; m < 3; m ++ ){
+						for ( m = 0; m < 3; m ++ ) {
 
 
 							j = i + m + 1;
 							j = i + m + 1;
 
 
@@ -163,7 +165,7 @@ THREE.OBJExporter.prototype = {
 
 
 		};
 		};
 
 
-		var parseLine = function( line ) {
+		var parseLine = function ( line ) {
 
 
 			var nbVertex = 0;
 			var nbVertex = 0;
 
 
@@ -180,14 +182,13 @@ THREE.OBJExporter.prototype = {
 
 
 				// shortcuts
 				// shortcuts
 				var vertices = geometry.getAttribute( 'position' );
 				var vertices = geometry.getAttribute( 'position' );
-				var indices = geometry.getIndex();
 
 
 				// name of the line object
 				// name of the line object
 				output += 'o ' + line.name + '\n';
 				output += 'o ' + line.name + '\n';
 
 
-				if( vertices !== undefined ) {
+				if ( vertices !== undefined ) {
 
 
-					for ( i = 0, l = vertices.count; i < l; i ++, nbVertex++ ) {
+					for ( i = 0, l = vertices.count; i < l; i ++, nbVertex ++ ) {
 
 
 						vertex.x = vertices.getX( i );
 						vertex.x = vertices.getX( i );
 						vertex.y = vertices.getY( i );
 						vertex.y = vertices.getY( i );
@@ -207,7 +208,7 @@ THREE.OBJExporter.prototype = {
 
 
 					output += 'l ';
 					output += 'l ';
 
 
-					for ( j = 1, l = vertices.count; j <= l; j++ ) {
+					for ( j = 1, l = vertices.count; j <= l; j ++ ) {
 
 
 						output += ( indexVertex + j ) + ' ';
 						output += ( indexVertex + j ) + ' ';
 
 
@@ -229,7 +230,7 @@ THREE.OBJExporter.prototype = {
 
 
 			} else {
 			} else {
 
 
-				console.warn('THREE.OBJExporter.parseLine(): geometry type unsupported', geometry );
+				console.warn( 'THREE.OBJExporter.parseLine(): geometry type unsupported', geometry );
 
 
 			}
 			}
 
 

+ 1 - 1
examples/js/exporters/STLExporter.js

@@ -27,7 +27,7 @@ THREE.STLExporter.prototype = {
 					var geometry = object.geometry;
 					var geometry = object.geometry;
 					var matrixWorld = object.matrixWorld;
 					var matrixWorld = object.matrixWorld;
 
 
-					if( geometry instanceof THREE.BufferGeometry ) {
+					if ( geometry instanceof THREE.BufferGeometry ) {
 
 
 						geometry = new THREE.Geometry().fromBufferGeometry( geometry );
 						geometry = new THREE.Geometry().fromBufferGeometry( geometry );
 
 

+ 2 - 2
examples/js/exporters/TypedGeometryExporter.js

@@ -23,7 +23,7 @@ THREE.TypedGeometryExporter.prototype = {
 		for ( var key in attributes ) {
 		for ( var key in attributes ) {
 
 
 			var attribute = attributes[ key ];
 			var attribute = attributes[ key ];
-			
+
 			var typedArray = geometry[ attribute ];
 			var typedArray = geometry[ attribute ];
 			var array = [];
 			var array = [];
 
 
@@ -44,7 +44,7 @@ THREE.TypedGeometryExporter.prototype = {
 			output.boundingSphere = {
 			output.boundingSphere = {
 				center: boundingSphere.center.toArray(),
 				center: boundingSphere.center.toArray(),
 				radius: boundingSphere.radius
 				radius: boundingSphere.radius
-			}
+			};
 
 
 		}
 		}