提交 cdcdde93 编写于 作者: M Mr.doob

Reverted console.* to THREE.* change. See #5791.

上级 fdf80220
......@@ -26,13 +26,6 @@ if ( Math.sign === undefined ) {
}
// set the default log handlers
THREE.log = function() { console.log.apply( console, arguments ); };
THREE.warn = function() { console.warn.apply( console, arguments ); };
THREE.error = function() { console.error.apply( console, arguments ); };
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.button
THREE.MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
......@@ -208,25 +201,25 @@ THREE.RGBA_PVRTC_2BPPV1_Format = 2103;
THREE.Projector = function () {
THREE.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
this.projectVector = function ( vector, camera ) {
THREE.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
vector.project( camera );
};
this.unprojectVector = function ( vector, camera ) {
THREE.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
vector.unproject( camera );
};
this.pickingRay = function ( vector, camera ) {
THREE.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
};
......@@ -234,7 +227,7 @@ THREE.Projector = function () {
THREE.CanvasRenderer = function () {
THREE.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
this.domElement = document.createElement( 'canvas' );
this.clear = function () {};
......
......@@ -276,21 +276,21 @@ THREE.BufferAttribute.prototype = {
THREE.Int8Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Int8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Int8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Uint8Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Uint8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Uint8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Uint8ClampedAttribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Uint8ClampedAttribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Uint8ClampedAttribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
......@@ -298,42 +298,42 @@ THREE.Uint8ClampedAttribute = function ( data, itemSize ) {
THREE.Int16Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Int16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Int16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Uint16Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Uint16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Uint16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Int32Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Int32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Int32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Uint32Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Uint32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Uint32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Float32Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Float32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Float32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
THREE.Float64Attribute = function ( data, itemSize ) {
THREE.warn( 'THREE.Float64Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
console.warn( 'THREE.Float64Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead.' );
return new THREE.BufferAttribute( data, itemSize );
};
......@@ -31,7 +31,7 @@ THREE.BufferGeometry.prototype = {
if ( attribute instanceof THREE.BufferAttribute === false && attribute instanceof THREE.InterleavedBufferAttribute === false ) {
THREE.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
this.attributes[ name ] = { array: arguments[ 1 ], itemSize: arguments[ 2 ] };
......@@ -458,7 +458,7 @@ THREE.BufferGeometry.prototype = {
} else {
THREE.warn( 'THREE.BufferGeometry.fromGeometry(): Undefined vertexUv', i );
console.warn( 'THREE.BufferGeometry.fromGeometry(): Undefined vertexUv', i );
}
......@@ -485,7 +485,7 @@ THREE.BufferGeometry.prototype = {
} else {
THREE.warn( 'THREE.BufferGeometry.fromGeometry(): Undefined vertexUv2', i );
console.warn( 'THREE.BufferGeometry.fromGeometry(): Undefined vertexUv2', i );
}
......@@ -559,7 +559,7 @@ THREE.BufferGeometry.prototype = {
if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {
THREE.error( 'THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this );
console.error( 'THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this );
}
......@@ -613,7 +613,7 @@ THREE.BufferGeometry.prototype = {
if ( isNaN( this.boundingSphere.radius ) ) {
THREE.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this );
console.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this );
}
......@@ -758,7 +758,7 @@ THREE.BufferGeometry.prototype = {
this.attributes.normal === undefined ||
this.attributes.uv === undefined ) {
THREE.warn( 'THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()' );
console.warn( 'THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()' );
return;
}
......@@ -948,9 +948,9 @@ THREE.BufferGeometry.prototype = {
var UintArray = ( ( vertices.length / 3 ) > 65535 && THREE.BufferGeometry.MaxIndex > 65535 ) ? Uint32Array : Uint16Array;
/*
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.");
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.");
*/
var sortedIndices = new UintArray( indices.length );
......@@ -1030,10 +1030,10 @@ THREE.BufferGeometry.prototype = {
/*
var orderTime = Date.now();
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);
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);
*/
return offsets;
......@@ -1044,7 +1044,7 @@ THREE.BufferGeometry.prototype = {
if ( geometry instanceof THREE.BufferGeometry === false ) {
THREE.error( 'THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry );
console.error( 'THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry );
return;
}
......
......@@ -41,14 +41,14 @@ THREE.DynamicGeometry.prototype = {
computeFaceNormals: function () {
THREE.warn( 'THREE.DynamicGeometry: computeFaceNormals() is not a method of this type of geometry.' );
console.warn( 'THREE.DynamicGeometry: computeFaceNormals() is not a method of this type of geometry.' );
return this;
},
computeVertexNormals: function () {
THREE.warn( 'THREE.DynamicGeometry: computeVertexNormals () is not a method of this type of geometry.' );
console.warn( 'THREE.DynamicGeometry: computeVertexNormals () is not a method of this type of geometry.' );
return this;
},
......
......@@ -4,7 +4,7 @@
THREE.Face4 = function ( a, b, c, d, normal, color, materialIndex ) {
THREE.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
return new THREE.Face3( a, b, c, normal, color, materialIndex );
};
......@@ -583,7 +583,7 @@ THREE.Geometry.prototype = {
if ( geometry instanceof THREE.Geometry === false ) {
THREE.error( 'THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.', geometry );
console.error( 'THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.', geometry );
return;
}
......@@ -689,7 +689,7 @@ THREE.Geometry.prototype = {
if ( mesh instanceof THREE.Mesh === false ) {
THREE.error( 'THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.', mesh );
console.error( 'THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.', mesh );
return;
}
......@@ -730,7 +730,7 @@ THREE.Geometry.prototype = {
} else {
//THREE.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
//console.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);
changes[ i ] = changes[ verticesMap[ key ] ];
}
......
......@@ -83,7 +83,7 @@ THREE.Object3D.prototype = {
get eulerOrder () {
THREE.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
console.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
return this.rotation.order;
......@@ -91,7 +91,7 @@ THREE.Object3D.prototype = {
set eulerOrder ( value ) {
THREE.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
console.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
this.rotation.order = value;
......@@ -99,13 +99,13 @@ THREE.Object3D.prototype = {
get useQuaternion () {
THREE.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
},
set useQuaternion ( value ) {
THREE.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
},
......@@ -223,7 +223,7 @@ THREE.Object3D.prototype = {
translate: function ( distance, axis ) {
THREE.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
return this.translateOnAxis( axis, distance );
},
......@@ -314,7 +314,7 @@ THREE.Object3D.prototype = {
if ( object === this ) {
THREE.error( "THREE.Object3D.add: object can't be added as a child of itself.", object );
console.error( "THREE.Object3D.add: object can't be added as a child of itself.", object );
return this;
}
......@@ -334,7 +334,7 @@ THREE.Object3D.prototype = {
} else {
THREE.error( "THREE.Object3D.add: object not an instance of THREE.Object3D.", object );
console.error( "THREE.Object3D.add: object not an instance of THREE.Object3D.", object );
}
......@@ -370,7 +370,7 @@ THREE.Object3D.prototype = {
getChildByName: function ( name ) {
THREE.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
return this.getObjectByName( name );
},
......
......@@ -79,7 +79,7 @@
} else {
THREE.error( 'THREE.Raycaster: Unsupported camera type.' );
console.error( 'THREE.Raycaster: Unsupported camera type.' );
}
......@@ -103,7 +103,7 @@
if ( objects instanceof Array === false ) {
THREE.warn( 'THREE.Raycaster.intersectObjects: objects is not an Array.' );
console.warn( 'THREE.Raycaster.intersectObjects: objects is not an Array.' );
return intersects;
}
......
......@@ -130,7 +130,7 @@ THREE.FontUtils = {
action = outline[ i ++ ];
//THREE.log( action );
//console.log( action );
switch ( action ) {
......@@ -327,7 +327,7 @@ THREE.FontUtils.generateShapes = function ( text, parameters ) {
//throw ( "Warning, unable to triangulate polygon!" );
//return null;
// Sometimes warning is fine, especially polygons are triangulated in reverse.
THREE.warn( 'THREE.FontUtils: Warning, unable to triangulate polygon! in Triangulate.process()' );
console.warn( 'THREE.FontUtils: Warning, unable to triangulate polygon! in Triangulate.process()' );
if ( indices ) return vertIndices;
return result;
......
......@@ -6,7 +6,7 @@ THREE.GeometryUtils = {
merge: function ( geometry1, geometry2, materialIndexOffset ) {
THREE.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
var matrix;
......@@ -25,7 +25,7 @@ THREE.GeometryUtils = {
center: function ( geometry ) {
THREE.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
return geometry.center();
}
......
......@@ -81,13 +81,13 @@ THREE.ImageUtils = {
loadCompressedTexture: function () {
THREE.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' )
console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' )
},
loadCompressedTextureCube: function () {
THREE.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' )
console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' )
},
......
......@@ -10,9 +10,9 @@ THREE.AnimationHandler = {
//
add: function () { THREE.warn( 'THREE.AnimationHandler.add() has been deprecated.' ); },
get: function () { THREE.warn( 'THREE.AnimationHandler.get() has been deprecated.' ); },
remove: function () { THREE.warn( 'THREE.AnimationHandler.remove() has been deprecated.' ); },
add: function () { console.warn( 'THREE.AnimationHandler.add() has been deprecated.' ); },
get: function () { console.warn( 'THREE.AnimationHandler.get() has been deprecated.' ); },
remove: function () { console.warn( 'THREE.AnimationHandler.remove() has been deprecated.' ); },
//
......
......@@ -56,7 +56,7 @@ THREE.Audio.prototype.play = function () {
if ( this.isPlaying === true ) {
THREE.warn( 'THREE.Audio: Audio is already playing.' );
console.warn( 'THREE.Audio: Audio is already playing.' );
return;
}
......
......@@ -43,7 +43,7 @@ THREE.Curve = function () {
THREE.Curve.prototype.getPoint = function ( t ) {
THREE.warn( "THREE.Curve: Warning, getPoint() not implemented!" );
console.warn( "THREE.Curve: Warning, getPoint() not implemented!" );
return null;
};
......@@ -113,7 +113,7 @@ THREE.Curve.prototype.getLengths = function ( divisions ) {
&& ( this.cacheArcLengths.length === divisions + 1 )
&& ! this.needsUpdate) {
//THREE.log( "cached", this.cacheArcLengths );
//console.log( "cached", this.cacheArcLengths );
return this.cacheArcLengths;
}
......@@ -200,7 +200,7 @@ THREE.Curve.prototype.getUtoTmapping = function ( u, distance ) {
i = high;
//THREE.log('b' , i, low, high, Date.now()- time);
//console.log('b' , i, low, high, Date.now()- time);
if ( arcLengths[ i ] === targetArcLength ) {
......
......@@ -208,7 +208,7 @@ THREE.Path.prototype.getSpacedPoints = function ( divisions, closedPath ) {
THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
if (this.useSpacedPoints) {
THREE.log('tata');
console.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 );
//THREE.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
//console.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
points.push( new THREE.Vector2( tx, ty ) );
}
//THREE.log(points);
//console.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 );
//THREE.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
//console.log('t', t, 'angle', angle, 'tx', tx, 'ty', ty);
points.push( new THREE.Vector2( tx, ty ) );
}
//THREE.log(points);
//console.log(points);
break;
......@@ -485,7 +485,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
}
// THREE.log(subPaths);
// console.log(subPaths);
return subPaths;
}
......@@ -505,7 +505,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
shapes.push( tmpShape );
}
//THREE.log("shape", shapes);
//console.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;
// THREE.log("Holes first", holesFirst);
// console.log("Holes first", holesFirst);
var betterShapeHoles = [];
var newShapes = [];
......@@ -609,13 +609,13 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
if ( holesFirst ) mainIdx ++;
newShapeHoles[mainIdx] = [];
//THREE.log('cw', i);
//console.log('cw', i);
} else {
newShapeHoles[mainIdx].push( { h: tmpPath, p: tmpPoints[0] } );
//THREE.log('ccw', i);
//console.log('ccw', i);
}
......@@ -651,9 +651,9 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
if ( hole_unassigned ) { betterShapeHoles[sIdx].push( ho ); }
}
}
// THREE.log("ambigious: ", ambigious);
// console.log("ambigious: ", ambigious);
if ( toChange.length > 0 ) {
// THREE.log("to change: ", toChange);
// console.log("to change: ", toChange);
if (! ambigious) newShapeHoles = betterShapeHoles;
}
}
......@@ -668,7 +668,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
}
}
//THREE.log("shape", shapes);
//console.log("shape", shapes);
return shapes;
......
......@@ -284,7 +284,7 @@ THREE.Shape.Utils = {
if ( Math.abs(from2toAngle) > EPSILON ) { // angle != 180 deg.
var other2toAngle = otherPtX * legToPtY - otherPtY * legToPtX;
// THREE.log( "from2to: " + from2toAngle + ", from2other: " + from2otherAngle + ", other2to: " + other2toAngle );
// console.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.
// THREE.log( "from2to: 180 deg., from2other: " + from2otherAngle );
// console.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 ) {
// THREE.log( "Vertex (Shape): " + inShapeIdx + ", Point: " + hole[inHoleIdx].x + "/" + hole[inHoleIdx].y );
// console.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 ) {
// THREE.log( "Vertex (Hole): " + inHoleIdx + ", Point: " + shape[inShapeIdx].x + "/" + shape[inShapeIdx].y );
// console.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 ) {
THREE.log( "Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!" );
console.log( "Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!" );
break;
}
......@@ -452,7 +452,7 @@ THREE.Shape.Utils = {
}
//THREE.log( "allpoints",allpoints, allpoints.length );
//console.log( "allpoints",allpoints, allpoints.length );
// prepare all points map
......@@ -462,7 +462,7 @@ THREE.Shape.Utils = {
if ( allPointsMap[ key ] !== undefined ) {
THREE.warn( "THREE.Shape: Duplicate point", key );
console.warn( "THREE.Shape: Duplicate point", key );
}
......@@ -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
//THREE.log( "triangles",triangles, triangles.length );
//console.log( "triangles",triangles, triangles.length );
// check all face vertices against all points map
......
......@@ -7,7 +7,7 @@ THREE.SplineCurve3 = THREE.Curve.create(
function ( points /* array of Vector3 */) {
THREE.warn( 'THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3' );
console.warn( 'THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3' );
this.points = ( points == undefined ) ? [] : points;
},
......
......@@ -45,7 +45,7 @@ THREE.ExtrudeGeometry = function ( shapes, options ) {
//this.computeVertexNormals();
//THREE.log( "took", ( Date.now() - startTime ) );
//console.log( "took", ( Date.now() - startTime ) );
};
......@@ -96,7 +96,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
splineTube = options.frames !== undefined ? options.frames : new THREE.TubeGeometry.FrenetFrames(extrudePath, steps, false);
// THREE.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);
binormal = new THREE.Vector3();
normal = new THREE.Vector3();
......@@ -168,7 +168,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
function scalePt2 ( pt, vec, size ) {
if ( ! vec ) THREE.error( "THREE.ExtrudeGeometry: vec does not exist" );
if ( ! vec ) console.error( "THREE.ExtrudeGeometry: vec does not exist" );
return vec.clone().multiplyScalar( size ).add( pt );
......@@ -255,12 +255,12 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
}
if ( direction_eq ) {
// THREE.log("Warning: lines are a straight sequence");
// console.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 {
// THREE.log("Warning: lines are a straight spike");
// console.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 );
......@@ -281,7 +281,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
if ( k === il ) k = 0;
// (j)---(i)---(k)
// THREE.log('i,j,k', i, j , k)
// console.log('i,j,k', i, j , k)
contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );
......@@ -553,7 +553,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
k = i - 1;
if ( k < 0 ) k = contour.length - 1;
//THREE.log('b', i,j, i-1, k,vertices.length);
//console.log('b', i,j, i-1, k,vertices.length);
var s = 0, sl = steps + bevelSegments * 2;
......
......@@ -69,11 +69,11 @@ THREE.ParametricGeometry = function ( func, slices, stacks ) {
}
// THREE.log(this);
// console.log(this);
// magic bullet
// var diff = this.mergeVertices();
// THREE.log('removed ', diff, ' vertices by merging');
// console.log('removed ', diff, ' vertices by merging');
this.computeFaceNormals();
this.computeVertexNormals();
......
......@@ -5,7 +5,7 @@
THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) {
THREE.log( 'THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.' );
console.log( 'THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.' );
THREE.Geometry.call( this );
......
......@@ -4,7 +4,7 @@
THREE.SphereGeometry = function ( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) {
THREE.log( 'THREE.SphereGeometry: Consider using THREE.SphereBufferGeometry for lower memory footprint.' );
console.log( 'THREE.SphereGeometry: Consider using THREE.SphereBufferGeometry for lower memory footprint.' );
THREE.Geometry.call( this );
......
......@@ -220,7 +220,7 @@ THREE.MorphBlendMesh.prototype.playAnimation = function ( name ) {
} else {
THREE.warn( "THREE.MorphBlendMesh: animation[" + name + "] undefined in .playAnimation()" );
console.warn( "THREE.MorphBlendMesh: animation[" + name + "] undefined in .playAnimation()" );
}
......
......@@ -8,7 +8,7 @@ THREE.Cache = {
add: function ( key, file ) {
// THREE.log( 'THREE.Cache', 'Adding key:', key );
// console.log( 'THREE.Cache', 'Adding key:', key );
this.files[ key ] = file;
......@@ -16,7 +16,7 @@ THREE.Cache = {
get: function ( key ) {
// THREE.log( 'THREE.Cache', 'Checking key:', key );
// console.log( 'THREE.Cache', 'Checking key:', key );
return this.files[ key ];
......
......@@ -46,14 +46,14 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
if ( metadata.type === 'object' ) {
THREE.error( 'THREE.JSONLoader: ' + url + ' should be loaded with THREE.ObjectLoader instead.' );
console.error( 'THREE.JSONLoader: ' + url + ' should be loaded with THREE.ObjectLoader instead.' );
return;
}
if ( metadata.type === 'scene' ) {
THREE.error( 'THREE.JSONLoader: ' + url + ' seems to be a Scene. Use THREE.SceneLoader instead.' );
console.error( 'THREE.JSONLoader: ' + url + ' seems to be a Scene. Use THREE.SceneLoader instead.' );
return;
}
......@@ -65,7 +65,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
} else {
THREE.error( 'THREE.JSONLoader: ' + url + ' seems to be unreachable or the file is empty.' );
console.error( 'THREE.JSONLoader: ' + url + ' seems to be unreachable or the file is empty.' );
}
......@@ -77,7 +77,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
} else {
THREE.error( 'THREE.JSONLoader: Couldn\'t load ' + url + ' (' + xhr.status + ')' );
console.error( 'THREE.JSONLoader: Couldn\'t load ' + url + ' (' + xhr.status + ')' );
}
......@@ -207,7 +207,7 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) {
hasFaceColor = isBitSet( type, 6 );
hasFaceVertexColor = isBitSet( type, 7 );
// THREE.log("type", type, "bits", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);
// console.log("type", type, "bits", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);
if ( isQuad ) {
......@@ -460,7 +460,7 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) {
if ( geometry.bones && geometry.bones.length > 0 && ( geometry.skinWeights.length !== geometry.skinIndices.length || geometry.skinIndices.length !== geometry.vertices.length ) ) {
THREE.warn( 'THREE.JSONLoader: When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' +
console.warn( 'THREE.JSONLoader: When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' +
geometry.skinIndices.length + '), and skinWeights (' + geometry.skinWeights.length + ') should match.' );
}
......
......@@ -316,7 +316,7 @@ THREE.Loader.prototype = {
if ( m.transparency !== undefined ) {
THREE.warn( 'THREE.Loader: transparency has been renamed to opacity' );
console.warn( 'THREE.Loader: transparency has been renamed to opacity' );
m.opacity = m.transparency;
}
......
......@@ -229,7 +229,7 @@ THREE.ObjectLoader.prototype = {
if ( textures[ name ] === undefined ) {
THREE.warn( 'THREE.ObjectLoader: Undefined texture', name );
console.warn( 'THREE.ObjectLoader: Undefined texture', name );
}
......@@ -342,13 +342,13 @@ THREE.ObjectLoader.prototype = {
if ( data.image === undefined ) {
THREE.warn( 'THREE.ObjectLoader: No "image" speficied for', data.uuid );
console.warn( 'THREE.ObjectLoader: No "image" speficied for', data.uuid );
}
if ( images[ data.image ] === undefined ) {
THREE.warn( 'THREE.ObjectLoader: Undefined image', data.image );
console.warn( 'THREE.ObjectLoader: Undefined image', data.image );
}
......@@ -392,7 +392,7 @@ THREE.ObjectLoader.prototype = {
if ( geometries[ name ] === undefined ) {
THREE.warn( 'THREE.ObjectLoader: Undefined geometry', name );
console.warn( 'THREE.ObjectLoader: Undefined geometry', name );
}
......@@ -404,7 +404,7 @@ THREE.ObjectLoader.prototype = {
if ( materials[ name ] === undefined ) {
THREE.warn( 'THREE.ObjectLoader: Undefined material', name );
console.warn( 'THREE.ObjectLoader: Undefined material', name );
}
......
......@@ -74,7 +74,7 @@ THREE.Material.prototype = {
if ( newValue === undefined ) {
THREE.warn( "THREE.Material: '" + key + "' parameter is undefined." );
console.warn( "THREE.Material: '" + key + "' parameter is undefined." );
continue;
}
......
......@@ -4,7 +4,7 @@
THREE.MeshFaceMaterial = function ( materials ) {
THREE.error( 'THREE.MeshFaceMaterial has been removed.' );
console.error( 'THREE.MeshFaceMaterial has been removed.' );
var material = materials !== undefined ? materials[ 0 ] : new THREE.MeshBasicMaterial();
material.materials = []; // temporal workaround
......
......@@ -69,14 +69,14 @@ THREE.PointCloudMaterial.prototype.clone = function () {
THREE.ParticleBasicMaterial = function ( parameters ) {
THREE.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointCloudMaterial.' );
console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointCloudMaterial.' );
return new THREE.PointCloudMaterial( parameters );
};
THREE.ParticleSystemMaterial = function ( parameters ) {
THREE.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointCloudMaterial.' );
console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointCloudMaterial.' );
return new THREE.PointCloudMaterial( parameters );
};
......@@ -212,7 +212,7 @@ THREE.Euler.prototype = {
} else {
THREE.warn( 'THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + order )
console.warn( 'THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + order )
}
......
......@@ -16,7 +16,7 @@ THREE.Matrix3 = function () {
if ( arguments.length > 0 ) {
THREE.error( 'THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.' );
console.error( 'THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.' );
}
......@@ -70,14 +70,14 @@ THREE.Matrix3.prototype = {
multiplyVector3: function ( vector ) {
THREE.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
return vector.applyMatrix3( this );
},
multiplyVector3Array: function ( a ) {
THREE.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
},
......@@ -190,7 +190,7 @@ THREE.Matrix3.prototype = {
} else {
THREE.warn( msg );
console.warn( msg );
}
......
......@@ -24,7 +24,7 @@ THREE.Matrix4 = function () {
if ( arguments.length > 0 ) {
THREE.error( 'THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.' );
console.error( 'THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.' );
}
......@@ -72,7 +72,7 @@ THREE.Matrix4.prototype = {
extractPosition: function ( m ) {
THREE.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
return this.copyPosition( m );
},
......@@ -152,7 +152,7 @@ THREE.Matrix4.prototype = {
if ( euler instanceof THREE.Euler === false ) {
THREE.error( 'THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.' );
console.error( 'THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.' );
}
......@@ -278,7 +278,7 @@ THREE.Matrix4.prototype = {
setRotationFromQuaternion: function ( q ) {
THREE.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
return this.makeRotationFromQuaternion( q );
......@@ -367,7 +367,7 @@ THREE.Matrix4.prototype = {
if ( n !== undefined ) {
THREE.warn( 'THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.' );
console.warn( 'THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.' );
return this.multiplyMatrices( m, n );
}
......@@ -446,21 +446,21 @@ THREE.Matrix4.prototype = {
multiplyVector3: function ( vector ) {
THREE.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );
console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );
return vector.applyProjection( this );
},
multiplyVector4: function ( vector ) {
THREE.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
},
multiplyVector3Array: function ( a ) {
THREE.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
},
......@@ -519,7 +519,7 @@ THREE.Matrix4.prototype = {
rotateAxis: function ( v ) {
THREE.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
v.transformDirection( this );
......@@ -527,7 +527,7 @@ THREE.Matrix4.prototype = {
crossVector: function ( vector ) {
THREE.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
},
......@@ -634,7 +634,7 @@ THREE.Matrix4.prototype = {
return function () {
if ( v1 === undefined ) v1 = new THREE.Vector3();
THREE.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
var te = this.elements;
return v1.set( te[ 12 ], te[ 13 ], te[ 14 ] );
......@@ -695,7 +695,7 @@ THREE.Matrix4.prototype = {
} else {
THREE.warn( msg );
console.warn( msg );
}
......@@ -713,31 +713,31 @@ THREE.Matrix4.prototype = {
translate: function ( v ) {
THREE.error( 'THREE.Matrix4: .translate() has been removed.' );
console.error( 'THREE.Matrix4: .translate() has been removed.' );
},
rotateX: function ( angle ) {
THREE.error( 'THREE.Matrix4: .rotateX() has been removed.' );
console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
},
rotateY: function ( angle ) {
THREE.error( 'THREE.Matrix4: .rotateY() has been removed.' );
console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
},
rotateZ: function ( angle ) {
THREE.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
},
rotateByAxis: function ( axis, angle ) {
THREE.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
},
......
......@@ -363,7 +363,7 @@ THREE.Quaternion.prototype = {
if ( p !== undefined ) {
THREE.warn( 'THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.' );
console.warn( 'THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.' );
return this.multiplyQuaternions( q, p );
}
......@@ -392,7 +392,7 @@ THREE.Quaternion.prototype = {
multiplyVector3: function ( vector ) {
THREE.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
return vector.applyQuaternion( this );
},
......
......@@ -78,7 +78,7 @@ THREE.Vector2.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
console.warn( 'THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
return this.addVectors( v, w );
}
......@@ -112,7 +112,7 @@ THREE.Vector2.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
console.warn( 'THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
return this.subVectors( v, w );
}
......
......@@ -93,7 +93,7 @@ THREE.Vector3.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
console.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
return this.addVectors( v, w );
}
......@@ -130,7 +130,7 @@ THREE.Vector3.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
console.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
return this.subVectors( v, w );
}
......@@ -167,7 +167,7 @@ THREE.Vector3.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' );
console.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' );
return this.multiplyVectors( v, w );
}
......@@ -208,7 +208,7 @@ THREE.Vector3.prototype = {
if ( euler instanceof THREE.Euler === false ) {
THREE.error( 'THREE.Vector3: .applyEuler() now expects a Euler rotation rather than a Vector3 and order.' );
console.error( 'THREE.Vector3: .applyEuler() now expects a Euler rotation rather than a Vector3 and order.' );
}
......@@ -619,7 +619,7 @@ THREE.Vector3.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' );
console.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' );
return this.crossVectors( v, w );
}
......@@ -726,19 +726,19 @@ THREE.Vector3.prototype = {
setEulerFromRotationMatrix: function ( m, order ) {
THREE.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
},
setEulerFromQuaternion: function ( q, order ) {
THREE.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
},
getPositionFromMatrix: function ( m ) {
THREE.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
return this.setFromMatrixPosition( m );
......@@ -746,14 +746,14 @@ THREE.Vector3.prototype = {
getScaleFromMatrix: function ( m ) {
THREE.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
return this.setFromMatrixScale( m );
},
getColumnFromMatrix: function ( index, matrix ) {
THREE.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
return this.setFromMatrixColumn( index, matrix );
......
......@@ -105,7 +105,7 @@ THREE.Vector4.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
console.warn( 'THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
return this.addVectors( v, w );
}
......@@ -145,7 +145,7 @@ THREE.Vector4.prototype = {
if ( w !== undefined ) {
THREE.warn( 'THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
console.warn( 'THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
return this.subVectors( v, w );
}
......
......@@ -6,7 +6,7 @@ THREE.Line = function ( geometry, material, mode ) {
if ( mode === 1 ) {
THREE.error( 'THREE.Line: THREE.LinePieces mode has been removed. Use THREE.LineSegments instead.' );
console.error( 'THREE.Line: THREE.LinePieces mode has been removed. Use THREE.LineSegments instead.' );
}
......
......@@ -49,7 +49,7 @@ THREE.Mesh.prototype.getMorphTargetIndexByName = function ( name ) {
}
THREE.warn( 'THREE.Mesh.getMorphTargetIndexByName: morph target ' + name + ' does not exist. Returning 0.' );
console.warn( 'THREE.Mesh.getMorphTargetIndexByName: morph target ' + name + ' does not exist. Returning 0.' );
return 0;
......
......@@ -108,7 +108,7 @@ THREE.MorphAnimMesh.prototype.playAnimation = function ( label, fps ) {
} else {
THREE.warn( 'THREE.MorphAnimMesh: animation[' + label + '] undefined in .playAnimation()' );
console.warn( 'THREE.MorphAnimMesh: animation[' + label + '] undefined in .playAnimation()' );
}
......
......@@ -178,7 +178,7 @@ THREE.PointCloud.prototype.toJSON = function ( meta ) {
THREE.ParticleSystem = function ( geometry, material ) {
THREE.warn( 'THREE.ParticleSystem has been renamed to THREE.PointCloud.' );
console.warn( 'THREE.ParticleSystem has been renamed to THREE.PointCloud.' );
return new THREE.PointCloud( geometry, material );
};
......@@ -69,7 +69,7 @@ THREE.Skeleton = function ( bones, boneInverses, useVertexTexture ) {
} else {
THREE.warn( 'THREE.Skeleton bonInverses is the wrong length.' );
console.warn( 'THREE.Skeleton bonInverses is the wrong length.' );
this.boneInverses = [];
......
......@@ -148,7 +148,7 @@ THREE.SkinnedMesh.prototype.updateMatrixWorld = function( force ) {
} else {
THREE.warn( 'THREE.SkinnedMesh unreckognized bindMode: ' + this.bindMode );
console.warn( 'THREE.SkinnedMesh unreckognized bindMode: ' + this.bindMode );
}
......
......@@ -187,7 +187,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} catch ( error ) {
THREE.error( 'THREE.WebGLRenderer: ' + error );
console.error( 'THREE.WebGLRenderer: ' + error );
}
......@@ -353,12 +353,12 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( mediumpAvailable ) {
_precision = 'mediump';
THREE.warn( 'THREE.WebGLRenderer: highp not supported, using mediump.' );
console.warn( 'THREE.WebGLRenderer: highp not supported, using mediump.' );
} else {
_precision = 'lowp';
THREE.warn( 'THREE.WebGLRenderer: highp and mediump not supported, using lowp.' );
console.warn( 'THREE.WebGLRenderer: highp and mediump not supported, using lowp.' );
}
......@@ -367,7 +367,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( _precision === 'mediump' && ! mediumpAvailable ) {
_precision = 'lowp';
THREE.warn( 'THREE.WebGLRenderer: mediump not supported, using lowp.' );
console.warn( 'THREE.WebGLRenderer: mediump not supported, using lowp.' );
}
......@@ -881,7 +881,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -920,7 +920,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -944,7 +944,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -1068,7 +1068,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -1111,7 +1111,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -1135,7 +1135,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
// non-indexed triangles
var offsets = geometry.offsets;
if ( offsets.length === 0 ) {
......@@ -1156,7 +1156,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( extension === null ) {
THREE.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
console.error( 'THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );
return;
}
......@@ -1207,7 +1207,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( geometry instanceof THREE.InstancedBufferGeometry ) {
THREE.error( 'THREE.WebGLRenderer.renderMesh: cannot use drawCalls with THREE.InstancedBufferGeometry.' );
console.error( 'THREE.WebGLRenderer.renderMesh: cannot use drawCalls with THREE.InstancedBufferGeometry.' );
return;
} else {
......@@ -1521,7 +1521,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( influences.length > morphTargets.length ) {
THREE.warn( 'THREE.WebGLRenderer: Influences array is bigger than morphTargets array.' );
console.warn( 'THREE.WebGLRenderer: Influences array is bigger than morphTargets array.' );
influences.length = morphTargets.length;
}
......@@ -1667,7 +1667,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( camera instanceof THREE.Camera === false ) {
THREE.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );
console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );
return;
}
......@@ -2714,7 +2714,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( textureUnit >= _maxTextures ) {
THREE.warn( 'WebGLRenderer: trying to use ' + textureUnit + ' texture units while this GPU supports only ' + _maxTextures );
console.warn( 'WebGLRenderer: trying to use ' + textureUnit + ' texture units while this GPU supports only ' + _maxTextures );
}
......@@ -3052,7 +3052,7 @@ THREE.WebGLRenderer = function ( parameters ) {
default:
THREE.warn( 'THREE.WebGLRenderer: Unknown uniform type: ' + type );
console.warn( 'THREE.WebGLRenderer: Unknown uniform type: ' + type );
}
......@@ -3328,7 +3328,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( texture.wrapS !== THREE.ClampToEdgeWrapping || texture.wrapT !== THREE.ClampToEdgeWrapping ) {
THREE.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping. ( ' + texture.sourceFile + ' )' );
console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping. ( ' + texture.sourceFile + ' )' );
}
......@@ -3337,7 +3337,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( texture.minFilter !== THREE.NearestFilter && texture.minFilter !== THREE.LinearFilter ) {
THREE.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( ' + texture.sourceFile + ' )' );
console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( ' + texture.sourceFile + ' )' );
}
......@@ -3427,7 +3427,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
THREE.warn( "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()" );
console.warn( "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()" );
}
......@@ -3480,14 +3480,14 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( image === undefined ) {
THREE.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined', texture );
console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined', texture );
return;
}
if ( image.complete === false ) {
THREE.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete', texture );
console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete', texture );
return;
}
......@@ -3518,7 +3518,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var context = canvas.getContext( '2d' );
context.drawImage( image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height );
THREE.warn( 'THREE.WebGLRenderer: image is too big (' + image.width + 'x' + image.height + '). Resized to ' + canvas.width + 'x' + canvas.height, image );
console.warn( 'THREE.WebGLRenderer: image is too big (' + image.width + 'x' + image.height + '). Resized to ' + canvas.width + 'x' + canvas.height, image );
return canvas;
......@@ -3605,7 +3605,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
THREE.warn( "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()" );
console.warn( "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()" );
}
......@@ -3840,7 +3840,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( ! ( renderTarget instanceof THREE.WebGLRenderTarget ) ) {
THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );
return;
}
......@@ -3849,7 +3849,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( renderTarget.format !== THREE.RGBAFormat ) {
THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.' );
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.' );
return;
}
......@@ -3870,7 +3870,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
THREE.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );
}
......@@ -4040,7 +4040,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( maxBones < object.skeleton.bones.length ) {
THREE.warn( 'WebGLRenderer: too many bones - ' + object.skeleton.bones.length + ', this GPU supports just ' + maxBones + ' (try OpenGL instead of ANGLE)' );
console.warn( 'WebGLRenderer: too many bones - ' + object.skeleton.bones.length + ', this GPU supports just ' + maxBones + ' (try OpenGL instead of ANGLE)' );
}
......@@ -4099,25 +4099,25 @@ THREE.WebGLRenderer = function ( parameters ) {
this.initMaterial = function () {
THREE.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
};
this.addPrePlugin = function () {
THREE.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
};
this.addPostPlugin = function () {
THREE.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
};
this.updateShadowMap = function () {
THREE.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
};
......@@ -4127,7 +4127,7 @@ THREE.WebGLRenderer = function ( parameters ) {
return shadowMap.enabled;
},
set: function ( value ) {
THREE.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
shadowMap.enabled = value;
}
},
......@@ -4136,7 +4136,7 @@ THREE.WebGLRenderer = function ( parameters ) {
return shadowMap.type;
},
set: function ( value ) {
THREE.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
shadowMap.type = value;
}
},
......@@ -4145,7 +4145,7 @@ THREE.WebGLRenderer = function ( parameters ) {
return shadowMap.cullFace;
},
set: function ( value ) {
THREE.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
shadowMap.cullFace = value;
}
},
......@@ -4154,7 +4154,7 @@ THREE.WebGLRenderer = function ( parameters ) {
return shadowMap.debug;
},
set: function ( value ) {
THREE.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
console.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
shadowMap.debug = value;
}
},
......@@ -4163,7 +4163,7 @@ THREE.WebGLRenderer = function ( parameters ) {
return shadowMap.cascade;
},
set: function ( value ) {
THREE.warn( 'THREE.WebGLRenderer: .shadowMapCascade is now .shadowMap.cascade.' );
console.warn( 'THREE.WebGLRenderer: .shadowMapCascade is now .shadowMap.cascade.' );
shadowMap.cascade = value;
}
}
......
......@@ -37,7 +37,7 @@ THREE.WebGLExtensions = function ( gl ) {
if ( extension === null ) {
THREE.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );
console.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );
}
......
......@@ -166,7 +166,7 @@ THREE.WebGLObjects = function ( gl, info ) {
} else if ( data.updateRange.count === 0 ) {
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.' );
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.' );
} else {
......
......@@ -49,15 +49,15 @@ THREE.WebGLProgram = ( function () {
return attributes;
}
function programArrayToString ( previousValue, currentValue, index, array ) {
if ( currentValue !== '' && currentValue !== undefined && currentValue !== null ) {
return previousValue + currentValue + '\n';
}
return previousValue;
}
......@@ -147,7 +147,7 @@ THREE.WebGLProgram = ( function () {
var gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0;
// THREE.log( 'building new program ' );
// console.log( 'building new program ' );
//
......@@ -357,13 +357,13 @@ THREE.WebGLProgram = ( function () {
if ( gl.getProgramParameter( program, gl.LINK_STATUS ) === false ) {
THREE.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), 'gl.VALIDATE_STATUS', gl.getProgramParameter( program, gl.VALIDATE_STATUS ), 'gl.getProgramInfoLog', programLogInfo, vertexErrorLogInfo, fragmentErrorLogInfo );
console.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), 'gl.VALIDATE_STATUS', gl.getProgramParameter( program, gl.VALIDATE_STATUS ), 'gl.getProgramInfoLog', programLogInfo, vertexErrorLogInfo, fragmentErrorLogInfo );
}
if ( programLogInfo !== '' ) {
THREE.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLogInfo );
console.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLogInfo );
}
......
......@@ -23,18 +23,18 @@ THREE.WebGLShader = ( function () {
if ( gl.getShaderParameter( shader, gl.COMPILE_STATUS ) === false ) {
THREE.error( 'THREE.WebGLShader: Shader couldn\'t compile.' );
console.error( 'THREE.WebGLShader: Shader couldn\'t compile.' );
}
if ( gl.getShaderInfoLog( shader ) !== '' ) {
THREE.warn( 'THREE.WebGLShader: gl.getShaderInfoLog()', type === gl.VERTEX_SHADER ? 'vertex' : 'fragment', gl.getShaderInfoLog( shader ), addLineNumbers( string ) );
console.warn( 'THREE.WebGLShader: gl.getShaderInfoLog()', type === gl.VERTEX_SHADER ? 'vertex' : 'fragment', gl.getShaderInfoLog( shader ), addLineNumbers( string ) );
}
// --enable-privileged-webgl-extension
// THREE.log( type, gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );
// console.log( type, gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );
return shader;
......
......@@ -132,7 +132,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
light.shadowCascadeArray[ n ] = virtualLight;
//THREE.log( "Created virtualLight", virtualLight );
//console.log( "Created virtualLight", virtualLight );
} else {
......@@ -193,7 +193,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
} else {
THREE.error( "THREE.ShadowMapPlugin: Unsupported light type for shadow", light );
console.error( "THREE.ShadowMapPlugin: Unsupported light type for shadow", light );
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册