Skip to content

Commit e6c1350

Browse files
committed
Updated builds.
1 parent 95c229a commit e6c1350

File tree

3 files changed

+379
-397
lines changed

3 files changed

+379
-397
lines changed

build/three.js

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,6 +4582,8 @@
45824582

45834583
this.texture = new Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
45844584

4585+
this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : true;
4586+
45854587
this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
45864588
this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
45874589
this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;
@@ -5241,41 +5243,30 @@
52415243

52425244
},
52435245

5244-
applyMatrix4: function () {
5245-
5246-
var points = [
5247-
new Vector3(),
5248-
new Vector3(),
5249-
new Vector3(),
5250-
new Vector3(),
5251-
new Vector3(),
5252-
new Vector3(),
5253-
new Vector3(),
5254-
new Vector3()
5255-
];
5246+
applyMatrix4: function ( matrix ) {
52565247

5257-
return function applyMatrix4( matrix ) {
5248+
// transform of empty box is an empty box.
5249+
if ( this.isEmpty( ) ) return this;
52585250

5259-
// transform of empty box is an empty box.
5260-
if ( this.isEmpty() ) return this;
5251+
var m = matrix.elements;
52615252

5262-
// NOTE: I am using a binary pattern to specify all 2^3 combinations below
5263-
points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000
5264-
points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001
5265-
points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010
5266-
points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011
5267-
points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100
5268-
points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101
5269-
points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110
5270-
points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111
5253+
var xax = m[ 0 ] * this.min.x, xay = m[ 1 ] * this.min.x, xaz = m[ 2 ] * this.min.x;
5254+
var xbx = m[ 0 ] * this.max.x, xby = m[ 1 ] * this.max.x, xbz = m[ 2 ] * this.max.x;
5255+
var yax = m[ 4 ] * this.min.y, yay = m[ 5 ] * this.min.y, yaz = m[ 6 ] * this.min.y;
5256+
var ybx = m[ 4 ] * this.max.y, yby = m[ 5 ] * this.max.y, ybz = m[ 6 ] * this.max.y;
5257+
var zax = m[ 8 ] * this.min.z, zay = m[ 9 ] * this.min.z, zaz = m[ 10 ] * this.min.z;
5258+
var zbx = m[ 8 ] * this.max.z, zby = m[ 9 ] * this.max.z, zbz = m[ 10 ] * this.max.z;
52715259

5272-
this.setFromPoints( points );
5260+
this.min.x = Math.min( xax, xbx ) + Math.min( yax, ybx ) + Math.min( zax, zbx ) + m[ 12 ];
5261+
this.min.y = Math.min( xay, xby ) + Math.min( yay, yby ) + Math.min( zay, zby ) + m[ 13 ];
5262+
this.min.z = Math.min( xaz, xbz ) + Math.min( yaz, ybz ) + Math.min( zaz, zbz ) + m[ 14 ];
5263+
this.max.x = Math.max( xax, xbx ) + Math.max( yax, ybx ) + Math.max( zax, zbx ) + m[ 12 ];
5264+
this.max.y = Math.max( xay, xby ) + Math.max( yay, yby ) + Math.max( zay, zby ) + m[ 13 ];
5265+
this.max.z = Math.max( xaz, xbz ) + Math.max( yaz, ybz ) + Math.max( zaz, zbz ) + m[ 14 ];
52735266

5274-
return this;
5275-
5276-
};
5267+
return this;
52775268

5278-
}(),
5269+
},
52795270

52805271
translate: function ( offset ) {
52815272

0 commit comments

Comments
 (0)