提交 9bbcb167 编写于 作者: M Mr.doob

Editor: SpotLight's exponent to penumbra.

上级 b1f94dac
......@@ -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';
......
......@@ -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 );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册