Browse Source

Editor: Wired up material.bumpScale

Mr.doob 13 years ago
parent
commit
9c36d3082d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      editor/js/ui/Sidebar.Properties.Material.js

+ 6 - 1
editor/js/ui/Sidebar.Properties.Material.js

@@ -133,10 +133,12 @@ Sidebar.Properties.Material = function ( signals ) {
 
 	var materialBumpMapRow = new UI.Panel();
 	var materialBumpMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
-	var materialBumpMap = new UI.Texture( 'absolute' ).setLeft( '130px' ).setColor( '#444' ).onChange( update );
+	var materialBumpScale = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '130px' ).setWidth( '30px' ).setColor( '#444' ).onChange( update );
+	var materialBumpMap = new UI.Texture( 'absolute' ).setLeft( '170px' ).setColor( '#444' ).onChange( update );
 
 	materialBumpMapRow.add( new UI.Text().setValue( 'Bump Map' ).setColor( '#666' ) );
 	materialBumpMapRow.add( materialBumpMapEnabled );
+	materialBumpMapRow.add( materialBumpScale );
 	materialBumpMapRow.add( materialBumpMap );
 
 	container.add( materialBumpMapRow );
@@ -288,6 +290,7 @@ Sidebar.Properties.Material = function ( signals ) {
 			if ( material.bumpMap !== undefined ) {
 
 				material.bumpMap = materialBumpMapEnabled.getValue() === true ? materialBumpMap.getValue() : null;
+				material.bumpScale = materialBumpScale.getValue();
 				material.needsUpdate = true;
 
 			}
@@ -467,10 +470,12 @@ Sidebar.Properties.Material = function ( signals ) {
 
 					materialBumpMapEnabled.setValue( true );
 					materialBumpMap.setValue( material.bumpMap );
+					materialBumpScale.setValue( material.bumpScale );
 
 				} else {
 
 					materialBumpMapEnabled.setValue( false );
+					materialBumpScale.setValue( 1 );
 
 				}