File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ <h3>[method:Box3 applyMatrix4]( [page:Matrix4 matrix] ) [page:Box3 this]</h3>
58
58
</ div >
59
59
< div >
60
60
Transforms this Box3 with the supplied matrix.
61
- This method must not be used on empty boxes.
62
61
</ div >
63
62
64
63
< h3 > [method:Vector3 clampPoint]( [page:Vector3 point], [page:Vector3 optionalTarget] ) [page:Box3 this]</ h3 >
Original file line number Diff line number Diff line change @@ -413,6 +413,9 @@ THREE.Box3.prototype = {
413
413
414
414
return function ( matrix ) {
415
415
416
+ // transform of empty box is an empty box.
417
+ if ( this . isEmpty ( ) ) return this ;
418
+
416
419
// NOTE: I am using a binary pattern to specify all 2^3 combinations below
417
420
points [ 0 ] . set ( this . min . x , this . min . y , this . min . z ) . applyMatrix4 ( matrix ) ; // 000
418
421
points [ 1 ] . set ( this . min . x , this . min . y , this . max . z ) . applyMatrix4 ( matrix ) ; // 001
@@ -423,7 +426,6 @@ THREE.Box3.prototype = {
423
426
points [ 6 ] . set ( this . max . x , this . max . y , this . min . z ) . applyMatrix4 ( matrix ) ; // 110
424
427
points [ 7 ] . set ( this . max . x , this . max . y , this . max . z ) . applyMatrix4 ( matrix ) ; // 111
425
428
426
- this . makeEmpty ( ) ;
427
429
this . setFromPoints ( points ) ;
428
430
429
431
return this ;
You can’t perform that action at this time.
0 commit comments