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

BufferAttribute: Clean up.

上级 3cdfe526
......@@ -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;
},
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;
},
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;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册