|
@@ -298,51 +298,67 @@ Sidebar.Properties.Object3D = function ( signals ) {
|
|
|
} );
|
|
|
|
|
|
|
|
|
+ signals.cameraChanged.add( function ( camera ) {
|
|
|
+
|
|
|
+ if ( camera && camera === selected ) {
|
|
|
+
|
|
|
+ refreshObjectUI( camera );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
signals.objectChanged.add( function ( object ) {
|
|
|
|
|
|
if ( object ) {
|
|
|
|
|
|
- container.setDisplay( 'block' );
|
|
|
+ refreshObjectUI( object );
|
|
|
|
|
|
- objectType.setValue( getObjectInstanceName( object ).toUpperCase() );
|
|
|
+ }
|
|
|
|
|
|
- objectName.setValue( object.name );
|
|
|
+ } );
|
|
|
|
|
|
- objectPositionX.setValue( object.position.x );
|
|
|
- objectPositionY.setValue( object.position.y );
|
|
|
- objectPositionZ.setValue( object.position.z );
|
|
|
+ function refreshObjectUI( object ) {
|
|
|
|
|
|
- objectRotationX.setValue( object.rotation.x );
|
|
|
- objectRotationY.setValue( object.rotation.y );
|
|
|
- objectRotationZ.setValue( object.rotation.z );
|
|
|
+ container.setDisplay( 'block' );
|
|
|
|
|
|
- objectScaleX.setValue( object.scale.x );
|
|
|
- objectScaleY.setValue( object.scale.y );
|
|
|
- objectScaleZ.setValue( object.scale.z );
|
|
|
+ objectType.setValue( getObjectInstanceName( object ).toUpperCase() );
|
|
|
|
|
|
- if ( object.fov !== undefined ) {
|
|
|
+ objectName.setValue( object.name );
|
|
|
|
|
|
- objectFov.setValue( object.fov );
|
|
|
+ objectPositionX.setValue( object.position.x );
|
|
|
+ objectPositionY.setValue( object.position.y );
|
|
|
+ objectPositionZ.setValue( object.position.z );
|
|
|
|
|
|
- }
|
|
|
+ objectRotationX.setValue( object.rotation.x );
|
|
|
+ objectRotationY.setValue( object.rotation.y );
|
|
|
+ objectRotationZ.setValue( object.rotation.z );
|
|
|
|
|
|
- if ( object.near !== undefined ) {
|
|
|
+ objectScaleX.setValue( object.scale.x );
|
|
|
+ objectScaleY.setValue( object.scale.y );
|
|
|
+ objectScaleZ.setValue( object.scale.z );
|
|
|
|
|
|
- objectNear.setValue( object.near );
|
|
|
+ if ( object.fov !== undefined ) {
|
|
|
|
|
|
- }
|
|
|
+ objectFov.setValue( object.fov );
|
|
|
|
|
|
- if ( object.far !== undefined ) {
|
|
|
+ }
|
|
|
|
|
|
- objectFar.setValue( object.far );
|
|
|
+ if ( object.near !== undefined ) {
|
|
|
|
|
|
- }
|
|
|
+ objectNear.setValue( object.near );
|
|
|
|
|
|
- objectVisible.setValue( object.visible );
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( object.far !== undefined ) {
|
|
|
+
|
|
|
+ objectFar.setValue( object.far );
|
|
|
|
|
|
}
|
|
|
|
|
|
- } );
|
|
|
+ objectVisible.setValue( object.visible );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
return container;
|
|
|
|