ソースを参照

add space after comma

gero3 10 年 前
コミット
760252a560

+ 2 - 2
examples/js/Cloth.js

@@ -35,7 +35,7 @@ var pins = [];
 
 var wind = true;
 var windStrength = 2;
-var windForce = new THREE.Vector3( 0,0,0 );
+var windForce = new THREE.Vector3( 0, 0, 0 );
 
 var ballPosition = new THREE.Vector3( 0, - 45, 0 );
 var ballSize = 60; //40
@@ -239,7 +239,7 @@ function simulate( time ) {
 
 		particles = cloth.particles;
 
-		for ( i = 0,il = faces.length; i < il; i ++ ) {
+		for ( i = 0, il = faces.length; i < il; i ++ ) {
 
 			face = faces[ i ];
 			normal = face.normal;

+ 4 - 4
examples/js/Sparks.js

@@ -487,7 +487,7 @@ SPARKS.ActionZone.prototype.update = function( emitter, particle, time ) {
 /*
  * Accelerate action affects velocity in specified 3d direction
  */
-SPARKS.Accelerate = function( x,y,z ) {
+SPARKS.Accelerate = function( x, y, z ) {
 
 	if ( x instanceof THREE.Vector3 ) {
 
@@ -496,7 +496,7 @@ SPARKS.Accelerate = function( x,y,z ) {
 
 	}
 
-	this.acceleration = new THREE.Vector3( x,y,z );
+	this.acceleration = new THREE.Vector3( x, y, z );
 
 };
 
@@ -569,7 +569,7 @@ SPARKS.AccelerateVelocity.prototype.update = function( emitter, particle, time )
 
 
 /* Set the max ammount of x,y,z drift movements in a second */
-SPARKS.RandomDrift = function( x,y,z ) {
+SPARKS.RandomDrift = function( x, y, z ) {
 
 	if ( x instanceof THREE.Vector3 ) {
 
@@ -578,7 +578,7 @@ SPARKS.RandomDrift = function( x,y,z ) {
 
 	}
 
-	this.drift = new THREE.Vector3( x,y,z );
+	this.drift = new THREE.Vector3( x, y, z );
 
 };
 

+ 5 - 5
examples/js/controls/TransformControls.js

@@ -382,23 +382,23 @@
 		this.handleGizmos = {
 
 			X: [
-				[ new THREE.Line( new CircleGeometry( 1,'x',0.5 ), new GizmoLineMaterial( { color: 0xff0000 } ) ) ]
+				[ new THREE.Line( new CircleGeometry( 1, 'x', 0.5 ), new GizmoLineMaterial( { color: 0xff0000 } ) ) ]
 			],
 
 			Y: [
-				[ new THREE.Line( new CircleGeometry( 1,'y',0.5 ), new GizmoLineMaterial( { color: 0x00ff00 } ) ) ]
+				[ new THREE.Line( new CircleGeometry( 1, 'y', 0.5 ), new GizmoLineMaterial( { color: 0x00ff00 } ) ) ]
 			],
 
 			Z: [
-				[ new THREE.Line( new CircleGeometry( 1,'z',0.5 ), new GizmoLineMaterial( { color: 0x0000ff } ) ) ]
+				[ new THREE.Line( new CircleGeometry( 1, 'z', 0.5 ), new GizmoLineMaterial( { color: 0x0000ff } ) ) ]
 			],
 
 			E: [
-				[ new THREE.Line( new CircleGeometry( 1.25,'z',1 ), new GizmoLineMaterial( { color: 0xcccc00 } ) ) ]
+				[ new THREE.Line( new CircleGeometry( 1.25, 'z', 1 ), new GizmoLineMaterial( { color: 0xcccc00 } ) ) ]
 			],
 
 			XYZE: [
-				[ new THREE.Line( new CircleGeometry( 1,'z',1 ), new GizmoLineMaterial( { color: 0x787878 } ) ) ]
+				[ new THREE.Line( new CircleGeometry( 1, 'z', 1 ), new GizmoLineMaterial( { color: 0x787878 } ) ) ]
 			]
 
 		};

+ 1 - 1
examples/js/loaders/AssimpJSONLoader.js

@@ -123,7 +123,7 @@ THREE.AssimpJSONLoader.prototype = {
 		for ( in_data = json.faces, i = 0, e = in_data.length; i < e; ++ i ) {
 
 			src = in_data[ i ];
-			face = new THREE.Face3( src[ 0 ],src[ 1 ],src[ 2 ] );
+			face = new THREE.Face3( src[ 0 ], src[ 1 ], src[ 2 ] );
 			geometry.faces.push( face );
 
 		}

+ 12 - 12
examples/js/loaders/ColladaLoader.js

@@ -4398,8 +4398,8 @@
 		// TODO -  this might be a good place to choose greatest 4 weights
 		for ( var i = 0; i < weights.length; i ++ ) {
 
-			var indicies = new THREE.Vector4( weights[ i ][ 0 ] ? weights[ i ][ 0 ].joint : 0,weights[ i ][ 1 ] ? weights[ i ][ 1 ].joint : 0,weights[ i ][ 2 ] ? weights[ i ][ 2 ].joint : 0,weights[ i ][ 3 ] ? weights[ i ][ 3 ].joint : 0 );
-			var weight = new THREE.Vector4( weights[ i ][ 0 ] ? weights[ i ][ 0 ].weight : 0,weights[ i ][ 1 ] ? weights[ i ][ 1 ].weight : 0,weights[ i ][ 2 ] ? weights[ i ][ 2 ].weight : 0,weights[ i ][ 3 ] ? weights[ i ][ 3 ].weight : 0 );
+			var indicies = new THREE.Vector4( weights[ i ][ 0 ] ? weights[ i ][ 0 ].joint : 0, weights[ i ][ 1 ] ? weights[ i ][ 1 ].joint : 0, weights[ i ][ 2 ] ? weights[ i ][ 2 ].joint : 0, weights[ i ][ 3 ] ? weights[ i ][ 3 ].joint : 0 );
+			var weight = new THREE.Vector4( weights[ i ][ 0 ] ? weights[ i ][ 0 ].weight : 0, weights[ i ][ 1 ] ? weights[ i ][ 1 ].weight : 0, weights[ i ][ 2 ] ? weights[ i ][ 2 ].weight : 0, weights[ i ][ 3 ] ? weights[ i ][ 3 ].weight : 0 );
 
 			skinIndices.push( indicies );
 			skinWeights.push( weight );
@@ -4413,7 +4413,7 @@
 
 		//create an animation for the animated bones
 		//NOTE: this has no effect when using morphtargets
-		var animationdata = { "name": animationBounds.ID,"fps": 30,"length": animationBounds.frames / 30,"hierarchy": [] };
+		var animationdata = { "name": animationBounds.ID, "fps": 30, "length": animationBounds.frames / 30, "hierarchy": [] };
 
 		for ( var j = 0; j < sortedbones.length; j ++ ) {
 
@@ -4451,12 +4451,12 @@
 						if ( frame === 0 )
 							bones[ i ].matrix = key.matrix;
 
-						var data = [ new THREE.Vector3(),new THREE.Quaternion(),new THREE.Vector3() ];
+						var data = [ new THREE.Vector3(), new THREE.Quaternion(), new THREE.Vector3() ];
 						key.matrix.decompose( data[ 0 ], data[ 1 ], data[ 2 ] );
 
-						key.pos = [ data[ 0 ].x,data[ 0 ].y,data[ 0 ].z ];
+						key.pos = [ data[ 0 ].x, data[ 0 ].y, data[ 0 ].z ];
 
-						key.scl = [ data[ 2 ].x,data[ 2 ].y,data[ 2 ].z ];
+						key.scl = [ data[ 2 ].x, data[ 2 ].y, data[ 2 ].z ];
 						key.rot = data[ 1 ];
 
 						animationdata.hierarchy[ j ].keys.push( key );
@@ -4497,7 +4497,7 @@
 
 		}
 
-		return { start: start, end: end, frames: frames,ID: ID };
+		return { start: start, end: end, frames: frames, ID: ID };
 
 	};
 
@@ -5028,13 +5028,13 @@
 			bone.name = node.sid;
 			bone.parent = parentid;
 			bone.matrix = node.matrix;
-			var data = [ new THREE.Vector3(),new THREE.Quaternion(),new THREE.Vector3() ];
+			var data = [ new THREE.Vector3(), new THREE.Quaternion(), new THREE.Vector3() ];
 			bone.matrix.decompose( data[ 0 ], data[ 1 ], data[ 2 ] );
 
-			bone.pos = [ data[ 0 ].x,data[ 0 ].y,data[ 0 ].z ];
+			bone.pos = [ data[ 0 ].x, data[ 0 ].y, data[ 0 ].z ];
 
-			bone.scl = [ data[ 2 ].x,data[ 2 ].y,data[ 2 ].z ];
-			bone.rotq = [ data[ 1 ].x,data[ 1 ].y,data[ 1 ].z,data[ 1 ].w ];
+			bone.scl = [ data[ 2 ].x, data[ 2 ].y, data[ 2 ].z ];
+			bone.rotq = [ data[ 1 ].x, data[ 1 ].y, data[ 1 ].z, data[ 1 ].w ];
 			list.push( bone );
 
 			for ( var i in node.nodes ) {
@@ -5532,7 +5532,7 @@
 	};
 
 	//Move the vertices into the pose that is proper for the start of the animation
-	function skinToBindPose ( geometry,skeleton,skinController ) {
+	function skinToBindPose ( geometry, skeleton, skinController ) {
 
 		var bones = [];
 		setupSkeleton( skeleton, bones, - 1 );

ファイルの差分が大きいため隠しています
+ 0 - 0
examples/js/loaders/PDBLoader.js


+ 1 - 1
examples/js/loaders/RGBELoader.js

@@ -327,7 +327,7 @@ THREE.RGBELoader.prototype._parser = function( buffer ) {
 
 		var w = rgbe_header_info.width,
 			h = rgbe_header_info.height
-			,image_rgba_data = RGBE_ReadPixels_RLE( byteArray.subarray( byteArray.pos ), w, h )
+			, image_rgba_data = RGBE_ReadPixels_RLE( byteArray.subarray( byteArray.pos ), w, h )
 		;
 		if ( RGBE_RETURN_FAILURE !== image_rgba_data ) {
 

+ 1 - 1
examples/js/loaders/STLLoader.js

@@ -302,7 +302,7 @@ if ( typeof DataView === 'undefined' ) {
 
 	DataView.prototype = {
 
-		_getCharCodes: function( buffer,start,length ) {
+		_getCharCodes: function( buffer, start, length ) {
 
 			start = start || 0;
 			length = length || buffer.length;

+ 1 - 1
examples/js/loaders/VRMLLoader.js

@@ -509,7 +509,7 @@ THREE.VRMLLoader.prototype = {
 
 						// first subpattern should match the Node name
 
-						var block = { 'nodeType' : matches[ 1 ], 'string': line, 'parent': current, 'children': [],'comment' : comment };
+						var block = { 'nodeType' : matches[ 1 ], 'string': line, 'parent': current, 'children': [], 'comment' : comment };
 						current.children.push( block );
 						current = block;
 

+ 1 - 1
src/extras/geometries/OctahedronGeometry.js

@@ -5,7 +5,7 @@
 THREE.OctahedronGeometry = function ( radius, detail ) {
 
 	var vertices = [
-		1, 0, 0,   - 1, 0, 0,    0, 1, 0,    0,- 1, 0,    0, 0, 1,    0, 0,- 1
+		1, 0, 0,   - 1, 0, 0,    0, 1, 0,    0, - 1, 0,    0, 0, 1,    0, 0, - 1
 	];
 
 	var indices = [

+ 1 - 1
src/math/Quaternion.js

@@ -18,7 +18,7 @@ THREE.Quaternion.prototype = {
 
 	constructor: THREE.Quaternion,
 
-	_x: 0,_y: 0, _z: 0, _w: 0,
+	_x: 0, _y: 0, _z: 0, _w: 0,
 
 	get x () {
 

+ 1 - 1
src/math/Ray.js

@@ -356,7 +356,7 @@ THREE.Ray.prototype = {
 
 		// http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-box-intersection/
 
-		var tmin,tmax,tymin,tymax,tzmin,tzmax;
+		var tmin, tmax, tymin, tymax, tzmin, tzmax;
 
 		var invdirx = 1 / this.direction.x,
 			invdiry = 1 / this.direction.y,

+ 1 - 0
utils/codestyle/config.json

@@ -1,6 +1,7 @@
 {
     "preset": "mdcs",
     "disallowNewlineBeforeBlockStatements": true,
+    "requireSpaceAfterBinaryOperators": [","],
     "excludeFiles": [ 
         "../../.c9/", 
         "../../.c9version/", 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません