提交 63f58304 编写于 作者: M Mr.doob

Editor: Move Convert to BufferGeometry to Actions.

上级 93a6808a
......@@ -31,26 +31,6 @@ Sidebar.Geometry.Modifiers = function ( signals, object ) {
container.add( button );
// Convert to Geometry/BufferGeometry
var isBufferGeometry = geometry instanceof THREE.BufferGeometry;
if ( geometry instanceof THREE.Geometry ) {
var button = new UI.Button( 'Convert to BufferGeometry' );
button.onClick( function () {
if ( confirm( 'Are you sure?' ) === false ) return;
object.geometry = new THREE.BufferGeometry().fromGeometry( object.geometry );
signals.geometryChanged.dispatch( object );
} );
container.add( button );
}
//
return container;
......
......@@ -25,6 +25,7 @@ Sidebar.Geometry = function ( editor ) {
'Actions': 'Actions',
'Center': 'Center',
'Convert': 'Convert',
'Flatten': 'Flatten'
} );
......@@ -55,6 +56,18 @@ Sidebar.Geometry = function ( editor ) {
break;
case 'Convert':
if ( geometry instanceof THREE.Geometry ) {
object.geometry = new THREE.BufferGeometry().fromGeometry( geometry );
signals.geometryChanged.dispatch( object );
}
break;
case 'Flatten':
geometry.applyMatrix( object.matrix );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册