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

Updated builds.

上级 a217c116
......@@ -4,7 +4,7 @@
* @author mrdoob / http://mrdoob.com/
*/
var THREE = { REVISION: '76' };
var THREE = { REVISION: '77dev' };
//
......@@ -1136,9 +1136,7 @@ THREE.Quaternion.prototype = {
this._z = v1.z;
this._w = r;
this.normalize();
return this;
return this.normalize();
};
......@@ -1146,9 +1144,7 @@ THREE.Quaternion.prototype = {
inverse: function () {
this.conjugate().normalize();
return this;
return this.conjugate().normalize();
},
......@@ -1719,9 +1715,7 @@ THREE.Vector2.prototype = {
var length = this.length();
this.multiplyScalar( Math.max( min, Math.min( max, length ) ) / length );
return this;
return this.multiplyScalar( Math.max( min, Math.min( max, length ) ) / length );
},
......@@ -1842,9 +1836,7 @@ THREE.Vector2.prototype = {
lerpVectors: function ( v1, v2, alpha ) {
this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
return this;
return this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
},
......@@ -2160,9 +2152,7 @@ THREE.Vector3.prototype = {
if ( quaternion === undefined ) quaternion = new THREE.Quaternion();
this.applyQuaternion( quaternion.setFromEuler( euler ) );
return this;
return this.applyQuaternion( quaternion.setFromEuler( euler ) );
};
......@@ -2176,9 +2166,7 @@ THREE.Vector3.prototype = {
if ( quaternion === undefined ) quaternion = new THREE.Quaternion();
this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
return this;
return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
};
......@@ -2186,10 +2174,7 @@ THREE.Vector3.prototype = {
applyMatrix3: function ( m ) {
var x = this.x;
var y = this.y;
var z = this.z;
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;
......@@ -2205,7 +2190,6 @@ THREE.Vector3.prototype = {
// input: THREE.Matrix4 affine matrix
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ];
......@@ -2221,7 +2205,6 @@ THREE.Vector3.prototype = {
// input: THREE.Matrix4 projection matrix
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
var d = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] ); // perspective divide
......@@ -2235,14 +2218,8 @@ THREE.Vector3.prototype = {
applyQuaternion: function ( q ) {
var x = this.x;
var y = this.y;
var z = this.z;
var qx = q.x;
var qy = q.y;
var qz = q.z;
var qw = q.w;
var x = this.x, y = this.y, z = this.z;
var qx = q.x, qy = q.y, qz = q.z, qw = q.w;
// calculate quat * vector
......@@ -2297,16 +2274,13 @@ THREE.Vector3.prototype = {
// vector interpreted as a direction
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;
this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;
this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;
this.normalize();
return this;
return this.normalize();
},
......@@ -2384,9 +2358,7 @@ THREE.Vector3.prototype = {
var length = this.length();
this.multiplyScalar( Math.max( min, Math.min( max, length ) ) / length );
return this;
return this.multiplyScalar( Math.max( min, Math.min( max, length ) ) / length );
},
......@@ -2488,9 +2460,7 @@ THREE.Vector3.prototype = {
lerpVectors: function ( v1, v2, alpha ) {
this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
return this;
return this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
},
......@@ -2595,9 +2565,7 @@ THREE.Vector3.prototype = {
distanceToSquared: function ( v ) {
var dx = this.x - v.x;
var dy = this.y - v.y;
var dz = this.z - v.z;
var dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;
return dx * dx + dy * dy + dz * dz;
......@@ -2934,11 +2902,7 @@ THREE.Vector4.prototype = {
applyMatrix4: function ( m ) {
var x = this.x;
var y = this.y;
var z = this.z;
var w = this.w;
var x = this.x, y = this.y, z = this.z, w = this.w;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w;
......@@ -3275,9 +3239,7 @@ THREE.Vector4.prototype = {
lerpVectors: function ( v1, v2, alpha ) {
this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
return this;
return this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
},
......@@ -3570,10 +3532,10 @@ THREE.Euler.prototype = {
return function ( q, order, update ) {
if ( matrix === undefined ) matrix = new THREE.Matrix4();
matrix.makeRotationFromQuaternion( q );
this.setFromRotationMatrix( matrix, order, update );
return this;
return this.setFromRotationMatrix( matrix, order, update );
};
......@@ -3594,7 +3556,8 @@ THREE.Euler.prototype = {
return function ( newOrder ) {
q.setFromEuler( this );
this.setFromQuaternion( q, newOrder );
return this.setFromQuaternion( q, newOrder );
};
......@@ -5803,6 +5766,8 @@ THREE.Ray.prototype = {
this.direction.copy( v ).sub( this.origin ).normalize();
return this;
},
recast: function () {
......@@ -6913,6 +6878,8 @@ THREE.Spherical.prototype = {
this.phi = phi;
this.theta = theta;
return this;
},
clone: function () {
......@@ -6937,6 +6904,8 @@ THREE.Spherical.prototype = {
var EPS = 0.000001;
this.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );
return this;
},
setFromVector3: function( vec3 ) {
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册