|
@@ -62,33 +62,33 @@ THREE.Vector4.prototype = {
|
|
|
|
|
|
},
|
|
|
|
|
|
- setComponent: function ( index, value ) {
|
|
|
+ setComponent: function ( index, value ) {
|
|
|
|
|
|
- switch( index ) {
|
|
|
+ switch ( index ) {
|
|
|
|
|
|
- case 0: this.x = value; break;
|
|
|
- case 1: this.y = value; break;
|
|
|
- case 2: this.z = value; break;
|
|
|
- case 3: this.w = value; break;
|
|
|
- default: throw new Error( "index is out of range: " + index );
|
|
|
+ case 0: this.x = value; break;
|
|
|
+ case 1: this.y = value; break;
|
|
|
+ case 2: this.z = value; break;
|
|
|
+ case 3: this.w = value; break;
|
|
|
+ default: throw new Error( "index is out of range: " + index );
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
- getComponent: function ( index ) {
|
|
|
+ getComponent: function ( index ) {
|
|
|
|
|
|
- switch( index ) {
|
|
|
+ switch ( index ) {
|
|
|
|
|
|
- case 0: return this.x;
|
|
|
- case 1: return this.y;
|
|
|
- case 2: return this.z;
|
|
|
- case 3: return this.w;
|
|
|
- default: throw new Error( "index is out of range: " + index );
|
|
|
+ case 0: return this.x;
|
|
|
+ case 1: return this.y;
|
|
|
+ case 2: return this.z;
|
|
|
+ case 3: return this.w;
|
|
|
+ default: throw new Error( "index is out of range: " + index );
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
copy: function ( v ) {
|
|
|
|
|
@@ -336,14 +336,14 @@ THREE.Vector4.prototype = {
|
|
|
setLength: function ( l ) {
|
|
|
|
|
|
var oldLength = this.length();
|
|
|
-
|
|
|
- if ( oldLength !== 0 && l !== oldLength ) {
|
|
|
+
|
|
|
+ if ( oldLength !== 0 && l !== oldLength ) {
|
|
|
|
|
|
this.multiplyScalar( l / oldLength );
|
|
|
}
|
|
|
|
|
|
return this;
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
lerpSelf: function ( v, alpha ) {
|
|
@@ -521,4 +521,4 @@ THREE.Vector4.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
-};
|
|
|
+};
|