浏览代码

#5791 Use unified Log,Warn & Error handlers, rather than directly using console.error/warn/log

Jan Waller 10 年之前
父节点
当前提交
90dd7cc0d3
共有 60 个文件被更改,包括 235 次插入235 次删除
  1. 1 1
      examples/js/AudioObject.js
  2. 2 2
      examples/js/MarchingCubes.js
  3. 1 1
      examples/js/Mirror.js
  4. 3 3
      examples/js/Octree.js
  5. 1 1
      examples/js/UCSCharacter.js
  6. 1 1
      examples/js/WaterShader.js
  7. 2 2
      examples/js/controls/FlyControls.js
  8. 3 3
      examples/js/controls/OrbitControls.js
  9. 2 2
      examples/js/effects/StereoEffect.js
  10. 5 5
      examples/js/loaders/AWDLoader.js
  11. 1 1
      examples/js/loaders/BabylonLoader.js
  12. 23 23
      examples/js/loaders/BinaryLoader.js
  13. 34 34
      examples/js/loaders/ColladaLoader.js
  14. 3 3
      examples/js/loaders/DDSLoader.js
  15. 1 1
      examples/js/loaders/OBJLoader.js
  16. 1 1
      examples/js/loaders/OBJMTLLoader.js
  17. 1 1
      examples/js/loaders/PLYLoader.js
  18. 15 15
      examples/js/loaders/PVRLoader.js
  19. 4 4
      examples/js/loaders/RGBELoader.js
  20. 10 10
      examples/js/loaders/TGALoader.js
  21. 8 8
      examples/js/loaders/VRMLLoader.js
  22. 4 4
      examples/js/loaders/ctm/CTMLoader.js
  23. 15 15
      examples/js/loaders/gltf/glTFLoader.js
  24. 2 2
      examples/js/loaders/gltf/glTFLoaderUtils.js
  25. 7 7
      examples/js/modifiers/SubdivisionModifier.js
  26. 3 3
      examples/js/postprocessing/AdaptiveToneMappingPass.js
  27. 2 2
      examples/js/postprocessing/BloomPass.js
  28. 1 1
      examples/js/postprocessing/BokehPass.js
  29. 1 1
      examples/js/postprocessing/DotScreenPass.js
  30. 1 1
      examples/js/postprocessing/EffectComposer.js
  31. 1 1
      examples/js/postprocessing/FilmPass.js
  32. 5 5
      examples/js/postprocessing/GlitchPass.js
  33. 1 1
      examples/js/postprocessing/SavePass.js
  34. 1 1
      examples/js/postprocessing/TexturePass.js
  35. 1 1
      examples/js/renderers/CSS2DRenderer.js
  36. 1 1
      examples/js/renderers/CSS3DRenderer.js
  37. 1 1
      examples/js/renderers/CSS3DStereoRenderer.js
  38. 3 3
      examples/js/renderers/CanvasRenderer.js
  39. 3 3
      examples/js/renderers/Projector.js
  40. 1 1
      examples/js/renderers/RaytracingRenderer.js
  41. 2 2
      examples/js/renderers/SVGRenderer.js
  42. 1 1
      examples/js/renderers/SoftwareRenderer.js
  43. 2 2
      examples/js/utils/GeometryUtils.js
  44. 1 1
      examples/js/wip/ProxyGeometry.js
  45. 7 7
      src/core/BufferGeometry.js
  46. 1 1
      src/core/Geometry.js
  47. 1 1
      src/extras/FontUtils.js
  48. 2 2
      src/extras/core/Curve.js
  49. 13 13
      src/extras/core/Path.js
  50. 7 7
      src/extras/core/Shape.js
  51. 6 6
      src/extras/geometries/ExtrudeGeometry.js
  52. 2 2
      src/extras/geometries/ParametricGeometry.js
  53. 1 1
      src/extras/geometries/PlaneGeometry.js
  54. 2 2
      src/loaders/Cache.js
  55. 1 1
      src/loaders/JSONLoader.js
  56. 1 1
      src/loaders/Loader.js
  57. 6 6
      src/renderers/WebGLRenderer.js
  58. 1 1
      src/renderers/webgl/WebGLProgram.js
  59. 1 1
      src/renderers/webgl/WebGLShader.js
  60. 1 1
      src/renderers/webgl/plugins/ShadowMapPlugin.js

+ 1 - 1
examples/js/AudioObject.js

@@ -42,7 +42,7 @@ THREE.AudioObject = function ( url, volume, playbackRate, loop ) {
 
 		} catch ( error ) {
 
-			console.warn( "THREE.AudioObject: webkitAudioContext not found" );
+			THREE.warn( "THREE.AudioObject: webkitAudioContext not found" );
 			return this;
 
 		}

+ 2 - 2
examples/js/MarchingCubes.js

@@ -740,7 +740,7 @@ THREE.MarchingCubes = function ( resolution, material, enableUvs, enableColors )
 
 		this.render( geo_callback );
 
-		// console.log( "generated " + geo.faces.length + " triangles" );
+		// THREE.log( "generated " + geo.faces.length + " triangles" );
 
 		return geo;
 
@@ -751,7 +751,7 @@ THREE.MarchingCubes = function ( resolution, material, enableUvs, enableColors )
 };
 
 THREE.MarchingCubes.prototype = Object.create( THREE.ImmediateRenderObject.prototype );
-THREE.MarchingCubes.prototype.constructor = THREE.MarchingCubes;
+THREE.MarchingCubes.prototype.constructor = THREE.MarchingCubes;
 
 
 /////////////////////////////////////

+ 1 - 1
examples/js/Mirror.js

@@ -103,7 +103,7 @@ THREE.Mirror = function ( renderer, camera, options ) {
 	} else {
 
 		this.camera = new THREE.PerspectiveCamera();
-		console.log( this.name + ': camera is not a Perspective Camera!' );
+		THREE.log( this.name + ': camera is not a Perspective Camera!' );
 
 	}
 

+ 3 - 3
examples/js/Octree.js

@@ -2029,9 +2029,9 @@
 			
 			space = typeof space === 'string' ? space : spaceAddition;
 			
-			console.log( ( this.parent ? space + ' octree NODE > ' : ' octree ROOT > ' ), this, ' // id: ', this.id, ' // indexOctant: ', this.indexOctant, ' // position: ', this.position.x, this.position.y, this.position.z, ' // radius: ', this.radius, ' // depth: ', this.depth );
-			console.log( ( this.parent ? space + ' ' : ' ' ), '+ objects ( ', this.objects.length, ' ) ', this.objects );
-			console.log( ( this.parent ? space + ' ' : ' ' ), '+ children ( ', this.nodesIndices.length, ' )', this.nodesIndices, this.nodesByIndex );
+			THREE.log( ( this.parent ? space + ' octree NODE > ' : ' octree ROOT > ' ), this, ' // id: ', this.id, ' // indexOctant: ', this.indexOctant, ' // position: ', this.position.x, this.position.y, this.position.z, ' // radius: ', this.radius, ' // depth: ', this.depth );
+			THREE.log( ( this.parent ? space + ' ' : ' ' ), '+ objects ( ', this.objects.length, ' ) ', this.objects );
+			THREE.log( ( this.parent ? space + ' ' : ' ' ), '+ children ( ', this.nodesIndices.length, ' )', this.nodesIndices, this.nodesByIndex );
 			
 			for ( i = 0, l = this.nodesIndices.length; i < l; i ++ ) {
 				

+ 1 - 1
examples/js/UCSCharacter.js

@@ -36,7 +36,7 @@ THREE.UCSCharacter = function() {
 		
 		// CHARACTER
 		var loader = new THREE.JSONLoader();
-		console.log( config.baseUrl + config.character );
+		THREE.log( config.baseUrl + config.character );
 		loader.load( config.baseUrl + config.character, function( geometry ) {
 			geometry.computeBoundingBox();
 			geometry.computeVertexNormals();

+ 1 - 1
examples/js/WaterShader.js

@@ -142,7 +142,7 @@ THREE.Water = function ( renderer, camera, scene, options ) {
 	else 
 	{
 		this.camera = new THREE.PerspectiveCamera();
-		console.log(this.name + ': camera is not a Perspective Camera!')
+		THREE.log(this.name + ': camera is not a Perspective Camera!')
 	}
 
 	this.textureMatrix = new THREE.Matrix4();

+ 2 - 2
examples/js/controls/FlyControls.js

@@ -210,7 +210,7 @@ THREE.FlyControls = function ( object, domElement ) {
 		this.moveVector.y = ( -this.moveState.down    + this.moveState.up );
 		this.moveVector.z = ( -forward + this.moveState.back );
 
-		//console.log( 'move:', [ this.moveVector.x, this.moveVector.y, this.moveVector.z ] );
+		//THREE.log( 'move:', [ this.moveVector.x, this.moveVector.y, this.moveVector.z ] );
 
 	};
 
@@ -220,7 +220,7 @@ THREE.FlyControls = function ( object, domElement ) {
 		this.rotationVector.y = ( -this.moveState.yawRight  + this.moveState.yawLeft );
 		this.rotationVector.z = ( -this.moveState.rollRight + this.moveState.rollLeft );
 
-		//console.log( 'rotate:', [ this.rotationVector.x, this.rotationVector.y, this.rotationVector.z ] );
+		//THREE.log( 'rotate:', [ this.rotationVector.x, this.rotationVector.y, this.rotationVector.z ] );
 
 	};
 

+ 3 - 3
examples/js/controls/OrbitControls.js

@@ -208,7 +208,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 		} else {
 
 			// camera neither orthographic or perspective
-			console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );
+			THREE.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );
 
 		}
 
@@ -234,7 +234,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		} else {
 
-			console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
+			THREE.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
 
 		}
 
@@ -260,7 +260,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		} else {
 
-			console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
+			THREE.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
 
 		}
 

