@@ -109,9 +109,9 @@ Sidebar.Object = function ( editor ) {
109
109
// rotation
110
110
111
111
var objectRotationRow = new UI . Row ( ) ;
112
- var objectRotationX = new UI . Number ( ) . setWidth ( '50px' ) . onChange ( update ) ;
113
- var objectRotationY = new UI . Number ( ) . setWidth ( '50px' ) . onChange ( update ) ;
114
- var objectRotationZ = new UI . Number ( ) . setWidth ( '50px' ) . onChange ( update ) ;
112
+ var objectRotationX = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
113
+ var objectRotationY = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
114
+ var objectRotationZ = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
115
115
116
116
objectRotationRow . add ( new UI . Text ( 'Rotation' ) . setWidth ( '90px' ) ) ;
117
117
objectRotationRow . add ( objectRotationX , objectRotationY , objectRotationZ ) ;
@@ -355,7 +355,7 @@ Sidebar.Object = function ( editor ) {
355
355
356
356
}
357
357
358
- var newRotation = new THREE . Euler ( objectRotationX . getValue ( ) , objectRotationY . getValue ( ) , objectRotationZ . getValue ( ) ) ;
358
+ var newRotation = new THREE . Euler ( objectRotationX . getValue ( ) * THREE . Math . DEG2RAD , objectRotationY . getValue ( ) * THREE . Math . DEG2RAD , objectRotationZ . getValue ( ) * THREE . Math . DEG2RAD ) ;
359
359
if ( object . rotation . toVector3 ( ) . distanceTo ( newRotation . toVector3 ( ) ) >= 0.01 ) {
360
360
361
361
editor . execute ( new SetRotationCommand ( object , newRotation ) ) ;
@@ -567,9 +567,9 @@ Sidebar.Object = function ( editor ) {
567
567
objectPositionY . setValue ( object . position . y ) ;
568
568
objectPositionZ . setValue ( object . position . z ) ;
569
569
570
- objectRotationX . setValue ( object . rotation . x ) ;
571
- objectRotationY . setValue ( object . rotation . y ) ;
572
- objectRotationZ . setValue ( object . rotation . z ) ;
570
+ objectRotationX . setValue ( object . rotation . x * THREE . Math . RAD2DEG ) ;
571
+ objectRotationY . setValue ( object . rotation . y * THREE . Math . RAD2DEG ) ;
572
+ objectRotationZ . setValue ( object . rotation . z * THREE . Math . RAD2DEG ) ;
573
573
574
574
objectScaleX . setValue ( object . scale . x ) ;
575
575
objectScaleY . setValue ( object . scale . y ) ;
0 commit comments