In the control panel, I created a basic slider to adjust the position and rotation of an object. Though adjusting the position is straightforward since the values are relative, I want to display the rotation values in degrees. This is the code snippet for the rotation controls:
gui
.add(mesh.rotation, "x")
.min(Math.PI * -1)
.max(Math.PI)
.step(0.01)
.name("Rotate on X axis");
Here is how the rotation control is displayed in the panel:
https://i.sstatic.net/xbVgQ.jpg
The goal is to represent angles from -180 to 180 degrees.