Browse Source

BufferAttribute: Clean up.

Mr.doob 10 years ago
parent
commit
484955ef24
1 changed files with 20 additions and 20 deletions
  1. 20 20
      src/core/BufferAttribute.js

+ 20 - 20
src/core/BufferAttribute.js

@@ -146,59 +146,59 @@ THREE.BufferAttribute.prototype = {
 
 
 	},
 	},
 
 
-	setX: function ( index, x ) {
-
-		this.array[ index * this.itemSize ] = x;
+	getX: function ( index ) {
 
 
-		return this;
+		return this.array[ index * this.itemSize ];
 
 
 	},
 	},
 
 
-	setY: function ( index, y ) {
+	setX: function ( index, x ) {
 
 
-		this.array[ index * this.itemSize + 1 ] = y;
+		this.array[ index * this.itemSize ] = x;
 
 
 		return this;
 		return this;
 
 
 	},
 	},
 
 
-	setZ: function ( index, z ) {
-
-		this.array[ index * this.itemSize + 2 ] = z;
+	getY: function ( index ) {
 
 
-		return this;
+		return this.array[ index * this.itemSize + 1 ];
 
 
 	},
 	},
 
 
-	setW: function ( index, w ) {
+	setY: function ( index, y ) {
 
 
-		this.array[ index * this.itemSize + 3 ] = w;
+		this.array[ index * this.itemSize + 1 ] = y;
 
 
 		return this;
 		return this;
 
 
 	},
 	},
 
 
-	getX: function ( index ) {
+	getZ: function ( index ) {
 
 
-		return this.array[ index * this.itemSize ];
+		return this.array[ index * this.itemSize + 2 ];
 
 
 	},
 	},
 
 
-	getY: function ( index ) {
+	setZ: function ( index, z ) {
 
 
-		return this.array[ index * this.itemSize + 1 ];
+		this.array[ index * this.itemSize + 2 ] = z;
+
+		return this;
 
 
 	},
 	},
 
 
-	getZ: function ( index ) {
+	getW: function ( index ) {
 
 
-		return this.array[ index * this.itemSize + 2 ];
+		return this.array[ index * this.itemSize + 3 ];
 
 
 	},
 	},
 
 
-	getW: function ( index ) {
+	setW: function ( index, w ) {
 
 
-		return this.array[ index * this.itemSize + 3 ];
+		this.array[ index * this.itemSize + 3 ] = w;
+
+		return this;
 
 
 	},
 	},