|
@@ -86,7 +86,7 @@ Vector4.prototype = {
|
|
|
default: throw new Error( 'index is out of range: ' + index );
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this;
|
|
|
|
|
|
},
|
|
@@ -611,16 +611,12 @@ Vector4.prototype = {
|
|
|
|
|
|
},
|
|
|
|
|
|
- fromAttribute: function ( attribute, index, offset ) {
|
|
|
-
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
-
|
|
|
- index = index * attribute.itemSize + offset;
|
|
|
+ fromAttribute: function ( attribute, index ) {
|
|
|
|
|
|
- this.x = attribute.array[ index ];
|
|
|
- this.y = attribute.array[ index + 1 ];
|
|
|
- this.z = attribute.array[ index + 2 ];
|
|
|
- this.w = attribute.array[ index + 3 ];
|
|
|
+ this.x = attribute.getX( index );
|
|
|
+ this.y = attribute.getY( index );
|
|
|
+ this.z = attribute.getZ( index );
|
|
|
+ this.w = attribute.getW( index );
|
|
|
|
|
|
return this;
|
|
|
|