|
@@ -587,7 +587,7 @@ Vector2.prototype = {
|
|
|
default: throw new Error( 'index is out of range: ' + index );
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this;
|
|
|
|
|
|
},
|
|
@@ -955,12 +955,14 @@ Vector2.prototype = {
|
|
|
|
|
|
fromAttribute: function ( attribute, index, offset ) {
|
|
|
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
+ if ( offset !== undefined ) {
|
|
|
|
|
|
- index = index * attribute.itemSize + offset;
|
|
|
+ console.warn( 'THREE.Vector2: offset has been removed from .fromAttribute().' );
|
|
|
|
|
|
- this.x = attribute.array[ index ];
|
|
|
- this.y = attribute.array[ index + 1 ];
|
|
|
+ }
|
|
|
+
|
|
|
+ this.x = attribute.getX( index );
|
|
|
+ this.y = attribute.getY( index );
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -1353,7 +1355,7 @@ Vector4.prototype = {
|
|
|
default: throw new Error( 'index is out of range: ' + index );
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this;
|
|
|
|
|
|
},
|
|
@@ -1880,14 +1882,16 @@ Vector4.prototype = {
|
|
|
|
|
|
fromAttribute: function ( attribute, index, offset ) {
|
|
|
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
+ if ( offset !== undefined ) {
|
|
|
|
|
|
- index = index * attribute.itemSize + offset;
|
|
|
+ console.warn( 'THREE.Vector4: offset has been removed from .fromAttribute().' );
|
|
|
|
|
|
- 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;
|
|
|
|
|
@@ -3346,13 +3350,15 @@ Vector3.prototype = {
|
|
|
|
|
|
fromAttribute: function ( attribute, index, offset ) {
|
|
|
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
+ if ( offset !== undefined ) {
|
|
|
|
|
|
- index = index * attribute.itemSize + offset;
|
|
|
+ console.warn( 'THREE.Vector3: offset has been removed from .fromAttribute().' );
|
|
|
|
|
|
- this.x = attribute.array[ index ];
|
|
|
- this.y = attribute.array[ index + 1 ];
|
|
|
- this.z = attribute.array[ index + 2 ];
|
|
|
+ }
|
|
|
+
|
|
|
+ this.x = attribute.getX( index );
|
|
|
+ this.y = attribute.getY( index );
|
|
|
+ this.z = attribute.getZ( index );
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -7878,6 +7884,8 @@ Box3.prototype = {
|
|
|
|
|
|
object.traverse( function ( node ) {
|
|
|
|
|
|
+ var i, l;
|
|
|
+
|
|
|
var geometry = node.geometry;
|
|
|
|
|
|
if ( geometry !== undefined ) {
|
|
@@ -7886,7 +7894,7 @@ Box3.prototype = {
|
|
|
|
|
|
var vertices = geometry.vertices;
|
|
|
|
|
|
- for ( var i = 0, il = vertices.length; i < il; i ++ ) {
|
|
|
+ for ( i = 0, l = vertices.length; i < l; i ++ ) {
|
|
|
|
|
|
v1.copy( vertices[ i ] );
|
|
|
v1.applyMatrix4( node.matrixWorld );
|
|
@@ -7901,26 +7909,9 @@ Box3.prototype = {
|
|
|
|
|
|
if ( attribute !== undefined ) {
|
|
|
|
|
|
- var array, offset, stride;
|
|
|
-
|
|
|
- if ( attribute.isInterleavedBufferAttribute ) {
|
|
|
-
|
|
|
- array = attribute.data.array;
|
|
|
- offset = attribute.offset;
|
|
|
- stride = attribute.data.stride;
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- array = attribute.array;
|
|
|
- offset = 0;
|
|
|
- stride = 3;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- for ( var i = offset, il = array.length; i < il; i += stride ) {
|
|
|
+ for ( i = 0, l = attribute.count; i < l; i ++ ) {
|
|
|
|
|
|
- v1.fromArray( array, i );
|
|
|
- v1.applyMatrix4( node.matrixWorld );
|
|
|
+ v1.fromAttribute( attribute, i ).applyMatrix4( node.matrixWorld );
|
|
|
|
|
|
scope.expandByPoint( v1 );
|
|
|
|
|
@@ -29176,7 +29167,7 @@ Object.assign( FileLoader.prototype, {
|
|
|
if ( this.responseType !== undefined ) request.responseType = this.responseType;
|
|
|
if ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials;
|
|
|
|
|
|
- if ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' );
|
|
|
+ if ( this.mimeType && request.overrideMimeType ) request.overrideMimeType( this.mimeType );
|
|
|
|
|
|
request.send( null );
|
|
|
|