|
@@ -53,12 +53,13 @@ export class RotationGizmo extends Gizmo {
|
|
|
* Creates a RotationGizmo
|
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
|
* @param tessellation Amount of tessellation to be used when creating rotation circles
|
|
|
+ * @param useEulerRotation Use and update Euler angle instead of quaternion
|
|
|
*/
|
|
|
- constructor(gizmoLayer: UtilityLayerRenderer = UtilityLayerRenderer.DefaultUtilityLayer, tessellation = 32) {
|
|
|
+ constructor(gizmoLayer: UtilityLayerRenderer = UtilityLayerRenderer.DefaultUtilityLayer, tessellation = 32, useEulerRotation = false) {
|
|
|
super(gizmoLayer);
|
|
|
- this.xGizmo = new PlaneRotationGizmo(new Vector3(1, 0, 0), Color3.Red().scale(0.5), gizmoLayer, tessellation, this);
|
|
|
- this.yGizmo = new PlaneRotationGizmo(new Vector3(0, 1, 0), Color3.Green().scale(0.5), gizmoLayer, tessellation, this);
|
|
|
- this.zGizmo = new PlaneRotationGizmo(new Vector3(0, 0, 1), Color3.Blue().scale(0.5), gizmoLayer, tessellation, this);
|
|
|
+ this.xGizmo = new PlaneRotationGizmo(new Vector3(1, 0, 0), Color3.Red().scale(0.5), gizmoLayer, tessellation, this, useEulerRotation);
|
|
|
+ this.yGizmo = new PlaneRotationGizmo(new Vector3(0, 1, 0), Color3.Green().scale(0.5), gizmoLayer, tessellation, this, useEulerRotation);
|
|
|
+ this.zGizmo = new PlaneRotationGizmo(new Vector3(0, 0, 1), Color3.Blue().scale(0.5), gizmoLayer, tessellation, this, useEulerRotation);
|
|
|
|
|
|
// Relay drag events
|
|
|
[this.xGizmo, this.yGizmo, this.zGizmo].forEach((gizmo) => {
|