|
@@ -44,6 +44,8 @@ THREE.Vector3.prototype = {
|
|
this.y += v.y;
|
|
this.y += v.y;
|
|
this.z += v.z;
|
|
this.z += v.z;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
addScalar: function ( s ) {
|
|
addScalar: function ( s ) {
|
|
@@ -52,6 +54,8 @@ THREE.Vector3.prototype = {
|
|
this.y += s;
|
|
this.y += s;
|
|
this.z += s;
|
|
this.z += s;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
sub: function( v1, v2 ) {
|
|
sub: function( v1, v2 ) {
|
|
@@ -68,6 +72,8 @@ THREE.Vector3.prototype = {
|
|
this.y -= v.y;
|
|
this.y -= v.y;
|
|
this.z -= v.z;
|
|
this.z -= v.z;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
cross: function ( v1, v2 ) {
|
|
cross: function ( v1, v2 ) {
|
|
@@ -86,6 +92,8 @@ THREE.Vector3.prototype = {
|
|
this.y = tz * v.x - tx * v.z;
|
|
this.y = tz * v.x - tx * v.z;
|
|
this.z = tx * v.y - ty * v.x;
|
|
this.z = tx * v.y - ty * v.x;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
multiplySelf: function ( v ) {
|
|
multiplySelf: function ( v ) {
|
|
@@ -94,6 +102,8 @@ THREE.Vector3.prototype = {
|
|
this.y *= v.y;
|
|
this.y *= v.y;
|
|
this.z *= v.z;
|
|
this.z *= v.z;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
multiplyScalar: function ( s ) {
|
|
multiplyScalar: function ( s ) {
|
|
@@ -102,6 +112,8 @@ THREE.Vector3.prototype = {
|
|
this.y *= s;
|
|
this.y *= s;
|
|
this.z *= s;
|
|
this.z *= s;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
divideScalar: function ( s ) {
|
|
divideScalar: function ( s ) {
|
|
@@ -110,6 +122,8 @@ THREE.Vector3.prototype = {
|
|
this.y /= s;
|
|
this.y /= s;
|
|
this.z /= s;
|
|
this.z /= s;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
dot: function ( v ) {
|
|
dot: function ( v ) {
|
|
@@ -149,6 +163,8 @@ THREE.Vector3.prototype = {
|
|
this.y = - this.y;
|
|
this.y = - this.y;
|
|
this.z = - this.z;
|
|
this.z = - this.z;
|
|
|
|
|
|
|
|
+ return this;
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
normalize: function () {
|
|
normalize: function () {
|