Skip to content

Commit

Permalink
Add labels to negative axes, as requested in #173
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeicor committed Sep 25, 2024
1 parent 4b0fdd3 commit b2f9880
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/tools/OrientationGizmo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ function createGizmo(expectedParent: HTMLElement, scene: ModelScene): HTMLElemen
let gizmo = new OrientationGizmoRaw.default(scene.camera, {
size: expectedParent.clientWidth,
bubbleSizePrimary: expectedParent.clientWidth / 12,
bubbleSizeSeconday: expectedParent.clientWidth / 14,
fontSize: (expectedParent.clientWidth / 10) + "px"
bubbleSizeSeconday: expectedParent.clientWidth / 12,
fontSize: (expectedParent.clientWidth / 10) + "px",
});
// Make sure all bubbles are labeled
for (let bubble of gizmo.bubbles) {
bubble.label = bubble.axis.toUpperCase();
}
// HACK: Swap axes to fake the CAD orientation
for (let swap of [["y", "-z"], ["z", "-y"], ["z", "-z"]]) {
let indexA = gizmo.bubbles.findIndex((bubble: any) => bubble.axis == swap[0])
Expand Down

0 comments on commit b2f9880

Please sign in to comment.