提交 f77ae6b5 编写于 作者: M Mugen87

Editor: Only rebuild geometry sidebar if type has changed.

上级 49b76ebb
......@@ -61,6 +61,8 @@ var SidebarGeometry = function ( editor ) {
container.setDisplay( 'none' );
container.setPaddingTop( '20px' );
var currentGeometryType = null;
// Actions
/*
......@@ -215,6 +217,8 @@ var SidebarGeometry = function ( editor ) {
//
if ( currentGeometryType !== geometry.type ) {
parameters.clear();
if ( geometry.type === 'BufferGeometry' || geometry.type === 'Geometry' ) {
......@@ -227,6 +231,10 @@ var SidebarGeometry = function ( editor ) {
}
currentGeometryType = geometry.type;
}
if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
geometryBoundingSphere.setValue( Math.floor( geometry.boundingSphere.radius * 1000 ) / 1000 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册