Browse Source

remove debug console output.

Ben Houston 9 years ago
parent
commit
56b64721b8
2 changed files with 8 additions and 13 deletions
  1. 3 7
      src/renderers/WebGLRenderer.js
  2. 5 6
      src/renderers/webgl/WebGLProgram.js

+ 3 - 7
src/renderers/WebGLRenderer.js

@@ -2110,14 +2110,13 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 				case 's':
 
-					//console.log( "uniform s", uniform, location );
 					// TODO: Optimize this.
 					for( var propertyName in uniform.properties ) {
+	
 						var property = uniform.properties[ propertyName ];
 						var locationProperty =  location[ propertyName ];
 						var valueProperty = value[ propertyName ];
-						//console.log( "uniformProperty", property, valueProperty );
-
+	
 						switch( property.type ) {
 							case 'f':
 								_gl.uniform1f( locationProperty, valueProperty );
@@ -2142,18 +2141,15 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 				case 'sa':
 
-					//console.log( "uniform sa", uniform, location );
 					// TODO: Optimize this.
 					for( var i = 0; i < value.length; i ++ ) {
 
-						//console.log( "uniformIndex", i );
 						for( var propertyName in uniform.properties ) {
 							
 							var property = uniform.properties[ propertyName ];
 							var locationProperty =  location[ i ][ propertyName ];
 							var valueProperty = value[i][ propertyName ];
-							//console.log( "uniformProperty", property, valueProperty, i );
-
+	
 							switch( property.type ) {
 								case 'f':
 									_gl.uniform1f( locationProperty, valueProperty );

+ 5 - 6
src/renderers/webgl/WebGLProgram.js

@@ -1,6 +1,11 @@
 THREE.WebGLProgram = ( function () {
 
 	var programIdCount = 0;
+	
+	// TODO: Combine the regex
+	var structRe = /^([\w\d_]+)\.([\w\d_]+)$/; 
+	var arrayStructRe = /^([\w\d_]+)\[(\d+)\]\.([\w\d_]+)$/; 
+	var arrayRe = /^([\w\d_]+)\[0\]$/; 
 
 	function generateDefines( defines ) {
 
@@ -26,12 +31,6 @@ THREE.WebGLProgram = ( function () {
 
 		var n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS );
 	
-
-		// TODO: Combine.
-		var structRe = /^([\w\d_]+)\.([\w\d_]+)$/; 
-		var arrayStructRe = /^([\w\d_]+)\[(\d+)\]\.([\w\d_]+)$/; 
-		var arrayRe = /^([\w\d_]+)\[0\]$/; 
-
 		for ( var i = 0; i < n; i ++ ) {
 
 			var info = gl.getActiveUniform( program, i );