feat(ui): offer a cube navigator alongside signed axes (#664)

Adds a View navigator preference (Navigation page) with an optional cube navigator alongside the signed axes, which stay the default (#165).
This commit is contained in:
Karl Von Richter authored and GitHub committed 2026-10-13 09:28:52 -04:00
1 parent aa24d9f071
commit 7b34d57b25
15 files changed
+1344 -93

No files matched your search

@@ -0,0 +1,65 @@
[
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
{
"note": "Cube facets own one highlight at a time and choose principal views."
},
{
"call": "ui.view",
"params": {
"view": "home"
}
},
{
"move": {
"handle": "navigation_cube:top"
}
},
{
"expect": {
"count": {
"name": "axis_view_highlights",
"value": 1
}
}
},
{
"click": {
"handle": "navigation_cube:top"
}
},
{
"expect": {
"camera": {
"yaw_deg": 0,
"pitch_deg": 90
}
}
},
{
"click": {
"handle": "navigation_cube:control:down"
}
},
{
"expect": {
"camera": {
"yaw_deg": 0,
"pitch_deg": 0
}
}
},
{
"move": [
800,
500
]
},
{
"expect": {
"count": {
"name": "axis_view_highlights",
"value": 0
}
}
}
]
@@ -0,0 +1,74 @@
[
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
{
"note": "Cube top/bottom face clicks preserve the nearest square heading in each up frame."
},
{
"camera": {
"yaw": -2.356194490192345,
"pitch": 0.6154797086703874
}
},
{
"click": {
"handle": "navigation_cube:top"
}
},
{
"expect": {
"camera": {
"yaw_deg": -90,
"pitch_deg": 90
}
}
},
{
"camera": {
"yaw": 2.9670597283903604,
"pitch": -0.6
}
},
{
"click": {
"handle": "navigation_cube:bottom"
}
},
{
"expect": {
"camera": {
"yaw_deg": 180,
"pitch_deg": -90
}
}
},
{
"call": "ui.prefs",
"params": {
"up_axis": "y"
}
},
{
"camera": {
"yaw": -1.3962634015954636,
"pitch": 0.6
}
},
{
"click": {
"handle": "navigation_cube:top"
}
},
{
"expect": {
"camera": {
"yaw_deg": -90,
"pitch_deg": 90,
"back": [
0,
1,
0
]
}
}
}
]
@@ -0,0 +1,54 @@
[
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
{
"note": "Cube face names follow the up-axis frame; with Y up, Top looks from +Y and Front from +Z."
},
{
"call": "ui.prefs",
"params": {
"up_axis": "y"
}
},
{
"call": "ui.view",
"params": {
"view": "home"
}
},
{
"click": {
"handle": "navigation_cube:top"
}
},
{
"expect": {
"camera": {
"yaw_deg": 0,
"pitch_deg": 90,
"back": [
0,
1,
0
]
}
}
},
{
"click": {
"handle": "navigation_cube:control:down"
}
},
{
"expect": {
"camera": {
"yaw_deg": 0,
"pitch_deg": 0,
"back": [
0,
0,
1
]
}
}
}
]