Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Uses proper units for CircleGeometry, RingGeometry and TorusGeometry params in GEOMETRY tab #28497

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editor/js/Sidebar.Geometry.CircleGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function GeometryParametersPanel( editor, object ) {
// thetaStart

const thetaStartRow = new UIRow();
const thetaStart = new UINumber( parameters.thetaStart * THREE.MathUtils.RAD2DEG ).setStep( 10 ).onChange( update );
const thetaStart = new UINumber( parameters.thetaStart * THREE.MathUtils.RAD2DEG ).setUnit( '°' ).setStep( 10 ).onChange( update );

thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetastart' ) ).setClass( 'Label' ) );
thetaStartRow.add( thetaStart );
Expand All @@ -46,7 +46,7 @@ function GeometryParametersPanel( editor, object ) {
// thetaLength

const thetaLengthRow = new UIRow();
const thetaLength = new UINumber( parameters.thetaLength * THREE.MathUtils.RAD2DEG ).setStep( 10 ).onChange( update );
const thetaLength = new UINumber( parameters.thetaLength * THREE.MathUtils.RAD2DEG ).setUnit( '°' ).setStep( 10 ).onChange( update );

thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetalength' ) ).setClass( 'Label' ) );
thetaLengthRow.add( thetaLength );
Expand Down
4 changes: 2 additions & 2 deletions editor/js/Sidebar.Geometry.RingGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function GeometryParametersPanel( editor, object ) {
// thetaStart

const thetaStartRow = new UIRow();
const thetaStart = new UINumber( parameters.thetaStart * THREE.MathUtils.RAD2DEG ).setStep( 10 ).onChange( update );
const thetaStart = new UINumber( parameters.thetaStart * THREE.MathUtils.RAD2DEG ).setUnit( '°' ).setStep( 10 ).onChange( update );

thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/ring_geometry/thetastart' ) ).setClass( 'Label' ) );
thetaStartRow.add( thetaStart );
Expand All @@ -66,7 +66,7 @@ function GeometryParametersPanel( editor, object ) {
// thetaLength

const thetaLengthRow = new UIRow();
const thetaLength = new UINumber( parameters.thetaLength * THREE.MathUtils.RAD2DEG ).setStep( 10 ).onChange( update );
const thetaLength = new UINumber( parameters.thetaLength * THREE.MathUtils.RAD2DEG ).setUnit( '°' ).setStep( 10 ).onChange( update );

thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/ring_geometry/thetalength' ) ).setClass( 'Label' ) );
thetaLengthRow.add( thetaLength );
Expand Down
2 changes: 1 addition & 1 deletion editor/js/Sidebar.Geometry.TorusGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function GeometryParametersPanel( editor, object ) {
// arc

const arcRow = new UIRow();
const arc = new UINumber( parameters.arc * THREE.MathUtils.RAD2DEG ).setStep( 10 ).onChange( update );
const arc = new UINumber( parameters.arc * THREE.MathUtils.RAD2DEG ).setUnit( '°' ).setStep( 10 ).onChange( update );

arcRow.add( new UIText( strings.getKey( 'sidebar/geometry/torus_geometry/arc' ) ).setClass( 'Label' ) );
arcRow.add( arc );
Expand Down