Browse Source

Editor: SpotLight's exponent to penumbra.

Mr.doob 9 years ago
parent
commit
9bbcb167a9
2 changed files with 13 additions and 13 deletions
  1. 2 2
      editor/js/Menubar.Add.js
  2. 11 11
      editor/js/Sidebar.Object.js

+ 2 - 2
editor/js/Menubar.Add.js

@@ -324,9 +324,9 @@ Menubar.Add = function ( editor ) {
 		var intensity = 1;
 		var distance = 0;
 		var angle = Math.PI * 0.1;
-		var exponent = 10;
+		var penumbra = 0;
 
-		var light = new THREE.SpotLight( color, intensity, distance, angle, exponent );
+		var light = new THREE.SpotLight( color, intensity, distance, angle, penumbra );
 		light.name = 'SpotLight ' + ( ++ lightCount );
 		light.target.name = 'SpotLight ' + ( lightCount ) + ' Target';
 

+ 11 - 11
editor/js/Sidebar.Object.js

@@ -224,15 +224,15 @@ Sidebar.Object = function ( editor ) {
 
 	container.add( objectAngleRow );
 
-	// exponent
+	// penumrba
 
-	var objectExponentRow = new UI.Row();
-	var objectExponent = new UI.Number().setRange( 0, Infinity ).onChange( update );
+	var objectPenumbraRow = new UI.Row();
+	var objectPenumbra = new UI.Number().setRange( 0, 1 ).onChange( update );
 
-	objectExponentRow.add( new UI.Text( 'Exponent' ).setWidth( '90px' ) );
-	objectExponentRow.add( objectExponent );
+	objectPenumbraRow.add( new UI.Text( 'Penumbra' ).setWidth( '90px' ) );
+	objectPenumbraRow.add( objectPenumbra );
 
-	container.add( objectExponentRow );
+	container.add( objectPenumbraRow );
 
 	// decay
 
@@ -444,9 +444,9 @@ Sidebar.Object = function ( editor ) {
 
 			}
 
-			if ( object.exponent !== undefined && Math.abs( object.exponent - objectExponent.getValue() ) >= 0.01 ) {
+			if ( object.penumbra !== undefined && Math.abs( object.penumbra - objectPenumbra.getValue() ) >= 0.01 ) {
 
-				editor.execute( new SetValueCommand( object, 'exponent', objectExponent.getValue() ) );
+				editor.execute( new SetValueCommand( object, 'penumbra', objectPenumbra.getValue() ) );
 
 			}
 
@@ -520,7 +520,7 @@ Sidebar.Object = function ( editor ) {
 			'groundColor': objectGroundColorRow,
 			'distance' : objectDistanceRow,
 			'angle' : objectAngleRow,
-			'exponent' : objectExponentRow,
+			'penumbra' : objectPenumbraRow,
 			'decay' : objectDecayRow,
 			'castShadow' : objectShadowRow,
 			'receiveShadow' : objectReceiveShadow,
@@ -679,9 +679,9 @@ Sidebar.Object = function ( editor ) {
 
 		}
 
-		if ( object.exponent !== undefined ) {
+		if ( object.penumbra !== undefined ) {
 
-			objectExponent.setValue( object.exponent );
+			objectPenumbra.setValue( object.penumbra );
 
 		}