瀏覽代碼

Add check for bounding sphere

Temdog007 6 年之前
父節點
當前提交
c5f771fbb4
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      editor/js/Sidebar.Geometry.js

+ 5 - 0
editor/js/Sidebar.Geometry.js

@@ -179,6 +179,11 @@ Sidebar.Geometry = function ( editor ) {
 
 			}
 
+			if ( geometry.boundingSphere === null ) {
+
+				geometry.computeBoundingSphere();
+
+			}
 			geometryBoundingSphere.setValue( Math.floor( geometry.boundingSphere.radius * 1000 ) / 1000 );
 
 		} else {