File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1163,16 +1163,20 @@ class WebGLRenderer {
11631163
11641164 if ( ! object . frustumCulled || _frustum . intersectsObject ( object ) ) {
11651165
1166+ const geometry = objects . update ( object ) ;
1167+ const material = object . material ;
1168+
11661169 if ( sortObjects ) {
11671170
1168- _vector3 . setFromMatrixPosition ( object . matrixWorld )
1171+ if ( geometry . boundingSphere === null ) geometry . computeBoundingSphere ( ) ;
1172+
1173+ _vector3
1174+ . copy ( geometry . boundingSphere . center )
1175+ . applyMatrix4 ( object . matrixWorld )
11691176 . applyMatrix4 ( _projScreenMatrix ) ;
11701177
11711178 }
11721179
1173- const geometry = objects . update ( object ) ;
1174- const material = object . material ;
1175-
11761180 if ( Array . isArray ( material ) ) {
11771181
11781182 const groups = geometry . groups ;
You can’t perform that action at this time.
0 commit comments