|
|
@@ -251,6 +251,33 @@ class TransformControls extends Controls {
|
|
|
*/
|
|
|
defineProperty( 'showZ', true );
|
|
|
|
|
|
+ /**
|
|
|
+ * Whether the xy-plane helper should be visible or not.
|
|
|
+ *
|
|
|
+ * @name TransformControls#showXY
|
|
|
+ * @type {boolean}
|
|
|
+ * @default true
|
|
|
+ */
|
|
|
+ defineProperty( 'showXY', true );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Whether the yz-plane helper should be visible or not.
|
|
|
+ *
|
|
|
+ * @name TransformControls#showYZ
|
|
|
+ * @type {boolean}
|
|
|
+ * @default true
|
|
|
+ */
|
|
|
+ defineProperty( 'showYZ', true );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Whether the xz-axis helper should be visible or not.
|
|
|
+ *
|
|
|
+ * @name TransformControls#showXZ
|
|
|
+ * @type {boolean}
|
|
|
+ * @default true
|
|
|
+ */
|
|
|
+ defineProperty( 'showXZ', true );
|
|
|
+
|
|
|
/**
|
|
|
* The minimum allowed X position during translation.
|
|
|
*
|
|
|
@@ -1784,6 +1811,11 @@ class TransformControlsGizmo extends Object3D {
|
|
|
handle.visible = handle.visible && ( handle.name.indexOf( 'Z' ) === - 1 || this.showZ );
|
|
|
handle.visible = handle.visible && ( handle.name.indexOf( 'E' ) === - 1 || ( this.showX && this.showY && this.showZ ) );
|
|
|
|
|
|
+ // Hide disabled plane helpers
|
|
|
+ handle.visible = handle.visible && ( handle.name.indexOf( 'XY' ) === - 1 || this.showXY );
|
|
|
+ handle.visible = handle.visible && ( handle.name.indexOf( 'YZ' ) === - 1 || this.showYZ );
|
|
|
+ handle.visible = handle.visible && ( handle.name.indexOf( 'XZ' ) === - 1 || this.showXZ );
|
|
|
+
|
|
|
// highlight selected axis
|
|
|
|
|
|
handle.material._color = handle.material._color || handle.material.color.clone();
|