Skip to content

Commit

Permalink
Merge pull request #652 from 3DStreet/fix-rotation
Browse files Browse the repository at this point in the history
Hide all axes except Y in pickerGizmos
  • Loading branch information
kfarr authored Jun 18, 2024
2 parents 1df307e + ae2deb0 commit 2c5749d
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions src/editor/lib/TransformControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,16 +485,16 @@
};

this.pickerGizmos = {
X: [
[
new THREE.Mesh(
new THREE.TorusGeometry(1, 0.12, 4, 12, Math.PI),
pickerMaterial
),
[0, 0, 0],
[0, -Math.PI / 2, -Math.PI / 2]
]
],
// X: [
// [
// new THREE.Mesh(
// new THREE.TorusGeometry(1, 0.12, 4, 12, Math.PI),
// pickerMaterial
// ),
// [0, 0, 0],
// [0, -Math.PI / 2, -Math.PI / 2]
// ]
// ],

Y: [
[
Expand All @@ -507,37 +507,37 @@
]
],

Z: [
[
new THREE.Mesh(
new THREE.TorusGeometry(1, 0.12, 4, 12, Math.PI),
pickerMaterial
),
[0, 0, 0],
[0, 0, -Math.PI / 2]
]
],
// Z: [
// [
// new THREE.Mesh(
// new THREE.TorusGeometry(1, 0.12, 4, 12, Math.PI),
// pickerMaterial
// ),
// [0, 0, 0],
// [0, 0, -Math.PI / 2]
// ]
// ],

E: [
[
new THREE.Mesh(
new THREE.TorusGeometry(1.25, 0.12, 2, 24),
pickerMaterial
)
]
],
// E: [
// [
// new THREE.Mesh(
// new THREE.TorusGeometry(1.25, 0.12, 2, 24),
// pickerMaterial
// )
// ]
// ],

XYZE: [
[
new THREE.Mesh(
new THREE.TorusGeometry(1, 0.12, 2, 24),
pickerMaterial
)
]
]
// XYZE: [
// [
// new THREE.Mesh(
// new THREE.TorusGeometry(1, 0.12, 2, 24),
// pickerMaterial
// )
// ]
// ]
};

this.pickerGizmos.XYZE[0][0].visible = false; // disable XYZE picker gizmo
// this.pickerGizmos.XYZE[0][0].visible = false; // disable XYZE picker gizmo

this.init();
}
Expand Down

0 comments on commit 2c5749d

Please sign in to comment.