|
@@ -9258,6 +9258,7 @@ MeshBasicMaterial.prototype.copy = function ( source ) {
|
|
|
*/
|
|
|
|
|
|
const _vector$3 = new Vector3();
|
|
|
+const _vector2$1 = new Vector2();
|
|
|
|
|
|
function BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
@@ -9448,15 +9449,27 @@ Object.assign( BufferAttribute.prototype, {
|
|
|
|
|
|
applyMatrix3: function ( m ) {
|
|
|
|
|
|
- for ( let i = 0, l = this.count; i < l; i ++ ) {
|
|
|
+ if ( this.itemSize === 2 ) {
|
|
|
|
|
|
- _vector$3.x = this.getX( i );
|
|
|
- _vector$3.y = this.getY( i );
|
|
|
- _vector$3.z = this.getZ( i );
|
|
|
+ for ( let i = 0, l = this.count; i < l; i ++ ) {
|
|
|
|
|
|
- _vector$3.applyMatrix3( m );
|
|
|
+ _vector2$1.fromBufferAttribute( this, i );
|
|
|
+ _vector2$1.applyMatrix3( m );
|
|
|
|
|
|
- this.setXYZ( i, _vector$3.x, _vector$3.y, _vector$3.z );
|
|
|
+ this.setXY( i, _vector2$1.x, _vector2$1.y, );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if ( this.itemSize === 3 ) {
|
|
|
+
|
|
|
+ for ( let i = 0, l = this.count; i < l; i ++ ) {
|
|
|
+
|
|
|
+ _vector$3.fromBufferAttribute( this, i );
|
|
|
+ _vector$3.applyMatrix3( m );
|
|
|
+
|
|
|
+ this.setXYZ( i, _vector$3.x, _vector$3.y, _vector$3.z );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|