Sfoglia il codice sorgente

Editor: Display indices count.

Mr.doob 10 anni fa
parent
commit
93a6808aa8
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 11 0
      editor/js/Sidebar.Geometry.BufferGeometry.js

+ 11 - 0
editor/js/Sidebar.Geometry.BufferGeometry.js

@@ -17,6 +17,17 @@ Sidebar.Geometry.BufferGeometry = function ( signals ) {
 			container.clear();
 			container.setDisplay( 'block' );
 
+			var index = geometry.index;
+
+			if ( index !== null ) {
+
+				var panel = new UI.Panel();
+				panel.add( new UI.Text( 'index' ).setWidth( '90px' ) );
+				panel.add( new UI.Text( ( index.count ).format() ).setFontSize( '12px' ) );
+				container.add( panel );
+
+			}
+
 			var attributes = geometry.attributes;
 
 			for ( var name in attributes ) {