瀏覽代碼

Merge branch 'dev' of https://github.com/mrdoob/three.js into dev

Mr.doob 9 年之前
父節點
當前提交
6877c689be

+ 1 - 1
src/audio/AudioContext.js

@@ -8,7 +8,7 @@ Object.defineProperty( THREE, 'AudioContext', {
 
 
 		var context;
 		var context;
 
 
-		return function () {
+		return function get() {
 
 
 			if ( context === undefined ) {
 			if ( context === undefined ) {
 
 

+ 2 - 2
src/cameras/Camera.js

@@ -22,7 +22,7 @@ THREE.Camera.prototype.getWorldDirection = function () {
 
 
 	var quaternion = new THREE.Quaternion();
 	var quaternion = new THREE.Quaternion();
 
 
-	return function ( optionalTarget ) {
+	return function getWorldDirection( optionalTarget ) {
 
 
 		var result = optionalTarget || new THREE.Vector3();
 		var result = optionalTarget || new THREE.Vector3();
 
 
@@ -40,7 +40,7 @@ THREE.Camera.prototype.lookAt = function () {
 
 
 	var m1 = new THREE.Matrix4();
 	var m1 = new THREE.Matrix4();
 
 
-	return function ( vector ) {
+	return function lookAt( vector ) {
 
 
 		m1.lookAt( this.position, vector, this.up );
 		m1.lookAt( this.position, vector, this.up );
 
 

+ 1 - 1
src/cameras/StereoCamera.js

@@ -27,7 +27,7 @@ Object.assign( THREE.StereoCamera.prototype, {
 		var eyeRight = new THREE.Matrix4();
 		var eyeRight = new THREE.Matrix4();
 		var eyeLeft = new THREE.Matrix4();
 		var eyeLeft = new THREE.Matrix4();
 
 
-		return function update ( camera ) {
+		return function update( camera ) {
 
 
 			var needsUpdate = focus !== camera.focus || fov !== camera.fov ||
 			var needsUpdate = focus !== camera.focus || fov !== camera.fov ||
 												aspect !== camera.aspect * this.aspect || near !== camera.near ||
 												aspect !== camera.aspect * this.aspect || near !== camera.near ||

+ 14 - 14
src/core/Object3D.js

@@ -134,7 +134,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var q1 = new THREE.Quaternion();
 		var q1 = new THREE.Quaternion();
 
 
-		return function ( axis, angle ) {
+		return function rotateOnAxis( axis, angle ) {
 
 
 			q1.setFromAxisAngle( axis, angle );
 			q1.setFromAxisAngle( axis, angle );
 
 
@@ -150,7 +150,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 1, 0, 0 );
 		var v1 = new THREE.Vector3( 1, 0, 0 );
 
 
-		return function ( angle ) {
+		return function rotateX( angle ) {
 
 
 			return this.rotateOnAxis( v1, angle );
 			return this.rotateOnAxis( v1, angle );
 
 
@@ -162,7 +162,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 0, 1, 0 );
 		var v1 = new THREE.Vector3( 0, 1, 0 );
 
 
-		return function ( angle ) {
+		return function rotateY( angle ) {
 
 
 			return this.rotateOnAxis( v1, angle );
 			return this.rotateOnAxis( v1, angle );
 
 
@@ -174,7 +174,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 0, 0, 1 );
 		var v1 = new THREE.Vector3( 0, 0, 1 );
 
 
-		return function ( angle ) {
+		return function rotateZ( angle ) {
 
 
 			return this.rotateOnAxis( v1, angle );
 			return this.rotateOnAxis( v1, angle );
 
 
@@ -189,7 +189,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( axis, distance ) {
+		return function translateOnAxis( axis, distance ) {
 
 
 			v1.copy( axis ).applyQuaternion( this.quaternion );
 			v1.copy( axis ).applyQuaternion( this.quaternion );
 
 
@@ -205,7 +205,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 1, 0, 0 );
 		var v1 = new THREE.Vector3( 1, 0, 0 );
 
 
-		return function ( distance ) {
+		return function translateX( distance ) {
 
 
 			return this.translateOnAxis( v1, distance );
 			return this.translateOnAxis( v1, distance );
 
 
@@ -217,7 +217,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 0, 1, 0 );
 		var v1 = new THREE.Vector3( 0, 1, 0 );
 
 
-		return function ( distance ) {
+		return function translateY( distance ) {
 
 
 			return this.translateOnAxis( v1, distance );
 			return this.translateOnAxis( v1, distance );
 
 
@@ -229,7 +229,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var v1 = new THREE.Vector3( 0, 0, 1 );
 		var v1 = new THREE.Vector3( 0, 0, 1 );
 
 
-		return function ( distance ) {
+		return function translateZ( distance ) {
 
 
 			return this.translateOnAxis( v1, distance );
 			return this.translateOnAxis( v1, distance );
 
 
@@ -247,7 +247,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var m1 = new THREE.Matrix4();
 		var m1 = new THREE.Matrix4();
 
 
-		return function ( vector ) {
+		return function worldToLocal( vector ) {
 
 
 			return vector.applyMatrix4( m1.getInverse( this.matrixWorld ) );
 			return vector.applyMatrix4( m1.getInverse( this.matrixWorld ) );
 
 
@@ -261,7 +261,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var m1 = new THREE.Matrix4();
 		var m1 = new THREE.Matrix4();
 
 
-		return function ( vector ) {
+		return function lookAt( vector ) {
 
 
 			m1.lookAt( vector, this.position, this.up );
 			m1.lookAt( vector, this.position, this.up );
 
 
@@ -389,7 +389,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 		var position = new THREE.Vector3();
 		var position = new THREE.Vector3();
 		var scale = new THREE.Vector3();
 		var scale = new THREE.Vector3();
 
 
-		return function ( optionalTarget ) {
+		return function getWorldQuaternion( optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Quaternion();
 			var result = optionalTarget || new THREE.Quaternion();
 
 
@@ -407,7 +407,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var quaternion = new THREE.Quaternion();
 		var quaternion = new THREE.Quaternion();
 
 
-		return function ( optionalTarget ) {
+		return function getWorldRotation( optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Euler();
 			var result = optionalTarget || new THREE.Euler();
 
 
@@ -424,7 +424,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 		var position = new THREE.Vector3();
 		var position = new THREE.Vector3();
 		var quaternion = new THREE.Quaternion();
 		var quaternion = new THREE.Quaternion();
 
 
-		return function ( optionalTarget ) {
+		return function getWorldScale( optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Vector3();
 			var result = optionalTarget || new THREE.Vector3();
 
 
@@ -442,7 +442,7 @@ Object.assign( THREE.Object3D.prototype, THREE.EventDispatcher.prototype, {
 
 
 		var quaternion = new THREE.Quaternion();
 		var quaternion = new THREE.Quaternion();
 
 
-		return function ( optionalTarget ) {
+		return function getWorldDirection( optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Vector3();
 			var result = optionalTarget || new THREE.Vector3();
 
 

+ 3 - 3
src/extras/ShapeUtils.js

@@ -91,7 +91,7 @@ THREE.ShapeUtils = {
 
 
 		// takes in an contour array and returns
 		// takes in an contour array and returns
 
 
-		return function ( contour, indices ) {
+		return function triangulate( contour, indices ) {
 
 
 			var n = contour.length;
 			var n = contour.length;
 
 
@@ -700,7 +700,7 @@ THREE.ShapeUtils = {
 
 
 		}
 		}
 
 
-		return function ( t, p0, p1, p2 ) {
+		return function b2( t, p0, p1, p2 ) {
 
 
 			return b2p0( t, p0 ) + b2p1( t, p1 ) + b2p2( t, p2 );
 			return b2p0( t, p0 ) + b2p1( t, p1 ) + b2p2( t, p2 );
 
 
@@ -739,7 +739,7 @@ THREE.ShapeUtils = {
 
 
 		}
 		}
 
 
-		return function ( t, p0, p1, p2, p3 ) {
+		return function b3( t, p0, p1, p2, p3 ) {
 
 
 			return b3p0( t, p0 ) + b3p1( t, p1 ) + b3p2( t, p2 ) + b3p3( t, p3 );
 			return b3p0( t, p0 ) + b3p1( t, p1 ) + b3p2( t, p2 ) + b3p3( t, p3 );
 
 

+ 1 - 1
src/extras/helpers/BoxHelper.js

@@ -28,7 +28,7 @@ THREE.BoxHelper.prototype.update = ( function () {
 
 
 	var box = new THREE.Box3();
 	var box = new THREE.Box3();
 
 
-	return function ( object ) {
+	return function update( object ) {
 
 
 		if ( object instanceof THREE.Box3 ) {
 		if ( object instanceof THREE.Box3 ) {
 
 

+ 1 - 1
src/extras/helpers/CameraHelper.js

@@ -133,7 +133,7 @@ THREE.CameraHelper.prototype.update = function () {
 
 
 	}
 	}
 
 
-	return function () {
+	return function update() {
 
 
 		geometry = this.geometry;
 		geometry = this.geometry;
 		pointMap = this.pointMap;
 		pointMap = this.pointMap;

+ 1 - 1
src/extras/helpers/DirectionalLightHelper.js

@@ -59,7 +59,7 @@ THREE.DirectionalLightHelper.prototype.update = function () {
 	var v2 = new THREE.Vector3();
 	var v2 = new THREE.Vector3();
 	var v3 = new THREE.Vector3();
 	var v3 = new THREE.Vector3();
 
 
-	return function () {
+	return function update() {
 
 
 		v1.setFromMatrixPosition( this.light.matrixWorld );
 		v1.setFromMatrixPosition( this.light.matrixWorld );
 		v2.setFromMatrixPosition( this.light.target.matrixWorld );
 		v2.setFromMatrixPosition( this.light.target.matrixWorld );

+ 1 - 1
src/extras/helpers/HemisphereLightHelper.js

@@ -47,7 +47,7 @@ THREE.HemisphereLightHelper.prototype.update = function () {
 
 
 	var vector = new THREE.Vector3();
 	var vector = new THREE.Vector3();
 
 
-	return function () {
+	return function update() {
 
 
 		this.colors[ 0 ].copy( this.light.color ).multiplyScalar( this.light.intensity );
 		this.colors[ 0 ].copy( this.light.color ).multiplyScalar( this.light.intensity );
 		this.colors[ 1 ].copy( this.light.groundColor ).multiplyScalar( this.light.intensity );
 		this.colors[ 1 ].copy( this.light.groundColor ).multiplyScalar( this.light.intensity );

+ 1 - 1
src/extras/helpers/SpotLightHelper.js

@@ -62,7 +62,7 @@ THREE.SpotLightHelper.prototype.update = function () {
 	var vector = new THREE.Vector3();
 	var vector = new THREE.Vector3();
 	var vector2 = new THREE.Vector3();
 	var vector2 = new THREE.Vector3();
 
 
-	return function () {
+	return function update() {
 
 
 		var coneLength = this.light.distance ? this.light.distance : 1000;
 		var coneLength = this.light.distance ? this.light.distance : 1000;
 		var coneWidth = coneLength * Math.tan( this.light.angle );
 		var coneWidth = coneLength * Math.tan( this.light.angle );

+ 1 - 1
src/loaders/Loader.js

@@ -46,7 +46,7 @@ THREE.Loader.prototype = {
 
 
 		var color, textureLoader, materialLoader;
 		var color, textureLoader, materialLoader;
 
 
-		return function ( m, texturePath, crossOrigin ) {
+		return function createMaterial( m, texturePath, crossOrigin ) {
 
 
 			if ( color === undefined ) color = new THREE.Color();
 			if ( color === undefined ) color = new THREE.Color();
 			if ( textureLoader === undefined ) textureLoader = new THREE.TextureLoader();
 			if ( textureLoader === undefined ) textureLoader = new THREE.TextureLoader();

+ 1 - 1
src/loaders/ObjectLoader.js

@@ -415,7 +415,7 @@ Object.assign( THREE.ObjectLoader.prototype, {
 
 
 		var matrix = new THREE.Matrix4();
 		var matrix = new THREE.Matrix4();
 
 
-		return function ( data, geometries, materials ) {
+		return function parseObject( data, geometries, materials ) {
 
 
 			var object;
 			var object;
 
 

+ 2 - 2
src/math/Box2.js

@@ -40,7 +40,7 @@ THREE.Box2.prototype = {
 
 
 		var v1 = new THREE.Vector2();
 		var v1 = new THREE.Vector2();
 
 
-		return function ( center, size ) {
+		return function setFromCenterAndSize( center, size ) {
 
 
 			var halfSize = v1.copy( size ).multiplyScalar( 0.5 );
 			var halfSize = v1.copy( size ).multiplyScalar( 0.5 );
 			this.min.copy( center ).sub( halfSize );
 			this.min.copy( center ).sub( halfSize );
@@ -191,7 +191,7 @@ THREE.Box2.prototype = {
 
 
 		var v1 = new THREE.Vector2();
 		var v1 = new THREE.Vector2();
 
 
-		return function ( point ) {
+		return function distanceToPoint( point ) {
 
 
 			var clampedPoint = v1.copy( point ).clamp( this.min, this.max );
 			var clampedPoint = v1.copy( point ).clamp( this.min, this.max );
 			return clampedPoint.sub( point ).length();
 			return clampedPoint.sub( point ).length();

+ 5 - 5
src/math/Box3.js

@@ -72,7 +72,7 @@ THREE.Box3.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( center, size ) {
+		return function setFromCenterAndSize( center, size ) {
 
 
 			var halfSize = v1.copy( size ).multiplyScalar( 0.5 );
 			var halfSize = v1.copy( size ).multiplyScalar( 0.5 );
 
 
@@ -92,7 +92,7 @@ THREE.Box3.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( object ) {
+		return function setFromObject( object ) {
 
 
 			var scope = this;
 			var scope = this;
 
 
@@ -352,7 +352,7 @@ THREE.Box3.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( point ) {
+		return function distanceToPoint( point ) {
 
 
 			var clampedPoint = v1.copy( point ).clamp( this.min, this.max );
 			var clampedPoint = v1.copy( point ).clamp( this.min, this.max );
 			return clampedPoint.sub( point ).length();
 			return clampedPoint.sub( point ).length();
@@ -365,7 +365,7 @@ THREE.Box3.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( optionalTarget ) {
+		return function getBoundingSphere( optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Sphere();
 			var result = optionalTarget || new THREE.Sphere();
 
 
@@ -412,7 +412,7 @@ THREE.Box3.prototype = {
 			new THREE.Vector3()
 			new THREE.Vector3()
 		];
 		];
 
 
-		return function ( matrix ) {
+		return function applyMatrix4( matrix ) {
 
 
 			// transform of empty box is an empty box.
 			// transform of empty box is an empty box.
 			if( this.isEmpty() ) return this;
 			if( this.isEmpty() ) return this;

+ 1 - 1
src/math/Color.js

@@ -84,7 +84,7 @@ THREE.Color.prototype = {
 
 
 		}
 		}
 
 
-		return function ( h, s, l ) {
+		return function setHSL( h, s, l ) {
 
 
 			// h,s,l ranges are in 0.0 - 1.0
 			// h,s,l ranges are in 0.0 - 1.0
 			h = THREE.Math.euclideanModulo( h, 1 );
 			h = THREE.Math.euclideanModulo( h, 1 );

+ 2 - 2
src/math/Euler.js

@@ -232,7 +232,7 @@ THREE.Euler.prototype = {
 
 
 		var matrix;
 		var matrix;
 
 
-		return function ( q, order, update ) {
+		return function setFromQuaternion( q, order, update ) {
 
 
 			if ( matrix === undefined ) matrix = new THREE.Matrix4();
 			if ( matrix === undefined ) matrix = new THREE.Matrix4();
 
 
@@ -256,7 +256,7 @@ THREE.Euler.prototype = {
 
 
 		var q = new THREE.Quaternion();
 		var q = new THREE.Quaternion();
 
 
-		return function ( newOrder ) {
+		return function reorder( newOrder ) {
 
 
 			q.setFromEuler( this );
 			q.setFromEuler( this );
 			
 			

+ 3 - 3
src/math/Frustum.js

@@ -82,7 +82,7 @@ THREE.Frustum.prototype = {
 
 
 		var sphere = new THREE.Sphere();
 		var sphere = new THREE.Sphere();
 
 
-		return function ( object ) {
+		return function intersectsObject( object ) {
 
 
 			var geometry = object.geometry;
 			var geometry = object.geometry;
 
 
@@ -102,7 +102,7 @@ THREE.Frustum.prototype = {
 
 
 		var sphere = new THREE.Sphere();
 		var sphere = new THREE.Sphere();
 
 
-		return function ( sprite ) {
+		return function intersectsSprite( sprite ) {
 
 
 			sphere.center.set( 0, 0, 0 );
 			sphere.center.set( 0, 0, 0 );
 			sphere.radius = 0.7071067811865476;
 			sphere.radius = 0.7071067811865476;
@@ -141,7 +141,7 @@ THREE.Frustum.prototype = {
 		var p1 = new THREE.Vector3(),
 		var p1 = new THREE.Vector3(),
 			p2 = new THREE.Vector3();
 			p2 = new THREE.Vector3();
 
 
-		return function ( box ) {
+		return function intersectsBox( box ) {
 
 
 			var planes = this.planes;
 			var planes = this.planes;
 
 

+ 1 - 1
src/math/Line3.js

@@ -76,7 +76,7 @@ THREE.Line3.prototype = {
 		var startP = new THREE.Vector3();
 		var startP = new THREE.Vector3();
 		var startEnd = new THREE.Vector3();
 		var startEnd = new THREE.Vector3();
 
 
-		return function ( point, clampToLine ) {
+		return function closestPointToPointParameter( point, clampToLine ) {
 
 
 			startP.subVectors( point, this.start );
 			startP.subVectors( point, this.start );
 			startEnd.subVectors( this.end, this.start );
 			startEnd.subVectors( this.end, this.start );

+ 1 - 1
src/math/Math.js

@@ -16,7 +16,7 @@ THREE.Math = {
 		var uuid = new Array( 36 );
 		var uuid = new Array( 36 );
 		var rnd = 0, r;
 		var rnd = 0, r;
 
 
-		return function () {
+		return function generateUUID() {
 
 
 			for ( var i = 0; i < 36; i ++ ) {
 			for ( var i = 0; i < 36; i ++ ) {
 
 

+ 1 - 1
src/math/Matrix3.js

@@ -95,7 +95,7 @@ THREE.Matrix3.prototype = {
 
 
 		var v1;
 		var v1;
 
 
-		return function ( array, offset, length ) {
+		return function applyToVector3Array( array, offset, length ) {
 
 
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( offset === undefined ) offset = 0;
 			if ( offset === undefined ) offset = 0;

+ 5 - 5
src/math/Matrix4.js

@@ -116,7 +116,7 @@ THREE.Matrix4.prototype = {
 
 
 		var v1;
 		var v1;
 
 
-		return function ( m ) {
+		return function extractRotation( m ) {
 
 
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 
 
@@ -314,7 +314,7 @@ THREE.Matrix4.prototype = {
 
 
 		var x, y, z;
 		var x, y, z;
 
 
-		return function ( eye, target, up ) {
+		return function lookAt( eye, target, up ) {
 
 
 			if ( x === undefined ) {
 			if ( x === undefined ) {
 
 
@@ -447,7 +447,7 @@ THREE.Matrix4.prototype = {
 
 
 		var v1;
 		var v1;
 
 
-		return function ( array, offset, length ) {
+		return function applyToVector3Array( array, offset, length ) {
 
 
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( offset === undefined ) offset = 0;
 			if ( offset === undefined ) offset = 0;
@@ -575,7 +575,7 @@ THREE.Matrix4.prototype = {
 
 
 		var v1;
 		var v1;
 
 
-		return function () {
+		return function getPosition() {
 
 
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			console.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.' );
@@ -804,7 +804,7 @@ THREE.Matrix4.prototype = {
 
 
 		var vector, matrix;
 		var vector, matrix;
 
 
-		return function ( position, quaternion, scale ) {
+		return function decompose( position, quaternion, scale ) {
 
 
 			if ( vector === undefined ) {
 			if ( vector === undefined ) {
 
 

+ 3 - 3
src/math/Plane.js

@@ -45,7 +45,7 @@ THREE.Plane.prototype = {
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 		var v2 = new THREE.Vector3();
 		var v2 = new THREE.Vector3();
 
 
-		return function ( a, b, c ) {
+		return function setFromCoplanarPoints( a, b, c ) {
 
 
 			var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize();
 			var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize();
 
 
@@ -126,7 +126,7 @@ THREE.Plane.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( line, optionalTarget ) {
+		return function intersectLine( line, optionalTarget ) {
 
 
 			var result = optionalTarget || new THREE.Vector3();
 			var result = optionalTarget || new THREE.Vector3();
 
 
@@ -197,7 +197,7 @@ THREE.Plane.prototype = {
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 		var m1 = new THREE.Matrix3();
 		var m1 = new THREE.Matrix3();
 
 
-		return function ( matrix, optionalNormalMatrix ) {
+		return function applyMatrix4( matrix, optionalNormalMatrix ) {
 
 
 			var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix );
 			var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix );
 
 

+ 1 - 1
src/math/Quaternion.js

@@ -261,7 +261,7 @@ THREE.Quaternion.prototype = {
 
 
 		var EPS = 0.000001;
 		var EPS = 0.000001;
 
 
-		return function ( vFrom, vTo ) {
+		return function setFromUnitVectors( vFrom, vTo ) {
 
 
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 			if ( v1 === undefined ) v1 = new THREE.Vector3();
 
 

+ 6 - 6
src/math/Ray.js

@@ -57,7 +57,7 @@ THREE.Ray.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( t ) {
+		return function recast( t ) {
 
 
 			this.origin.copy( this.at( t, v1 ) );
 			this.origin.copy( this.at( t, v1 ) );
 
 
@@ -93,7 +93,7 @@ THREE.Ray.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( point ) {
+		return function distanceSqToPoint( point ) {
 
 
 			var directionDistance = v1.subVectors( point, this.origin ).dot( this.direction );
 			var directionDistance = v1.subVectors( point, this.origin ).dot( this.direction );
 
 
@@ -119,7 +119,7 @@ THREE.Ray.prototype = {
 		var segDir = new THREE.Vector3();
 		var segDir = new THREE.Vector3();
 		var diff = new THREE.Vector3();
 		var diff = new THREE.Vector3();
 
 
-		return function ( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {
+		return function distanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {
 
 
 			// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h
 			// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h
 			// It returns the min distance between the ray and the segment
 			// It returns the min distance between the ray and the segment
@@ -244,7 +244,7 @@ THREE.Ray.prototype = {
 
 
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function ( sphere, optionalTarget ) {
+		return function intersectSphere( sphere, optionalTarget ) {
 
 
 			v1.subVectors( sphere.center, this.origin );
 			v1.subVectors( sphere.center, this.origin );
 			var tca = v1.dot( this.direction );
 			var tca = v1.dot( this.direction );
@@ -424,7 +424,7 @@ THREE.Ray.prototype = {
 
 
 		var v = new THREE.Vector3();
 		var v = new THREE.Vector3();
 
 
-		return function ( box ) {
+		return function intersectsBox( box ) {
 
 
 			return this.intersectBox( box, v ) !== null;
 			return this.intersectBox( box, v ) !== null;
 
 
@@ -440,7 +440,7 @@ THREE.Ray.prototype = {
 		var edge2 = new THREE.Vector3();
 		var edge2 = new THREE.Vector3();
 		var normal = new THREE.Vector3();
 		var normal = new THREE.Vector3();
 
 
-		return function ( a, b, c, backfaceCulling, optionalTarget ) {
+		return function intersectTriangle( a, b, c, backfaceCulling, optionalTarget ) {
 
 
 			// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h
 			// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h
 
 

+ 1 - 1
src/math/Sphere.js

@@ -27,7 +27,7 @@ THREE.Sphere.prototype = {
 
 
 		var box = new THREE.Box3();
 		var box = new THREE.Box3();
 
 
-		return function ( points, optionalCenter ) {
+		return function setFromPoints( points, optionalCenter ) {
 
 
 			var center = this.center;
 			var center = this.center;
 
 

+ 4 - 4
src/math/Triangle.js

@@ -15,7 +15,7 @@ THREE.Triangle.normal = function () {
 
 
 	var v0 = new THREE.Vector3();
 	var v0 = new THREE.Vector3();
 
 
-	return function ( a, b, c, optionalTarget ) {
+	return function normal( a, b, c, optionalTarget ) {
 
 
 		var result = optionalTarget || new THREE.Vector3();
 		var result = optionalTarget || new THREE.Vector3();
 
 
@@ -44,7 +44,7 @@ THREE.Triangle.barycoordFromPoint = function () {
 	var v1 = new THREE.Vector3();
 	var v1 = new THREE.Vector3();
 	var v2 = new THREE.Vector3();
 	var v2 = new THREE.Vector3();
 
 
-	return function ( point, a, b, c, optionalTarget ) {
+	return function barycoordFromPoint( point, a, b, c, optionalTarget ) {
 
 
 		v0.subVectors( c, a );
 		v0.subVectors( c, a );
 		v1.subVectors( b, a );
 		v1.subVectors( b, a );
@@ -84,7 +84,7 @@ THREE.Triangle.containsPoint = function () {
 
 
 	var v1 = new THREE.Vector3();
 	var v1 = new THREE.Vector3();
 
 
-	return function ( point, a, b, c ) {
+	return function containsPoint( point, a, b, c ) {
 
 
 		var result = THREE.Triangle.barycoordFromPoint( point, a, b, c, v1 );
 		var result = THREE.Triangle.barycoordFromPoint( point, a, b, c, v1 );
 
 
@@ -139,7 +139,7 @@ THREE.Triangle.prototype = {
 		var v0 = new THREE.Vector3();
 		var v0 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 		var v1 = new THREE.Vector3();
 
 
-		return function () {
+		return function area() {
 
 
 			v0.subVectors( this.c, this.b );
 			v0.subVectors( this.c, this.b );
 			v1.subVectors( this.a, this.b );
 			v1.subVectors( this.a, this.b );

+ 3 - 3
src/renderers/WebGLRenderer.js

@@ -2384,7 +2384,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		var warned = false;
 		var warned = false;
 
 
 		// backwards compatibility: peel texture.texture
 		// backwards compatibility: peel texture.texture
-		return function( texture, slot ) {
+		return function setTexture2D( texture, slot ) {
 
 
 			if ( texture instanceof THREE.WebGLRenderTarget ) {
 			if ( texture instanceof THREE.WebGLRenderTarget ) {
 
 
@@ -2409,7 +2409,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		var warned = false;
 		var warned = false;
 
 
-		return function( texture, slot ) {
+		return function setTexture( texture, slot ) {
 
 
 			if ( ! warned ) {
 			if ( ! warned ) {
 
 
@@ -2428,7 +2428,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		var warned = false;
 		var warned = false;
 
 
-		return function( texture, slot ) {
+		return function setTextureCube( texture, slot ) {
 
 
 			// backwards compatibility: peel texture.texture
 			// backwards compatibility: peel texture.texture
 			if ( texture instanceof THREE.WebGLRenderTargetCube ) {
 			if ( texture instanceof THREE.WebGLRenderTargetCube ) {