提交 8bf4a9e6 编写于 作者: M Mr.doob

Editor: Faster rotation.

上级 6a2e7a0c
...@@ -109,9 +109,9 @@ Sidebar.Object = function ( editor ) { ...@@ -109,9 +109,9 @@ Sidebar.Object = function ( editor ) {
// rotation // rotation
var objectRotationRow = new UI.Row(); var objectRotationRow = new UI.Row();
var objectRotationX = new UI.Number().setUnit( '°' ).setWidth( '50px' ).onChange( update ); var objectRotationX = new UI.Number().setStep( 10 ).setUnit( '°' ).setWidth( '50px' ).onChange( update );
var objectRotationY = new UI.Number().setUnit( '°' ).setWidth( '50px' ).onChange( update ); var objectRotationY = new UI.Number().setStep( 10 ).setUnit( '°' ).setWidth( '50px' ).onChange( update );
var objectRotationZ = new UI.Number().setUnit( '°' ).setWidth( '50px' ).onChange( update ); var objectRotationZ = new UI.Number().setStep( 10 ).setUnit( '°' ).setWidth( '50px' ).onChange( update );
objectRotationRow.add( new UI.Text( 'Rotation' ).setWidth( '90px' ) ); objectRotationRow.add( new UI.Text( 'Rotation' ).setWidth( '90px' ) );
objectRotationRow.add( objectRotationX, objectRotationY, objectRotationZ ); objectRotationRow.add( objectRotationX, objectRotationY, objectRotationZ );
......
...@@ -808,18 +808,26 @@ UI.Number.prototype.setValue = function ( value ) { ...@@ -808,18 +808,26 @@ UI.Number.prototype.setValue = function ( value ) {
}; };
UI.Number.prototype.setRange = function ( min, max ) { UI.Number.prototype.setPrecision = function ( precision ) {
this.min = min; this.precision = precision;
this.max = max;
return this; return this;
}; };
UI.Number.prototype.setPrecision = function ( precision ) { UI.Number.prototype.setStep = function ( step ) {
this.precision = precision; this.step = step;
return this;
};
UI.Number.prototype.setRange = function ( min, max ) {
this.min = min;
this.max = max;
return this; return this;
...@@ -977,6 +985,14 @@ UI.Integer.prototype.setValue = function ( value ) { ...@@ -977,6 +985,14 @@ UI.Integer.prototype.setValue = function ( value ) {
}; };
UI.Number.prototype.setStep = function ( step ) {
this.step = step;
return this;
};
UI.Integer.prototype.setRange = function ( min, max ) { UI.Integer.prototype.setRange = function ( min, max ) {
this.min = min; this.min = min;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册