@@ -14108,11 +14108,7 @@ THREE.CanvasRenderer = function ( parameters ) {
1410814108
1410914109 }
1411014110
14111- if ( this.autoClear === true ) {
14112-
14113- this.clear();
14114-
14115- }
14111+ if ( this.autoClear === true ) this.clear();
1411614112
1411714113 _context.setTransform( 1, 0, 0, - 1, _canvasWidthHalf, _canvasHeightHalf );
1411814114
@@ -14154,7 +14150,10 @@ THREE.CanvasRenderer = function ( parameters ) {
1415414150 _v1.positionScreen.x *= _canvasWidthHalf; _v1.positionScreen.y *= _canvasHeightHalf;
1415514151 _v2.positionScreen.x *= _canvasWidthHalf; _v2.positionScreen.y *= _canvasHeightHalf;
1415614152
14157- _elemBox.setFromPoints( [ _v1.positionScreen, _v2.positionScreen ] );
14153+ _elemBox.setFromPoints( [
14154+ _v1.positionScreen,
14155+ _v2.positionScreen
14156+ ] );
1415814157
1415914158 if ( _clipBox.isIntersectionBox( _elemBox ) === true ) {
1416014159
@@ -14182,9 +14181,17 @@ THREE.CanvasRenderer = function ( parameters ) {
1418214181
1418314182 }
1418414183
14185- _elemBox.setFromPoints( [ _v1.positionScreen, _v2.positionScreen, _v3.positionScreen ] );
14184+ _elemBox.setFromPoints( [
14185+ _v1.positionScreen,
14186+ _v2.positionScreen,
14187+ _v3.positionScreen
14188+ ] );
1418614189
14187- renderFace3( _v1, _v2, _v3, 0, 1, 2, element, material );
14190+ if ( _clipBox.isIntersectionBox( _elemBox ) === true ) {
14191+
14192+ renderFace3( _v1, _v2, _v3, 0, 1, 2, element, material );
14193+
14194+ }
1418814195
1418914196 } else if ( element instanceof THREE.RenderableFace4 ) {
1419014197
@@ -14214,9 +14221,18 @@ THREE.CanvasRenderer = function ( parameters ) {
1421414221
1421514222 }
1421614223
14217- _elemBox.setFromPoints( [ _v1.positionScreen, _v2.positionScreen, _v3.positionScreen, _v4.positionScreen ] );
14224+ _elemBox.setFromPoints( [
14225+ _v1.positionScreen,
14226+ _v2.positionScreen,
14227+ _v3.positionScreen,
14228+ _v4.positionScreen
14229+ ] );
14230+
14231+ if ( _clipBox.isIntersectionBox( _elemBox ) === true ) {
1421814232
14219- renderFace4( _v1, _v2, _v3, _v4, _v5, _v6, element, material, scene );
14233+ renderFace4( _v1, _v2, _v3, _v4, _v5, _v6, element, material );
14234+
14235+ }
1422014236
1422114237 }
1422214238
@@ -14340,6 +14356,7 @@ THREE.CanvasRenderer = function ( parameters ) {
1434014356
1434114357 if ( _clipBox.isIntersectionBox( _elemBox ) === false ) {
1434214358
14359+ _elemBox.makeEmpty();
1434314360 return;
1434414361
1434514362 }
@@ -14372,6 +14389,7 @@ THREE.CanvasRenderer = function ( parameters ) {
1437214389
1437314390 if ( _clipBox.isIntersectionBox( _elemBox ) === false ) {
1437414391
14392+ _elemBox.makeEmpty();
1437514393 return;
1437614394
1437714395 }
@@ -14407,6 +14425,7 @@ THREE.CanvasRenderer = function ( parameters ) {
1440714425
1440814426 if ( _clipBox.isIntersectionBox( _elemBox ) === false ) {
1440914427
14428+ _elemBox.makeEmpty();
1441014429 return;
1441114430
1441214431 }
0 commit comments