@@ -3551,7 +3551,7 @@ THREE.Euler.prototype = {
3551
3551
3552
3552
} else {
3553
3553
3554
- console.warn( 'THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + order )
3554
+ console.warn( 'THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + order );
3555
3555
3556
3556
}
3557
3557
@@ -4056,8 +4056,6 @@ THREE.Box3.prototype = {
4056
4056
4057
4057
setFromArray: function ( array ) {
4058
4058
4059
- this.makeEmpty();
4060
-
4061
4059
var minX = + Infinity;
4062
4060
var minY = + Infinity;
4063
4061
var minZ = + Infinity;
@@ -4066,7 +4064,7 @@ THREE.Box3.prototype = {
4066
4064
var maxY = - Infinity;
4067
4065
var maxZ = - Infinity;
4068
4066
4069
- for ( var i = 0, il = array.length; i < il ; i += 3 ) {
4067
+ for ( var i = 0, l = array.length; i < l ; i += 3 ) {
4070
4068
4071
4069
var x = array[ i ];
4072
4070
var y = array[ i + 1 ];
@@ -11973,16 +11971,13 @@ THREE.BufferGeometry.prototype = {
11973
11971
11974
11972
var positions = this.attributes.position.array;
11975
11973
11976
- if ( positions ) {
11974
+ if ( positions !== undefined ) {
11977
11975
11978
11976
this.boundingBox.setFromArray( positions );
11979
11977
11980
- }
11981
-
11982
- if ( positions === undefined || positions.length === 0 ) {
11978
+ } else {
11983
11979
11984
- this.boundingBox.min.set( 0, 0, 0 );
11985
- this.boundingBox.max.set( 0, 0, 0 );
11980
+ this.boundingBox.makeEmpty();
11986
11981
11987
11982
}
11988
11983
@@ -27593,7 +27588,7 @@ THREE.WebGLRenderer = function ( parameters ) {
27593
27588
state.activeTexture( _gl.TEXTURE0 + slot );
27594
27589
state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );
27595
27590
27596
- };
27591
+ }
27597
27592
27598
27593
function clampToMaxSize ( image, maxSize ) {
27599
27594
@@ -28000,7 +27995,7 @@ THREE.WebGLRenderer = function ( parameters ) {
28000
27995
28001
27996
return _currentRenderTarget;
28002
27997
28003
- }
27998
+ };
28004
27999
28005
28000
this.setRenderTarget = function ( renderTarget ) {
28006
28001
@@ -28093,18 +28088,17 @@ THREE.WebGLRenderer = function ( parameters ) {
28093
28088
28094
28089
var texture = renderTarget.texture;
28095
28090
28096
- if ( texture.format !== THREE.RGBAFormat
28097
- && paramThreeToGL( texture.format ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {
28091
+ if ( texture.format !== THREE.RGBAFormat && paramThreeToGL( texture.format ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {
28098
28092
28099
28093
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );
28100
28094
return;
28101
28095
28102
28096
}
28103
28097
28104
- if ( texture.type !== THREE.UnsignedByteType
28105
- && paramThreeToGL( texture.type ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE )
28106
- && ! ( texture.type === THREE.FloatType && extensions.get( 'WEBGL_color_buffer_float' ) )
28107
- && ! ( texture.type === THREE.HalfFloatType && extensions.get( 'EXT_color_buffer_half_float' ) ) ) {
28098
+ if ( texture.type !== THREE.UnsignedByteType &&
28099
+ paramThreeToGL( texture.type ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) &&
28100
+ ! ( texture.type === THREE.FloatType && extensions.get( 'WEBGL_color_buffer_float' ) ) &&
28101
+ ! ( texture.type === THREE.HalfFloatType && extensions.get( 'EXT_color_buffer_half_float' ) ) ) {
28108
28102
28109
28103
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
28110
28104
return;
0 commit comments