+ 2 - 2
examples/js/effects/StereoEffect.js

@@ -22,7 +22,7 @@ THREE.StereoEffect = function ( renderer ) {
 				return scope.eyeSeparation;
 			},
 			set: function ( value ) {
-				console.warn( 'THREE.StereoEffect: .separation is now .eyeSeparation.' );
+				THREE.warn( 'THREE.StereoEffect: .separation is now .eyeSeparation.' );
 				scope.eyeSeparation = value;
 			}
 		},
@@ -31,7 +31,7 @@ THREE.StereoEffect = function ( renderer ) {
 				return scope.focalLength;
 			},
 			set: function ( value ) {
-				console.warn( 'THREE.StereoEffect: .targetDistance is now .focalLength.' );
+				THREE.warn( 'THREE.StereoEffect: .targetDistance is now .focalLength.' );
 				scope.focalLength = value;
 			}
 		}

+ 5 - 5
examples/js/loaders/AWDLoader.js

@@ -137,7 +137,7 @@ THREE.AWDLoader = (function () {
 
 				} else {
 
-					console.error( 'AWDLoader: Couldn\'t load ' + url + ' (' + xhr.status + ')' );
+					THREE.error( 'AWDLoader: Couldn\'t load ' + url + ' (' + xhr.status + ')' );
 
 				}
 
@@ -159,11 +159,11 @@ THREE.AWDLoader = (function () {
 		this._parseHeader( );
 
 		if ( this._compression != 0  ) {
-			console.error( 'compressed AWD not supported' );
+			THREE.error( 'compressed AWD not supported' );
 		}
 
 		if (!this._streaming && this._bodylen != data.byteLength - this._ptr ) {
-			console.error('AWDLoader: body len does not match file length', this._bodylen,  blen - this._ptr);
+			THREE.error('AWDLoader: body len does not match file length', this._bodylen,  blen - this._ptr);
 		}
 
 		while ( this._ptr < blen ) {
@@ -451,7 +451,7 @@ THREE.AWDLoader = (function () {
 		if (type === 0) {
 			data_len = this.readU32();
 			var url = this.readUTFBytes(data_len);
-			console.log( url );
+			THREE.log( url );
 
 			asset = this.loadTexture( url );
 		} else {
@@ -883,7 +883,7 @@ THREE.AWDLoader = (function () {
 		var mesh = this.getBlock( geoAdress );
 
 		if (mesh == null) {
-			console.log( "parseMeshPoseAnimation target mesh not found at:", geoAdress );
+			THREE.log( "parseMeshPoseAnimation target mesh not found at:", geoAdress );
 			return;
 		}
 

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

@@ -67,7 +67,7 @@ THREE.BabylonLoader.prototype = {
 
 				var data = json.multiMaterials[ i ];
 
-				console.warn( 'THREE.BabylonLoader: Multi materials not yet supported.' );
+				THREE.warn( 'THREE.BabylonLoader: Multi materials not yet supported.' );
 
 				materials[ data.id ] = new THREE.MeshPhongMaterial();
 

+ 23 - 23
examples/js/loaders/BinaryLoader.js

@@ -54,7 +54,7 @@ THREE.BinaryLoader.prototype.loadAjaxJSON = function ( context, url, callback, t
 
 			} else {
 
-				console.error( "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" );
+				THREE.error( "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" );
 
 			}
 
@@ -119,7 +119,7 @@ THREE.BinaryLoader.prototype.loadAjaxBuffers = function ( json, callback, binary
 
 	xhr.addEventListener( 'error', function ( event ) {
 
-		console.error( "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" );
+		THREE.error( "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" );
 
 	}, false );
 
@@ -251,31 +251,31 @@ THREE.BinaryLoader.prototype.createBinModel = function ( data, callback, texture
 
 			};
 /*
-			console.log( "signature: " + metaData.signature );
+			THREE.log( "signature: " + metaData.signature );
 
-			console.log( "header_bytes: " + metaData.header_bytes );
-			console.log( "vertex_coordinate_bytes: " + metaData.vertex_coordinate_bytes );
-			console.log( "normal_coordinate_bytes: " + metaData.normal_coordinate_bytes );
-			console.log( "uv_coordinate_bytes: " + metaData.uv_coordinate_bytes );
+			THREE.log( "header_bytes: " + metaData.header_bytes );
+			THREE.log( "vertex_coordinate_bytes: " + metaData.vertex_coordinate_bytes );
+			THREE.log( "normal_coordinate_bytes: " + metaData.normal_coordinate_bytes );
+			THREE.log( "uv_coordinate_bytes: " + metaData.uv_coordinate_bytes );
 
-			console.log( "vertex_index_bytes: " + metaData.vertex_index_bytes );
-			console.log( "normal_index_bytes: " + metaData.normal_index_bytes );
-			console.log( "uv_index_bytes: " + metaData.uv_index_bytes );
-			console.log( "material_index_bytes: " + metaData.material_index_bytes );
+			THREE.log( "vertex_index_bytes: " + metaData.vertex_index_bytes );
+			THREE.log( "normal_index_bytes: " + metaData.normal_index_bytes );
+			THREE.log( "uv_index_bytes: " + metaData.uv_index_bytes );
+			THREE.log( "material_index_bytes: " + metaData.material_index_bytes );
 
-			console.log( "nvertices: " + metaData.nvertices );
-			console.log( "nnormals: " + metaData.nnormals );
-			console.log( "nuvs: " + metaData.nuvs );
+			THREE.log( "nvertices: " + metaData.nvertices );
+			THREE.log( "nnormals: " + metaData.nnormals );
+			THREE.log( "nuvs: " + metaData.nuvs );
 
-			console.log( "ntri_flat: " + metaData.ntri_flat );
-			console.log( "ntri_smooth: " + metaData.ntri_smooth );
-			console.log( "ntri_flat_uv: " + metaData.ntri_flat_uv );
-			console.log( "ntri_smooth_uv: " + metaData.ntri_smooth_uv );
+			THREE.log( "ntri_flat: " + metaData.ntri_flat );
+			THREE.log( "ntri_smooth: " + metaData.ntri_smooth );
+			THREE.log( "ntri_flat_uv: " + metaData.ntri_flat_uv );
+			THREE.log( "ntri_smooth_uv: " + metaData.ntri_smooth_uv );
 
-			console.log( "nquad_flat: " + metaData.nquad_flat );
-			console.log( "nquad_smooth: " + metaData.nquad_smooth );
-			console.log( "nquad_flat_uv: " + metaData.nquad_flat_uv );
-			console.log( "nquad_smooth_uv: " + metaData.nquad_smooth_uv );
+			THREE.log( "nquad_flat: " + metaData.nquad_flat );
+			THREE.log( "nquad_smooth: " + metaData.nquad_smooth );
+			THREE.log( "nquad_flat_uv: " + metaData.nquad_flat_uv );
+			THREE.log( "nquad_smooth_uv: " + metaData.nquad_smooth_uv );
 
 			var total = metaData.header_bytes
 					  + metaData.nvertices * metaData.vertex_coordinate_bytes * 3
@@ -289,7 +289,7 @@ THREE.BinaryLoader.prototype.createBinModel = function ( data, callback, texture
 					  + metaData.nquad_smooth * ( metaData.vertex_index_bytes*4 + metaData.material_index_bytes + metaData.normal_index_bytes*4 )
 					  + metaData.nquad_flat_uv * ( metaData.vertex_index_bytes*4 + metaData.material_index_bytes + metaData.uv_index_bytes*4 )
 					  + metaData.nquad_smooth_uv * ( metaData.vertex_index_bytes*4 + metaData.material_index_bytes + metaData.normal_index_bytes*4 + metaData.uv_index_bytes*4 );
-			console.log( "total bytes: " + total );
+			THREE.log( "total bytes: " + total );
 */
 
 			return metaData;

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

@@ -91,7 +91,7 @@ THREE.ColladaLoader = function () {
 
 							} else {
 
-								console.error( "ColladaLoader: Empty or non-existing file (" + url + ")" );
+								THREE.error( "ColladaLoader: Empty or non-existing file (" + url + ")" );
 
 							}
 
@@ -412,7 +412,7 @@ THREE.ColladaLoader = function () {
 
 		if ( !morphCtrl || !morphCtrl.morph ) {
 
-			console.log("could not find morph controller!");
+			THREE.log("could not find morph controller!");
 			return;
 
 		}
@@ -450,14 +450,14 @@ THREE.ColladaLoader = function () {
 
 		if ( !skinCtrl || !skinCtrl.skin ) {
 
-			console.log( "could not find skin controller!" );
+			THREE.log( "could not find skin controller!" );
 			return;
 
 		}
 
 		if ( !ctrl.skeleton || !ctrl.skeleton.length ) {
 
-			console.log( "could not find the skeleton for the skin!" );
+			THREE.log( "could not find the skeleton for the skin!" );
 			return;
 
 		}
@@ -587,7 +587,7 @@ THREE.ColladaLoader = function () {
 
 			} else {
 
-				console.warn( "ColladaLoader: Could not find joint '" + bone.sid + "'." );
+				THREE.warn( "ColladaLoader: Could not find joint '" + bone.sid + "'." );
 
 				bone.skinningMatrix = new THREE.Matrix4();
 				bone.weights = [];
@@ -686,14 +686,14 @@ THREE.ColladaLoader = function () {
 
 		if ( !skinController || !skinController.skin ) {
 
-			console.log( 'ColladaLoader: Could not find skin controller.' );
+			THREE.log( 'ColladaLoader: Could not find skin controller.' );
 			return;
 
 		}
 
 		if ( !instanceCtrl.skeleton || !instanceCtrl.skeleton.length ) {
 
-			console.log( 'ColladaLoader: Could not find the skeleton for the skin. ' );
+			THREE.log( 'ColladaLoader: Could not find the skeleton for the skin. ' );
 			return;
 
 		}
@@ -776,7 +776,7 @@ THREE.ColladaLoader = function () {
 
 		}
 
-		console.log( 'ColladaLoader:', animationBounds.ID + ' has ' + sortedbones.length + ' bones.' );
+		THREE.log( 'ColladaLoader:', animationBounds.ID + ' has ' + sortedbones.length + ' bones.' );
 
 
 
@@ -874,7 +874,7 @@ THREE.ColladaLoader = function () {
 
 				} else {
 
-					console.log( 'getJointValue: joint ' + jointIndex + ' doesn\'t exist' );
+					THREE.log( 'getJointValue: joint ' + jointIndex + ' doesn\'t exist' );
 
 				}
 
@@ -890,11 +890,11 @@ THREE.ColladaLoader = function () {
 
 					if ( value > joint.limits.max || value < joint.limits.min ) {
 
-						console.log( 'setJointValue: joint ' + jointIndex + ' value ' + value + ' outside of limits (min: ' + joint.limits.min + ', max: ' + joint.limits.max + ')' );
+						THREE.log( 'setJointValue: joint ' + jointIndex + ' value ' + value + ' outside of limits (min: ' + joint.limits.min + ', max: ' + joint.limits.max + ')' );
 
 					} else if ( joint.static ) {
 
-						console.log( 'setJointValue: joint ' + jointIndex + ' is static' );
+						THREE.log( 'setJointValue: joint ' + jointIndex + ' is static' );
 
 					} else {
 
@@ -926,7 +926,7 @@ THREE.ColladaLoader = function () {
 
 									default:
 
-										console.warn( 'setJointValue: unknown joint type: ' + joint.type );
+										THREE.warn( 'setJointValue: unknown joint type: ' + joint.type );
 										break;
 
 								}
@@ -988,7 +988,7 @@ THREE.ColladaLoader = function () {
 
 				} else {
 
-					console.log( 'setJointValue: joint ' + jointIndex + ' doesn\'t exist' );
+					THREE.log( 'setJointValue: joint ' + jointIndex + ' doesn\'t exist' );
 
 				}
 
@@ -1100,7 +1100,7 @@ THREE.ColladaLoader = function () {
 
 					}
 
-					console.log( 'ColladaLoader: Morph-controller partially supported.' );
+					THREE.log( 'ColladaLoader: Morph-controller partially supported.' );
 
 				default:
 					break;
@@ -1460,7 +1460,7 @@ THREE.ColladaLoader = function () {
 					if ( sampler.input[ j + 1 ] > t ) {
 
 						value = sampler.output[ j ];
-						//console.log(value.flatten)
+						//THREE.log(value.flatten)
 						break;
 
 					}
@@ -1559,7 +1559,7 @@ THREE.ColladaLoader = function () {
 
 				} else {
 
-					console.log( 'Could not find transform "' + channel.sid + '" in node ' + node.id );
+					THREE.log( 'Could not find transform "' + channel.sid + '" in node ' + node.id );
 
 				}
 
@@ -1825,7 +1825,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( child.nodeName );
+					THREE.log( child.nodeName );
 					break;
 
 			}
@@ -1935,7 +1935,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( child.nodeName );
+					THREE.log( child.nodeName );
 					break;
 
 			}
@@ -2346,7 +2346,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( child.nodeName );
+					THREE.log( child.nodeName );
 					break;
 
 			}
@@ -2420,7 +2420,7 @@ THREE.ColladaLoader = function () {
 				break;
 
 			default:
-				console.log( 'Can not convert Transform of type ' + this.type );
+				THREE.log( 'Can not convert Transform of type ' + this.type );
 				break;
 
 		}
@@ -2526,7 +2526,7 @@ THREE.ColladaLoader = function () {
 
 				} else {
 
-					console.log('Incorrect addressing of matrix in transform.');
+					THREE.log('Incorrect addressing of matrix in transform.');
 
 				}
 
@@ -2746,7 +2746,7 @@ THREE.ColladaLoader = function () {
 
 				case 'extra':
 
-					// console.log( child );
+					// THREE.log( child );
 					break;
 
 				default:
@@ -3103,7 +3103,7 @@ THREE.ColladaLoader = function () {
 
 				} else {
 
-					console.log( 'dropped face with vcount ' + vcount + ' for geometry with id: ' + geom.id );
+					THREE.log( 'dropped face with vcount ' + vcount + ' for geometry with id: ' + geom.id );
 
 				}
 
@@ -3168,7 +3168,7 @@ THREE.ColladaLoader = function () {
 
 				case 'ph':
 
-					console.warn( 'polygon holes not yet supported!' );
+					THREE.warn( 'polygon holes not yet supported!' );
 					break;
 
 				default:
@@ -3357,7 +3357,7 @@ THREE.ColladaLoader = function () {
 					break;
 
 				default:
-					// console.log(child.nodeName);
+					// THREE.log(child.nodeName);
 					break;
 
 			}
@@ -3376,7 +3376,7 @@ THREE.ColladaLoader = function () {
 
 		var param = this.accessor.params[ 0 ];
 
-			//console.log(param.name + " " + param.type);
+			//THREE.log(param.name + " " + param.type);
 
 		switch ( param.type ) {
 
@@ -3399,7 +3399,7 @@ THREE.ColladaLoader = function () {
 
 			default:
 
-				console.log( 'ColladaLoader: Source: Read dont know how to read ' + param.type + '.' );
+				THREE.log( 'ColladaLoader: Source: Read dont know how to read ' + param.type + '.' );
 				break;
 
 		}
@@ -3613,11 +3613,11 @@ THREE.ColladaLoader = function () {
 						} else if ( bumpType.toLowerCase() === "normalmap" ) {
 							this[ 'normal' ] = ( new ColorOrTexture() ).parse( child );
 						} else {
-							console.error( "Shader.prototype.parse: Invalid value for attribute 'bumptype' (" + bumpType + ") - valid bumptypes are 'HEIGHTFIELD' and 'NORMALMAP' - defaulting to 'HEIGHTFIELD'" );
+							THREE.error( "Shader.prototype.parse: Invalid value for attribute 'bumptype' (" + bumpType + ") - valid bumptypes are 'HEIGHTFIELD' and 'NORMALMAP' - defaulting to 'HEIGHTFIELD'" );
 							this[ 'bump' ] = ( new ColorOrTexture() ).parse( child );
 						}
 					} else {
-						console.warn( "Shader.prototype.parse: Attribute 'bumptype' missing from bump node - defaulting to 'HEIGHTFIELD'" );
+						THREE.warn( "Shader.prototype.parse: Attribute 'bumptype' missing from bump node - defaulting to 'HEIGHTFIELD'" );
 						this[ 'bump' ] = ( new ColorOrTexture() ).parse( child );
 					}
 
@@ -3847,7 +3847,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( "unhandled Surface prop: " + child.nodeName );
+					THREE.log( "unhandled Surface prop: " + child.nodeName );
 					break;
 
 			}
@@ -3911,7 +3911,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( "unhandled Sampler2D prop: " + child.nodeName );
+					THREE.log( "unhandled Sampler2D prop: " + child.nodeName );
 					break;
 
 			}
@@ -4001,7 +4001,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( child.nodeName );
+					THREE.log( child.nodeName );
 					break;
 
 			}
@@ -4048,7 +4048,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log( child.nodeName );
+					THREE.log( child.nodeName );
 					break;
 
 			}
@@ -4350,7 +4350,7 @@ THREE.ColladaLoader = function () {
 
 				default:
 
-					console.log(input.semantic);
+					THREE.log(input.semantic);
 					break;
 
 			}

+ 3 - 3
examples/js/loaders/DDSLoader.js

@@ -126,14 +126,14 @@ THREE.DDSLoader.parse = function ( buffer, loadMipmaps ) {
 
 	if ( header[ off_magic ] !== DDS_MAGIC ) {
 
-		console.error( 'THREE.DDSLoader.parse: Invalid magic number in DDS header.' );
+		THREE.error( 'THREE.DDSLoader.parse: Invalid magic number in DDS header.' );
 		return dds;
 
 	}
 
 	if ( ! header[ off_pfFlags ] & DDPF_FOURCC ) {
 
-		console.error( 'THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code.' );
+		THREE.error( 'THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code.' );
 		return dds;
 
 	}
@@ -175,7 +175,7 @@ THREE.DDSLoader.parse = function ( buffer, loadMipmaps ) {
 				blockBytes = 64;
 				dds.format = THREE.RGBAFormat;
 			} else {
-				console.error( 'THREE.DDSLoader.parse: Unsupported FourCC code ', int32ToFourCC( fourCC ) );
+				THREE.error( 'THREE.DDSLoader.parse: Unsupported FourCC code ', int32ToFourCC( fourCC ) );
 				return dds;
 			}
 	}

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

@@ -328,7 +328,7 @@ THREE.OBJLoader.prototype = {
 
 			} else {
 
-				// console.log( "THREE.OBJLoader: Unhandled line " + line );
+				// THREE.log( "THREE.OBJLoader: Unhandled line " + line );
 
 			}
 

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

@@ -347,7 +347,7 @@ THREE.OBJMTLLoader.prototype = {
 
 			} else {
 
-				console.log( "THREE.OBJMTLLoader: Unhandled line " + line );
+				THREE.log( "THREE.OBJMTLLoader: Unhandled line " + line );
 
 			}
 

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

@@ -209,7 +209,7 @@ THREE.PLYLoader.prototype = {
 
 			default:
 
-				console.log("unhandled", lineType, lineValues);
+				THREE.log("unhandled", lineType, lineValues);
 
 			}
 

+ 15 - 15
examples/js/loaders/PVRLoader.js

@@ -164,21 +164,21 @@ THREE.PVRLoader._extract = function ( pvrDatas ) {
 
 
 
-	// console.log( "--------------------------" );
-
-	// console.log( "headerLength ", headerLength);
-	// console.log( "height       ", height      );
-	// console.log( "width        ", width       );
-	// console.log( "numMipmaps   ", numMipmaps  );
-	// console.log( "flags        ", flags       );
-	// console.log( "dataLength   ", dataLength  );
-	// console.log( "bpp          ", bpp         );
-	// console.log( "bitmaskRed   ", bitmaskRed  );
-	// console.log( "bitmaskGreen ", bitmaskGreen);
-	// console.log( "bitmaskBlue  ", bitmaskBlue );
-	// console.log( "bitmaskAlpha ", bitmaskAlpha);
-	// console.log( "pvrTag       ", pvrTag      );
-	// console.log( "numSurfs     ", numSurfs    );
+	// THREE.log( "--------------------------" );
+
+	// THREE.log( "headerLength ", headerLength);
+	// THREE.log( "height       ", height      );
+	// THREE.log( "width        ", width       );
+	// THREE.log( "numMipmaps   ", numMipmaps  );
+	// THREE.log( "flags        ", flags       );
+	// THREE.log( "dataLength   ", dataLength  );
+	// THREE.log( "bpp          ", bpp         );
+	// THREE.log( "bitmaskRed   ", bitmaskRed  );
+	// THREE.log( "bitmaskGreen ", bitmaskGreen);
+	// THREE.log( "bitmaskBlue  ", bitmaskBlue );
+	// THREE.log( "bitmaskAlpha ", bitmaskAlpha);
+	// THREE.log( "pvrTag       ", pvrTag      );
+	// THREE.log( "numSurfs     ", numSurfs    );
 
 
 

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

@@ -29,14 +29,14 @@ THREE.RGBELoader.prototype._parser = function( buffer ) {
 		rgbe_memory_error   = 4,
 		rgbe_error = function(rgbe_error_code, msg) {
 			switch (rgbe_error_code) {
-				case rgbe_read_error: console.error("THREE.RGBELoader Read Error: " + (msg||''));
+				case rgbe_read_error: THREE.error("THREE.RGBELoader Read Error: " + (msg||''));
 					break;
-				case rgbe_write_error: console.error("THREE.RGBELoader Write Error: " + (msg||''));
+				case rgbe_write_error: THREE.error("THREE.RGBELoader Write Error: " + (msg||''));
 					break;
-				case rgbe_format_error:  console.error("THREE.RGBELoader Bad File Format: " + (msg||''));
+				case rgbe_format_error:  THREE.error("THREE.RGBELoader Bad File Format: " + (msg||''));
 					break;
 				default:
-				case rgbe_memory_error:  console.error("THREE.RGBELoader: Error: " + (msg||''));
+				case rgbe_memory_error:  THREE.error("THREE.RGBELoader: Error: " + (msg||''));
 			}
 			return RGBE_RETURN_FAILURE;
 		},

+ 10 - 10
examples/js/loaders/TGALoader.js

@@ -33,7 +33,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 
 
 	if ( buffer.length < 19 )
-		console.error( 'THREE.TGALoader.parse: Not enough data to contain header.' );
+		THREE.error( 'THREE.TGALoader.parse: Not enough data to contain header.' );
 
 	var content = new Uint8Array( buffer ),
 		offset = 0,
@@ -63,7 +63,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 			case TGA_TYPE_INDEXED:
 			case TGA_TYPE_RLE_INDEXED:
 				if ( header.colormap_length > 256 || header.colormap_size !== 24 || header.colormap_type !== 1) {
-					console.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type colormap data for indexed type');
+					THREE.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type colormap data for indexed type');
 				}
 				break;
 
@@ -73,23 +73,23 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 			case TGA_TYPE_RLE_RGB:
 			case TGA_TYPE_RLE_GREY:
 				if (header.colormap_type) {
-					console.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type colormap data for colormap type');
+					THREE.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type colormap data for colormap type');
 				}
 				break;
 
 			// What the need of a file without data ?
 			case TGA_TYPE_NO_DATA:
-				console.error('THREE.TGALoader.parse.tgaCheckHeader: No data');
+				THREE.error('THREE.TGALoader.parse.tgaCheckHeader: No data');
 
 			// Invalid type ?
 			default:
-				console.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type " ' + header.image_type + '"');
+				THREE.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid type " ' + header.image_type + '"');
 
 		}
 
 		// Check image width and height
 		if ( header.width <= 0 || header.height <= 0 ) {
-			console.error( 'THREE.TGALoader.parse.tgaCheckHeader: Invalid image size' );
+			THREE.error( 'THREE.TGALoader.parse.tgaCheckHeader: Invalid image size' );
 		}
 
 		// Check image pixel size
@@ -97,7 +97,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 			header.pixel_size !== 16 &&
 			header.pixel_size !== 24 &&
 			header.pixel_size !== 32) {
-			console.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid pixel size "' + header.pixel_size + '"');
+			THREE.error('THREE.TGALoader.parse.tgaCheckHeader: Invalid pixel size "' + header.pixel_size + '"');
 		}
 
 	}
@@ -106,7 +106,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 	tgaCheckHeader( header );
 
 	if ( header.id_length + offset > buffer.length ) {
-		console.error('THREE.TGALoader.parse: No data');
+		THREE.error('THREE.TGALoader.parse: No data');
 	}
 
 	// Skip the needn't data
@@ -382,7 +382,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 					tgaGetImageDataGrey16bits( data, y_start, y_step, y_end, x_start, x_step, x_end, image );
 					break;
 				default:
-					console.error( 'THREE.TGALoader.parse.getTgaRGBA: not support this format' );
+					THREE.error( 'THREE.TGALoader.parse.getTgaRGBA: not support this format' );
 					break;
 			}
 
@@ -406,7 +406,7 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
 					break;
 
 				default:
-					console.error( 'THREE.TGALoader.parse.getTgaRGBA: not support this format' );
+					THREE.error( 'THREE.TGALoader.parse.getTgaRGBA: not support this format' );
 					break;
 			}
 

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

@@ -58,7 +58,7 @@ THREE.VRMLLoader.prototype = {
 
 		var parseV1 = function ( lines, scene ) {
 
-			console.warn( 'VRML V1.0 not supported yet' );
+			THREE.warn( 'VRML V1.0 not supported yet' );
 
 		};
 
@@ -349,7 +349,7 @@ THREE.VRMLLoader.prototype = {
 						case 'color':
 
 							if (parts.length != 4) {
-								console.warn('Invalid color format detected for ' + fieldName );
+								THREE.warn('Invalid color format detected for ' + fieldName );
 								break;
 							}
 
@@ -365,7 +365,7 @@ THREE.VRMLLoader.prototype = {
 						case 'scale':
 						case 'size':
 							if (parts.length != 4) {
-								console.warn('Invalid vector format detected for ' + fieldName);
+								THREE.warn('Invalid vector format detected for ' + fieldName);
 								break;
 							}
 
@@ -385,7 +385,7 @@ THREE.VRMLLoader.prototype = {
 						case 'shininess':
 						case 'ambientIntensity':
 							if (parts.length != 2) {
-								console.warn('Invalid single float value specification detected for ' + fieldName);
+								THREE.warn('Invalid single float value specification detected for ' + fieldName);
 								break;
 							}
 
@@ -395,7 +395,7 @@ THREE.VRMLLoader.prototype = {
 
 						case 'rotation':
 							if (parts.length != 5) {
-								console.warn('Invalid quaternion format detected for ' + fieldName);
+								THREE.warn('Invalid quaternion format detected for ' + fieldName);
 								break;
 							}
 
@@ -413,7 +413,7 @@ THREE.VRMLLoader.prototype = {
 						case 'colorPerVertex':
 						case 'convex':
 							if (parts.length != 2) {
-								console.warn('Invalid format detected for ' + fieldName);
+								THREE.warn('Invalid format detected for ' + fieldName);
 								break;
 							}
 
@@ -502,7 +502,7 @@ THREE.VRMLLoader.prototype = {
 
 			var parseNode = function ( data, parent ) {
 
-				// console.log( data );
+				// THREE.log( data );
 
 				if ( typeof data === 'string' ) {
 
@@ -511,7 +511,7 @@ THREE.VRMLLoader.prototype = {
 						var defineKey = /USE\s+?(\w+)/.exec( data )[ 1 ];
 
 						if (undefined == defines[defineKey]) {
-							console.warn(defineKey + ' is not defined.');
+							THREE.warn(defineKey + ' is not defined.');
 						} else {
 
 							if ( /appearance/.exec( data ) && defineKey ) {

+ 4 - 4
examples/js/loaders/ctm/CTMLoader.js

@@ -121,12 +121,12 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
 							var ctmFile = files[ i ];
 
 							var e1 = Date.now();
-							// console.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
+							// THREE.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
 
 							scope.createModel( ctmFile, callback );
 
 							var e = Date.now();
-							console.log( "model load time [worker]: " + (e - e1) + " ms, total: " + (e - s));
+							THREE.log( "model load time [worker]: " + (e - e1) + " ms, total: " + (e - s));
 
 						}
 
@@ -149,13 +149,13 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
 					}
 
 					//var e = Date.now();
-					//console.log( "CTM data parse time [inline]: " + (e-s) + " ms" );
+					//THREE.log( "CTM data parse time [inline]: " + (e-s) + " ms" );
 
 				}
 
 			} else {
 
-				console.error( "Couldn't load [" + url + "] [" + xhr.status + "]" );
+				THREE.error( "Couldn't load [" + url + "] [" + xhr.status + "]" );
 
 			}
 

+ 15 - 15
examples/js/loaders/gltf/glTFLoader.js

@@ -127,7 +127,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	IndicesDelegate.prototype.handleError = function(errorCode, info) {
         // FIXME: report error
-		console.log("ERROR(IndicesDelegate):" + errorCode + ":" + info);
+		THREE.log("ERROR(IndicesDelegate):" + errorCode + ":" + info);
 	};
 
 	IndicesDelegate.prototype.convert = function(resource, ctx) {
@@ -153,7 +153,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	VertexAttributeDelegate.prototype.handleError = function(errorCode, info) {
         // FIXME: report error
-		console.log("ERROR(VertexAttributeDelegate):" + errorCode + ":" + info);
+		THREE.log("ERROR(VertexAttributeDelegate):" + errorCode + ":" + info);
 	};
 
 	VertexAttributeDelegate.prototype.convert = function(resource, ctx) {
@@ -325,7 +325,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	AnimationParameterDelegate.prototype.handleError = function(errorCode, info) {
         // FIXME: report error
-		console.log("ERROR(AnimationParameterDelegate):" + errorCode + ":" + info);
+		THREE.log("ERROR(AnimationParameterDelegate):" + errorCode + ":" + info);
 	};
 
 	AnimationParameterDelegate.prototype.convert = function(resource, ctx) {
@@ -397,7 +397,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	InverseBindMatricesDelegate.prototype.handleError = function(errorCode, info) {
         // FIXME: report error
-		console.log("ERROR(InverseBindMatricesDelegate):" + errorCode + ":" + info);
+		THREE.log("ERROR(InverseBindMatricesDelegate):" + errorCode + ":" + info);
 	};
 
 	InverseBindMatricesDelegate.prototype.convert = function(resource, ctx) {
@@ -433,7 +433,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	ShaderDelegate.prototype.handleError = function(errorCode, info) {
         // FIXME: report error
-		console.log("ERROR(ShaderDelegate):" + errorCode + ":" + info);
+		THREE.log("ERROR(ShaderDelegate):" + errorCode + ":" + info);
 	};
 
 	ShaderDelegate.prototype.convert = function(resource, ctx) {
@@ -467,12 +467,12 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 
 	Resources.prototype.setEntry = function(entryID, object, description) {
 		if (!entryID) {
-			console.error("No EntryID provided, cannot store", description);
+			THREE.error("No EntryID provided, cannot store", description);
 			return;
 		}
 
 		if (this._entries[entryID]) {
-			console.warn("entry[" + entryID + "] is being overwritten");
+			THREE.warn("entry[" + entryID + "] is being overwritten");
 		}
     
 		this._entries[entryID] = new ResourceEntry(entryID, object, description );
@@ -588,13 +588,13 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
         		
 	var fragmentShader = theLoader.shaders[material.params.fragmentShader];
 	if (!fragmentShader) {
-		console.log("ERROR: Missing fragment shader definition:", material.params.fragmentShader);
+		THREE.log("ERROR: Missing fragment shader definition:", material.params.fragmentShader);
 		return new THREE.MeshPhongMaterial;
 	}
         		
 	var vertexShader = theLoader.shaders[material.params.vertexShader];
 	if (!fragmentShader) {
-		console.log("ERROR: Missing vertex shader definition:", material.params.vertexShader);
+		THREE.log("ERROR: Missing vertex shader definition:", material.params.vertexShader);
 		return new THREE.MeshPhongMaterial;
 	}
         		
@@ -825,7 +825,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 	var primitivesDescription = description.primitives;
 	if (!primitivesDescription) {
                     //FIXME: not implemented in delegate
-		console.log("MISSING_PRIMITIVES for mesh:" + entryID);
+		THREE.log("MISSING_PRIMITIVES for mesh:" + entryID);
 		return false;
 	}
 
@@ -1204,7 +1204,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 									boneInverses.push(mat);
         	                                    
 								} else {
-									console.log("WARNING: jointId:" + jointId + " cannot be found in skeleton:" + skeleton);
+									THREE.log("WARNING: jointId:" + jointId + " cannot be found in skeleton:" + skeleton);
 								}
 							}
 
@@ -1253,7 +1253,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
             value: function(entryID, description, userInfo) {
 
 	if (!description.nodes) {
-		console.log("ERROR: invalid file required nodes property is missing from scene");
+		THREE.log("ERROR: invalid file required nodes property is missing from scene");
 		return false;
 	}
 
@@ -1294,9 +1294,9 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 	for (var name in this.nodeAnimationChannels) {
 		var nodeAnimationChannels = this.nodeAnimationChannels[name];
 		var i, len = nodeAnimationChannels.length;
-        			//console.log(" animation channels for node " + name);
+        			//THREE.log(" animation channels for node " + name);
         			//for (i = 0; i < len; i++) {
-        			//	console.log(nodeAnimationChannels[i]);
+        			//	THREE.log(nodeAnimationChannels[i]);
         			//}
 		var anim = new THREE.glTFAnimation(nodeAnimationChannels);
 		anim.name = "animation_" + name;
@@ -1372,7 +1372,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
 	            var parameters = description.parameters;
 	            if (!parameters) {
 	                //FIXME: not implemented in delegate
-		console.log("MISSING_PARAMETERS for animation:" + entryID);
+		THREE.log("MISSING_PARAMETERS for animation:" + entryID);
 		return false;
 	            }
 	

+ 2 - 2
examples/js/loaders/gltf/glTFLoaderUtils.js

@@ -43,12 +43,12 @@ THREE.GLTFLoaderUtils = Object.create(Object, {
         enumerable: false,
         value: function(resourceID, resource) {
 	if (!resourceID) {
-		console.log("ERROR: entry does not contain id, cannot store");
+		THREE.log("ERROR: entry does not contain id, cannot store");
 		return;
 	}
 
 	if (this._containsResource[resourceID]) {
-		console.log("WARNING: resource:" + resourceID + " is already stored, overriding");
+		THREE.log("WARNING: resource:" + resourceID + " is already stored, overriding");
 	}
 
 	this._resources[resourceID] = resource;

+ 7 - 7
examples/js/modifiers/SubdivisionModifier.js

@@ -184,7 +184,7 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
 
 				if ( connectedFaces != 1 ) {
 					
-					if (WARNINGS) console.warn('Subdivision Modifier: Number of connected faces != 2, is: ', connectedFaces, currentEdge);
+					if (WARNINGS) THREE.warn('Subdivision Modifier: Number of connected faces != 2, is: ', connectedFaces, currentEdge);
 			
 				}
 
@@ -215,7 +215,7 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
 			currentEdge.newEdge = newEdgeVertices.length;
 			newEdgeVertices.push(newEdge);
 
-			// console.log(currentEdge, newEdge);
+			// THREE.log(currentEdge, newEdge);
 		}
 
 		/******************************************************
@@ -257,11 +257,11 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
 			if ( n <= 2 ) {
 				
 				// crease and boundary rules
-				// console.warn('crease and boundary rules');
+				// THREE.warn('crease and boundary rules');
 
 				if ( n == 2 ) {
 
-					if (WARNINGS) console.warn('2 connecting edges', connectingEdges);
+					if (WARNINGS) THREE.warn('2 connecting edges', connectingEdges);
 					sourceVertexWeight = 3 / 4;
 					connectingVertexWeight = 1 / 8;
 
@@ -270,11 +270,11 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
 
 				} else if ( n == 1 ) {
 
-					if (WARNINGS) console.warn('only 1 connecting edge');
+					if (WARNINGS) THREE.warn('only 1 connecting edge');
 
 				} else if ( n == 0 ) {
 
-					if (WARNINGS) console.warn('0 connecting edges');
+					if (WARNINGS) THREE.warn('0 connecting edges');
 			
 				}
 			
@@ -335,7 +335,7 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
 		geometry.vertices = newVertices;
 		geometry.faces = newFaces;
 
-		// console.log('done');
+		// THREE.log('done');
 
 	};
 

+ 3 - 3
examples/js/postprocessing/AdaptiveToneMappingPass.js

@@ -18,7 +18,7 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
 	this.currentLuminanceRT = null;
 
 	if ( THREE.CopyShader === undefined )
-		console.error( "THREE.AdaptiveToneMappingPass relies on THREE.CopyShader" );
+		THREE.error( "THREE.AdaptiveToneMappingPass relies on THREE.CopyShader" );
 
 	var copyShader = THREE.CopyShader;
 
@@ -35,7 +35,7 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
 	} );
 
 	if ( THREE.LuminosityShader === undefined )
-		console.error( "THREE.AdaptiveToneMappingPass relies on THREE.LuminosityShader" );
+		THREE.error( "THREE.AdaptiveToneMappingPass relies on THREE.LuminosityShader" );
 
 	this.materialLuminance = new THREE.ShaderMaterial( {
 
@@ -103,7 +103,7 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
 	} );
 
 	if ( THREE.ToneMapShader === undefined )
-		console.error( "THREE.AdaptiveToneMappingPass relies on THREE.ToneMapShader" );
+		THREE.error( "THREE.AdaptiveToneMappingPass relies on THREE.ToneMapShader" );
 
 	this.materialToneMap = new THREE.ShaderMaterial( {
 

+ 2 - 2
examples/js/postprocessing/BloomPass.js

@@ -19,7 +19,7 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
 	// copy material
 
 	if ( THREE.CopyShader === undefined )
-		console.error( "THREE.BloomPass relies on THREE.CopyShader" );
+		THREE.error( "THREE.BloomPass relies on THREE.CopyShader" );
 
 	var copyShader = THREE.CopyShader;
 
@@ -40,7 +40,7 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
 	// convolution material
 
 	if ( THREE.ConvolutionShader === undefined )
-		console.error( "THREE.BloomPass relies on THREE.ConvolutionShader" );
+		THREE.error( "THREE.BloomPass relies on THREE.ConvolutionShader" );
 
 	var convolutionShader = THREE.ConvolutionShader;
 

+ 1 - 1
examples/js/postprocessing/BokehPass.js

@@ -33,7 +33,7 @@ THREE.BokehPass = function ( scene, camera, params ) {
 	// bokeh material
 
 	if ( THREE.BokehShader === undefined ) {
-		console.error( "THREE.BokehPass relies on THREE.BokehShader" );
+		THREE.error( "THREE.BokehPass relies on THREE.BokehShader" );
 	}
 	
 	var bokehShader = THREE.BokehShader;

+ 1 - 1
examples/js/postprocessing/DotScreenPass.js

@@ -5,7 +5,7 @@
 THREE.DotScreenPass = function ( center, angle, scale ) {
 
 	if ( THREE.DotScreenShader === undefined )
-		console.error( "THREE.DotScreenPass relies on THREE.DotScreenShader" );
+		THREE.error( "THREE.DotScreenPass relies on THREE.DotScreenShader" );
 
 	var shader = THREE.DotScreenShader;
 

+ 1 - 1
examples/js/postprocessing/EffectComposer.js

@@ -27,7 +27,7 @@ THREE.EffectComposer = function ( renderer, renderTarget ) {
 	this.passes = [];
 
 	if ( THREE.CopyShader === undefined )
-		console.error( "THREE.EffectComposer relies on THREE.CopyShader" );
+		THREE.error( "THREE.EffectComposer relies on THREE.CopyShader" );
 
 	this.copyPass = new THREE.ShaderPass( THREE.CopyShader );
 

+ 1 - 1
examples/js/postprocessing/FilmPass.js

@@ -5,7 +5,7 @@
 THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) {
 
 	if ( THREE.FilmShader === undefined )
-		console.error( "THREE.FilmPass relies on THREE.FilmShader" );
+		THREE.error( "THREE.FilmPass relies on THREE.FilmShader" );
 
 	var shader = THREE.FilmShader;
 

+ 5 - 5
examples/js/postprocessing/GlitchPass.js

@@ -4,7 +4,7 @@
 
 THREE.GlitchPass = function ( dt_size ) {
 
-	if ( THREE.DigitalGlitch === undefined ) console.error( "THREE.GlitchPass relies on THREE.DigitalGlitch" );
+	if ( THREE.DigitalGlitch === undefined ) THREE.error( "THREE.GlitchPass relies on THREE.DigitalGlitch" );
 	
 	var shader = THREE.DigitalGlitch;
 	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
@@ -21,7 +21,7 @@ THREE.GlitchPass = function ( dt_size ) {
 		fragmentShader: shader.fragmentShader
 	});
 
-	console.log(this.material);
+	THREE.log(this.material);
 	
 	this.enabled = true;
 	this.renderToScreen = false;
@@ -91,7 +91,7 @@ THREE.GlitchPass.prototype = {
 	generateHeightmap:function(dt_size)
 	{
 		var data_arr = new Float32Array( dt_size * dt_size * 3 );
-		console.log(dt_size);
+		THREE.log(dt_size);
 		var length = dt_size * dt_size;
 		
 		for ( var i = 0; i < length; i ++) 
@@ -103,8 +103,8 @@ THREE.GlitchPass.prototype = {
 		}
 		
 		var texture = new THREE.DataTexture( data_arr, dt_size, dt_size, THREE.RGBFormat, THREE.FloatType );
-		console.log(texture);
-		console.log(dt_size);
+		THREE.log(texture);
+		THREE.log(dt_size);
 		texture.minFilter = THREE.NearestFilter;
 		texture.magFilter = THREE.NearestFilter;
 		texture.needsUpdate = true;

+ 1 - 1
examples/js/postprocessing/SavePass.js

@@ -5,7 +5,7 @@
 THREE.SavePass = function ( renderTarget ) {
 
 	if ( THREE.CopyShader === undefined )
-		console.error( "THREE.SavePass relies on THREE.CopyShader" );
+		THREE.error( "THREE.SavePass relies on THREE.CopyShader" );
 
 	var shader = THREE.CopyShader;
 

+ 1 - 1
examples/js/postprocessing/TexturePass.js

@@ -5,7 +5,7 @@
 THREE.TexturePass = function ( texture, opacity ) {
 
 	if ( THREE.CopyShader === undefined )
-		console.error( "THREE.TexturePass relies on THREE.CopyShader" );
+		THREE.error( "THREE.TexturePass relies on THREE.CopyShader" );
 
 	var shader = THREE.CopyShader;
 

+ 1 - 1
examples/js/renderers/CSS2DRenderer.js

@@ -28,7 +28,7 @@ THREE.CSS2DObject.prototype.constructor = THREE.CSS2DObject;
 
 THREE.CSS2DRenderer = function () {
 
-	console.log( 'THREE.CSS2DRenderer', THREE.REVISION );
+	THREE.log( 'THREE.CSS2DRenderer', THREE.REVISION );
 
 	var _width, _height;
 	var _widthHalf, _heightHalf;

+ 1 - 1
examples/js/renderers/CSS3DRenderer.js

@@ -38,7 +38,7 @@ THREE.CSS3DSprite.prototype.constructor = THREE.CSS3DSprite;
 
 THREE.CSS3DRenderer = function () {
 
-	console.log( 'THREE.CSS3DRenderer', THREE.REVISION );
+	THREE.log( 'THREE.CSS3DRenderer', THREE.REVISION );
 
 	var _width, _height;
 	var _widthHalf, _heightHalf;

+ 1 - 1
examples/js/renderers/CSS3DStereoRenderer.js

@@ -46,7 +46,7 @@ THREE.CSS3DSprite.prototype.constructor = THREE.CSS3DSprite;
 
 THREE.CSS3DStereoRenderer = function () {
 
-	console.log( 'THREE.CSS3DRenderer', THREE.REVISION );
+	THREE.log( 'THREE.CSS3DRenderer', THREE.REVISION );
 
 	var _width, _height;
 	var _widthHalf, _heightHalf;

+ 3 - 3
examples/js/renderers/CanvasRenderer.js

@@ -35,7 +35,7 @@ THREE.SpriteCanvasMaterial.prototype.clone = function () {
 
 THREE.CanvasRenderer = function ( parameters ) {
 
-	console.log( 'THREE.CanvasRenderer', THREE.REVISION );
+	THREE.log( 'THREE.CanvasRenderer', THREE.REVISION );
 
 	var smoothstep = THREE.Math.smoothstep;
 
@@ -220,7 +220,7 @@ THREE.CanvasRenderer = function ( parameters ) {
 
 	this.setClearColorHex = function ( hex, alpha ) {
 
-		console.warn( 'THREE.CanvasRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.' );
+		THREE.warn( 'THREE.CanvasRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.' );
 		this.setClearColor( hex, alpha );
 
 	};
@@ -298,7 +298,7 @@ THREE.CanvasRenderer = function ( parameters ) {
 
 		if ( camera instanceof THREE.Camera === false ) {
 
-			console.error( 'THREE.CanvasRenderer.render: camera is not an instance of THREE.Camera.' );
+			THREE.error( 'THREE.CanvasRenderer.render: camera is not an instance of THREE.Camera.' );
 			return;
 
 		}

+ 3 - 3
examples/js/renderers/Projector.js

@@ -127,21 +127,21 @@ THREE.Projector = function () {
 
 	this.projectVector = function ( vector, camera ) {
 
-		console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
+		THREE.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
 		vector.project( camera );
 
 	};
 
 	this.unprojectVector = function ( vector, camera ) {
 
-		console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
+		THREE.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
 		vector.unproject( camera );
 
 	};
 
 	this.pickingRay = function ( vector, camera ) {
 
-		console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
+		THREE.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
 
 	};
 

+ 1 - 1
examples/js/renderers/RaytracingRenderer.js

@@ -5,7 +5,7 @@
 
 THREE.RaytracingRenderer = function ( parameters ) {
 
-	console.log( 'THREE.RaytracingRenderer', THREE.REVISION );
+	THREE.log( 'THREE.RaytracingRenderer', THREE.REVISION );
 
 	parameters = parameters || {};
 

+ 2 - 2
examples/js/renderers/SVGRenderer.js

@@ -15,7 +15,7 @@ THREE.SVGObject.prototype.constructor = THREE.SVGObject;
 
 THREE.SVGRenderer = function () {
 
-	console.log( 'THREE.SVGRenderer', THREE.REVISION );
+	THREE.log( 'THREE.SVGRenderer', THREE.REVISION );
 
 	var _this = this,
 	_renderData, _elements, _lights,
@@ -125,7 +125,7 @@ THREE.SVGRenderer = function () {
 
 		if ( camera instanceof THREE.Camera === false ) {
 
-			console.error( 'THREE.SVGRenderer.render: camera is not an instance of THREE.Camera.' );
+			THREE.error( 'THREE.SVGRenderer.render: camera is not an instance of THREE.Camera.' );
 			return;
 
 		}

+ 1 - 1
examples/js/renderers/SoftwareRenderer.js

@@ -7,7 +7,7 @@
 
 THREE.SoftwareRenderer = function ( parameters ) {
 
-	console.log( 'THREE.SoftwareRenderer', THREE.REVISION );
+	THREE.log( 'THREE.SoftwareRenderer', THREE.REVISION );
 
 	parameters = parameters || {};
 

+ 2 - 2
examples/js/utils/GeometryUtils.js

@@ -9,7 +9,7 @@ THREE.GeometryUtils = {
 
 	merge: function ( geometry1, geometry2, materialIndexOffset ) {
 
-		console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
+		THREE.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
 
 		var matrix;
 
@@ -292,7 +292,7 @@ THREE.GeometryUtils = {
 
 	center: function ( geometry ) {
 
-		console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
+		THREE.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
 		return geometry.center();
 
 	}

+ 1 - 1
examples/js/wip/ProxyGeometry.js

@@ -573,7 +573,7 @@ THREE.ProxyGeometry.prototype.mergeVertices = function () {
 
 		} else {
 
-			//console.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
+			//THREE.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
 			changes[ i ] = changes[ verticesMap[ key ] ];
 
 		}

+ 7 - 7
src/core/BufferGeometry.js

@@ -682,9 +682,9 @@ THREE.BufferGeometry.prototype = {
 		var facesCount = ( indices.length / 3 );
 
 		/*
-		console.log("Computing buffers in offsets of "+size+" -> indices:"+indices.length+" vertices:"+vertices.length);
-		console.log("Faces to process: "+(indices.length/3));
-		console.log("Reordering "+verticesCount+" vertices.");
+		THREE.log("Computing buffers in offsets of "+size+" -> indices:"+indices.length+" vertices:"+vertices.length);
+		THREE.log("Faces to process: "+(indices.length/3));
+		THREE.log("Reordering "+verticesCount+" vertices.");
 		*/
 
 		var sortedIndices = new Uint16Array( indices.length ); //16-bit buffers
@@ -763,10 +763,10 @@ THREE.BufferGeometry.prototype = {
 
 		/*
 		var orderTime = Date.now();
-		console.log("Reorder time: "+(orderTime-s)+"ms");
-		console.log("Duplicated "+duplicatedVertices+" vertices.");
-		console.log("Compute Buffers time: "+(Date.now()-s)+"ms");
-		console.log("Draw offsets: "+offsets.length);
+		THREE.log("Reorder time: "+(orderTime-s)+"ms");
+		THREE.log("Duplicated "+duplicatedVertices+" vertices.");
+		THREE.log("Compute Buffers time: "+(Date.now()-s)+"ms");
+		THREE.log("Draw offsets: "+offsets.length);
 		*/
 
 		return offsets;

+ 1 - 1
src/core/Geometry.js

@@ -738,7 +738,7 @@ THREE.Geometry.prototype = {
 
 			} else {
 
-				//console.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
+				//THREE.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
 				changes[ i ] = changes[ verticesMap[ key ] ];
 
 			}

+ 1 - 1
src/extras/FontUtils.js

@@ -134,7 +134,7 @@ THREE.FontUtils = {
 
 				action = outline[ i ++ ];
 
-				//console.log( action );
+				//THREE.log( action );
 
 				switch ( action ) {
 

+ 2 - 2
src/extras/core/Curve.js

@@ -113,7 +113,7 @@ THREE.Curve.prototype.getLengths = function ( divisions ) {
 		&& ( this.cacheArcLengths.length == divisions + 1 )
 		&& ! this.needsUpdate) {
 
-		//console.log( "cached", this.cacheArcLengths );
+		//THREE.log( "cached", this.cacheArcLengths );
 		return this.cacheArcLengths;
 
 	}
@@ -200,7 +200,7 @@ THREE.Curve.prototype.getUtoTmapping = function ( u, distance ) {
 
 	i = high;
 
-	//console.log('b' , i, low, high, Date.now()- time);
+	//THREE.log('b' , i, low, high, Date.now()- time);
 
 	if ( arcLengths[ i ] == targetArcLength ) {
 

+ 13 - 13
src/extras/core/Path.js

@@ -208,7 +208,7 @@ THREE.Path.prototype.getSpacedPoints = function ( divisions, closedPath ) {
 THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 
 	if (this.useSpacedPoints) {
-		console.log('tata');
+		THREE.log('tata');
 		return this.getSpacedPoints( divisions, closedPath );
 	}
 
@@ -367,13 +367,13 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 				tx = aX + aRadius * Math.cos( angle );
 				ty = aY + aRadius * Math.sin( angle );
 
-				//console.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
+				//THREE.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
 
 				points.push( new THREE.Vector2( tx, ty ) );
 
 			}
 
-			//console.log(points);
+			//THREE.log(points);
 
 			break;
 		  
@@ -405,13 +405,13 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 				tx = aX + xRadius * Math.cos( angle );
 				ty = aY + yRadius * Math.sin( angle );
 
-				//console.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
+				//THREE.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
 
 				points.push( new THREE.Vector2( tx, ty ) );
 
 			}
 
-			//console.log(points);
+			//THREE.log(points);
 
 			break;
 
@@ -485,7 +485,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 
 		}
 
-		// console.log(subPaths);
+		// THREE.log(subPaths);
 
 		return	subPaths;
 	}
@@ -505,7 +505,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 			shapes.push( tmpShape );
 		}
 
-		//console.log("shape", shapes);
+		//THREE.log("shape", shapes);
 
 		return shapes;
 	};
@@ -578,7 +578,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 	var holesFirst = ! THREE.Shape.Utils.isClockWise( subPaths[ 0 ].getPoints() );
 	holesFirst = isCCW ? ! holesFirst : holesFirst;
 
-	// console.log("Holes first", holesFirst);
+	// THREE.log("Holes first", holesFirst);
 	
 	var betterShapeHoles = [];
 	var newShapes = [];
@@ -609,13 +609,13 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 			if ( holesFirst )	mainIdx ++;
 			newShapeHoles[mainIdx] = [];
 
-			//console.log('cw', i);
+			//THREE.log('cw', i);
 
 		} else {
 
 			newShapeHoles[mainIdx].push( { h: tmpPath, p: tmpPoints[0] } );
 
-			//console.log('ccw', i);
+			//THREE.log('ccw', i);
 
 		}
 
@@ -651,9 +651,9 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 				if ( hole_unassigned ) { betterShapeHoles[sIdx].push( ho ); }
 			}
 		}
-		// console.log("ambigious: ", ambigious);
+		// THREE.log("ambigious: ", ambigious);
 		if ( toChange.length > 0 ) {
-			// console.log("to change: ", toChange);
+			// THREE.log("to change: ", toChange);
 			if (! ambigious)	newShapeHoles = betterShapeHoles;
 		}
 	}
@@ -668,7 +668,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
 		}
 	}
 
-	//console.log("shape", shapes);
+	//THREE.log("shape", shapes);
 
 	return shapes;
 

+ 7 - 7
src/extras/core/Shape.js

@@ -284,7 +284,7 @@ THREE.Shape.Utils = {
 			if ( Math.abs(from2toAngle) > EPSILON ) {			// angle != 180 deg.
 
 				var other2toAngle		= otherPtX * legToPtY - otherPtY * legToPtX;
-				// console.log( "from2to: " + from2toAngle + ", from2other: " + from2otherAngle + ", other2to: " + other2toAngle );
+				// THREE.log( "from2to: " + from2toAngle + ", from2other: " + from2otherAngle + ", other2to: " + other2toAngle );
 
 				if ( from2toAngle > 0 ) {				// main angle < 180 deg.
 					return	( ( from2otherAngle >= 0 ) && ( other2toAngle >= 0 ) );
@@ -292,7 +292,7 @@ THREE.Shape.Utils = {
 					return	( ( from2otherAngle >= 0 ) || ( other2toAngle >= 0 ) );
 				}
 			} else {										// angle == 180 deg.
-				// console.log( "from2to: 180 deg., from2other: " + from2otherAngle  );
+				// THREE.log( "from2to: 180 deg., from2other: " + from2otherAngle  );
 				return	( from2otherAngle > 0 );
 			}
 		}
@@ -315,7 +315,7 @@ THREE.Shape.Utils = {
 
 				var insideAngle = isPointInsideAngle( shape[inShapeIdx], shape[ prevShapeIdx ], shape[ nextShapeIdx ], hole[inHoleIdx] );
 				if (! insideAngle ) {
-					// console.log( "Vertex (Shape): " + inShapeIdx + ", Point: " + hole[inHoleIdx].x + "/" + hole[inHoleIdx].y );
+					// THREE.log( "Vertex (Shape): " + inShapeIdx + ", Point: " + hole[inHoleIdx].x + "/" + hole[inHoleIdx].y );
 					return	false;
 				}
 
@@ -330,7 +330,7 @@ THREE.Shape.Utils = {
 
 				insideAngle = isPointInsideAngle( hole[inHoleIdx], hole[ prevHoleIdx ], hole[ nextHoleIdx ], shape[inShapeIdx] );
 				if (! insideAngle ) {
-					// console.log( "Vertex (Hole): " + inHoleIdx + ", Point: " + shape[inShapeIdx].x + "/" + shape[inShapeIdx].y );
+					// THREE.log( "Vertex (Hole): " + inHoleIdx + ", Point: " + shape[inShapeIdx].x + "/" + shape[inShapeIdx].y );
 					return	false;
 				}
 
@@ -383,7 +383,7 @@ THREE.Shape.Utils = {
 			while ( indepHoles.length > 0 ) {
 				counter --;
 				if ( counter < 0 ) {
-					console.log( "Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!" );
+					THREE.log( "Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!" );
 					break;
 				}
 
@@ -452,7 +452,7 @@ THREE.Shape.Utils = {
 
 		}
 
-		//console.log( "allpoints",allpoints, allpoints.length );
+		//THREE.log( "allpoints",allpoints, allpoints.length );
 
 		// prepare all points map
 
@@ -474,7 +474,7 @@ THREE.Shape.Utils = {
 		var shapeWithoutHoles = removeHoles( contour, holes );
 
 		var triangles = THREE.FontUtils.Triangulate( shapeWithoutHoles, false ); // True returns indices for points of spooled shape
-		//console.log( "triangles",triangles, triangles.length );
+		//THREE.log( "triangles",triangles, triangles.length );
 
 		// check all face vertices against all points map
 

+ 6 - 6
src/extras/geometries/ExtrudeGeometry.js

@@ -47,7 +47,7 @@ THREE.ExtrudeGeometry = function ( shapes, options ) {
 
 	//this.computeVertexNormals();
 
-	//console.log( "took", ( Date.now() - startTime ) );
+	//THREE.log( "took", ( Date.now() - startTime ) );
 
 };
 
@@ -101,7 +101,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
 
 		splineTube = options.frames !== undefined ? options.frames : new THREE.TubeGeometry.FrenetFrames(extrudePath, steps, false);
 
-		// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
+		// THREE.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
 
 		binormal = new THREE.Vector3();
 		normal = new THREE.Vector3();
@@ -260,12 +260,12 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
 			}
 
 			if ( direction_eq ) {
-				// console.log("Warning: lines are a straight sequence");
+				// THREE.log("Warning: lines are a straight sequence");
 				v_trans_x = - v_prev_y;
 				v_trans_y =  v_prev_x;
 				shrink_by = Math.sqrt( v_prev_lensq );
 			} else {
-				// console.log("Warning: lines are a straight spike");
+				// THREE.log("Warning: lines are a straight spike");
 				v_trans_x = v_prev_x;
 				v_trans_y = v_prev_y;
 				shrink_by = Math.sqrt( v_prev_lensq / 2 );
@@ -286,7 +286,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
 		if ( k === il ) k = 0;
 
 		//  (j)---(i)---(k)
-		// console.log('i,j,k', i, j , k)
+		// THREE.log('i,j,k', i, j , k)
 
 		contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );
 
@@ -558,7 +558,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
 			k = i - 1;
 			if ( k < 0 ) k = contour.length - 1;
 
-			//console.log('b', i,j, i-1, k,vertices.length);
+			//THREE.log('b', i,j, i-1, k,vertices.length);
 
 			var s = 0, sl = steps  + bevelSegments * 2;
 

+ 2 - 2
src/extras/geometries/ParametricGeometry.js

@@ -69,11 +69,11 @@ THREE.ParametricGeometry = function ( func, slices, stacks ) {
 
 	}
 
-	// console.log(this);
+	// THREE.log(this);
 
 	// magic bullet
 	// var diff = this.mergeVertices();
-	// console.log('removed ', diff, ' vertices by merging');
+	// THREE.log('removed ', diff, ' vertices by merging');
 
 	this.computeFaceNormals();
 	this.computeVertexNormals();

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

@@ -5,7 +5,7 @@
 
 THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) {
 
-	console.info( 'THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.' );
+	THREE.info( 'THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.' );
 
 	THREE.Geometry.call( this );
 

+ 2 - 2
src/loaders/Cache.js

@@ -8,7 +8,7 @@ THREE.Cache = {
 
 	add: function ( key, file ) {
 
-		// console.log( 'THREE.Cache', 'Adding key:', key );
+		// THREE.log( 'THREE.Cache', 'Adding key:', key );
 
 		this.files[ key ] = file;
 
@@ -16,7 +16,7 @@ THREE.Cache = {
 
 	get: function ( key ) {
 
-		// console.log( 'THREE.Cache', 'Checking key:', key );
+		// THREE.log( 'THREE.Cache', 'Checking key:', key );
 
 		return this.files[ key ];
 

+ 1 - 1
src/loaders/JSONLoader.js

@@ -207,7 +207,7 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) {
 			hasFaceColor	     = isBitSet( type, 6 );
 			hasFaceVertexColor  = isBitSet( type, 7 );
 
-			// console.log("type", type, "bits", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);
+			// THREE.log("type", type, "bits", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);
 
 			if ( isQuad ) {
 

+ 1 - 1
src/loaders/Loader.js

@@ -316,7 +316,7 @@ THREE.Loader.prototype = {
 
 		if ( m.transparency !== undefined ) {
 
-			console.warn( 'THREE.Loader: transparency has been renamed to opacity' );
+			THREE.warn( 'THREE.Loader: transparency has been renamed to opacity' );
 			m.opacity = m.transparency;
 
 		}

+ 6 - 6
src/renderers/WebGLRenderer.js

@@ -7,7 +7,7 @@
 
 THREE.WebGLRenderer = function ( parameters ) {
 
-	console.log( 'THREE.WebGLRenderer', THREE.REVISION );
+	THREE.log( 'THREE.WebGLRenderer', THREE.REVISION );
 
 	parameters = parameters || {};
 
@@ -3123,7 +3123,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			if ( influences.length > morphTargets.length ) {
 
-				console.warn( 'THREE.WebGLRenderer: Influences array is bigger than morphTargets array.' );
+				THREE.warn( 'THREE.WebGLRenderer: Influences array is bigger than morphTargets array.' );
 				influences.length = morphTargets.length;
 
 			}
@@ -3928,7 +3928,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 					} else if ( attribute.updateRange.count === 0 ) {
 
-						console.error( 'THREE.WebGLRenderer.updateObject: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually.' );
+						THREE.error( 'THREE.WebGLRenderer.updateObject: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually.' );
 
 					} else {
 
@@ -5940,7 +5940,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( ! ( renderTarget instanceof THREE.WebGLRenderTarget ) ) {
 
-			console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );
+			THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );
 			return;
 
 		}
@@ -5949,7 +5949,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			if ( renderTarget.format !== THREE.RGBAFormat ) {
 
-				console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.' );
+				THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.' );
 				return;
 
 			}
@@ -5970,7 +5970,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			} else {
 
-				console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );
+				THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );
 
 			}
 

+ 1 - 1
src/renderers/webgl/WebGLProgram.js

@@ -137,7 +137,7 @@ THREE.WebGLProgram = ( function () {
 
 		var gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0;
 
-		// console.log( 'building new program ' );
+		// THREE.log( 'building new program ' );
 
 		//
 

+ 1 - 1
src/renderers/webgl/WebGLShader.js

@@ -34,7 +34,7 @@ THREE.WebGLShader = ( function () {
 		}
 
 		// --enable-privileged-webgl-extension
-		// console.log( type, gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );
+		// THREE.log( type, gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );
 
 		return shader;
 

+ 1 - 1
src/renderers/webgl/plugins/ShadowMapPlugin.js

@@ -122,7 +122,7 @@ THREE.ShadowMapPlugin = function ( _renderer, _lights, _webglObjects, _webglObje
 
 						light.shadowCascadeArray[ n ] = virtualLight;
 
-						//console.log( "Created virtualLight", virtualLight );
+						//THREE.log( "Created virtualLight", virtualLight );
 
 					} else {