|
@@ -149,42 +149,42 @@ Sidebar.Object = function ( editor ) {
|
|
// left
|
|
// left
|
|
|
|
|
|
var objectLeftRow = new UI.Row();
|
|
var objectLeftRow = new UI.Row();
|
|
- var objectLeft = new UI.Number().onChange(update);
|
|
|
|
|
|
+ var objectLeft = new UI.Number().onChange( update );
|
|
|
|
|
|
- objectLeftRow.add(new UI.Text(strings.getKey('sidebar/object/left')).setWidth('90px'));
|
|
|
|
- objectLeftRow.add(objectLeft);
|
|
|
|
|
|
+ objectLeftRow.add( new UI.Text( strings.getKey( 'sidebar/object/left' ) ).setWidth( '90px' ) );
|
|
|
|
+ objectLeftRow.add( objectLeft );
|
|
|
|
|
|
- container.add(objectLeftRow);
|
|
|
|
|
|
+ container.add( objectLeftRow );
|
|
|
|
|
|
// right
|
|
// right
|
|
-
|
|
|
|
|
|
+
|
|
var objectRightRow = new UI.Row();
|
|
var objectRightRow = new UI.Row();
|
|
- var objectRight = new UI.Number().onChange(update);
|
|
|
|
|
|
+ var objectRight = new UI.Number().onChange( update );
|
|
|
|
|
|
- objectRightRow.add(new UI.Text(strings.getKey('sidebar/object/right')).setWidth('90px'));
|
|
|
|
- objectRightRow.add(objectRight);
|
|
|
|
|
|
+ objectRightRow.add( new UI.Text( strings.getKey( 'sidebar/object/right' ) ).setWidth( '90px' ) );
|
|
|
|
+ objectRightRow.add( objectRight );
|
|
|
|
|
|
- container.add(objectRightRow);
|
|
|
|
|
|
+ container.add( objectRightRow );
|
|
|
|
|
|
// top
|
|
// top
|
|
-
|
|
|
|
|
|
+
|
|
var objectTopRow = new UI.Row();
|
|
var objectTopRow = new UI.Row();
|
|
- var objectTop = new UI.Number().onChange(update);
|
|
|
|
|
|
+ var objectTop = new UI.Number().onChange( update );
|
|
|
|
|
|
- objectTopRow.add(new UI.Text(strings.getKey('sidebar/object/top')).setWidth('90px'));
|
|
|
|
- objectTopRow.add(objectTop);
|
|
|
|
|
|
+ objectTopRow.add( new UI.Text( strings.getKey( 'sidebar/object/top' ) ).setWidth( '90px' ) );
|
|
|
|
+ objectTopRow.add( objectTop );
|
|
|
|
|
|
- container.add(objectTopRow);
|
|
|
|
|
|
+ container.add( objectTopRow );
|
|
|
|
|
|
// bottom
|
|
// bottom
|
|
-
|
|
|
|
|
|
+
|
|
var objectBottomRow = new UI.Row();
|
|
var objectBottomRow = new UI.Row();
|
|
- var objectBottom = new UI.Number().onChange(update);
|
|
|
|
|
|
+ var objectBottom = new UI.Number().onChange( update );
|
|
|
|
|
|
- objectBottomRow.add(new UI.Text(strings.getKey('sidebar/object/bottom')).setWidth('90px'));
|
|
|
|
- objectBottomRow.add(objectBottom);
|
|
|
|
|
|
+ objectBottomRow.add( new UI.Text( strings.getKey( 'sidebar/object/bottom' ) ).setWidth( '90px' ) );
|
|
|
|
+ objectBottomRow.add( objectBottom );
|
|
|
|
|
|
- container.add(objectBottomRow);
|
|
|
|
|
|
+ container.add( objectBottomRow );
|
|
|
|
|
|
// near
|
|
// near
|
|
|
|
|
|
@@ -471,8 +471,10 @@ Sidebar.Object = function ( editor ) {
|
|
if ( object.near !== undefined && Math.abs( object.near - objectNear.getValue() ) >= 0.01 ) {
|
|
if ( object.near !== undefined && Math.abs( object.near - objectNear.getValue() ) >= 0.01 ) {
|
|
|
|
|
|
editor.execute( new SetValueCommand( object, 'near', objectNear.getValue() ) );
|
|
editor.execute( new SetValueCommand( object, 'near', objectNear.getValue() ) );
|
|
- if(object.isOrthographicCamera){
|
|
|
|
|
|
+ if ( object.isOrthographicCamera ) {
|
|
|
|
+
|
|
object.updateProjectionMatrix();
|
|
object.updateProjectionMatrix();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -480,9 +482,12 @@ Sidebar.Object = function ( editor ) {
|
|
if ( object.far !== undefined && Math.abs( object.far - objectFar.getValue() ) >= 0.01 ) {
|
|
if ( object.far !== undefined && Math.abs( object.far - objectFar.getValue() ) >= 0.01 ) {
|
|
|
|
|
|
editor.execute( new SetValueCommand( object, 'far', objectFar.getValue() ) );
|
|
editor.execute( new SetValueCommand( object, 'far', objectFar.getValue() ) );
|
|
- if(object.isOrthographicCamera){
|
|
|
|
|
|
+ if ( object.isOrthographicCamera ) {
|
|
|
|
+
|
|
object.updateProjectionMatrix();
|
|
object.updateProjectionMatrix();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
if ( object.intensity !== undefined && Math.abs( object.intensity - objectIntensity.getValue() ) >= 0.01 ) {
|
|
if ( object.intensity !== undefined && Math.abs( object.intensity - objectIntensity.getValue() ) >= 0.01 ) {
|
|
@@ -600,12 +605,12 @@ Sidebar.Object = function ( editor ) {
|
|
'intensity': objectIntensityRow,
|
|
'intensity': objectIntensityRow,
|
|
'color': objectColorRow,
|
|
'color': objectColorRow,
|
|
'groundColor': objectGroundColorRow,
|
|
'groundColor': objectGroundColorRow,
|
|
- 'distance' : objectDistanceRow,
|
|
|
|
- 'angle' : objectAngleRow,
|
|
|
|
- 'penumbra' : objectPenumbraRow,
|
|
|
|
- 'decay' : objectDecayRow,
|
|
|
|
- 'castShadow' : objectShadowRow,
|
|
|
|
- 'receiveShadow' : objectReceiveShadow,
|
|
|
|
|
|
+ 'distance': objectDistanceRow,
|
|
|
|
+ 'angle': objectAngleRow,
|
|
|
|
+ 'penumbra': objectPenumbraRow,
|
|
|
|
+ 'decay': objectDecayRow,
|
|
|
|
+ 'castShadow': objectShadowRow,
|
|
|
|
+ 'receiveShadow': objectReceiveShadow,
|
|
'shadow': objectShadowRadius
|
|
'shadow': objectShadowRadius
|
|
};
|
|
};
|
|
|
|
|