forked from 1b-agent/fieldcraft-upstream
Navigation: orbit about the point under the cursor, zoom toward it, presets in the display menu
An orbit turns about the model point under the press (the pick ray's first hit on the plot, the mesh or the design), or the centre of what is drawn when it starts on empty space, keeps that point still on screen and marks it while orbiting. The wheel and a pinch zoom toward the point under the cursor; the wheel's delta is read as it arrives, so a notch zooms in full in orthographic and perspective views alike (#273). Mouse presets and reverse zoom come from SolidCraft (prefs.rs NavPreset, NAV_PRESETS; MIT OR Apache-2.0): FieldCraft's own (left drag per the navigation bar) stays the default, Ctrl + left drag from empty space orbits in every preset. They are chosen in the display menu, settable with ui.set and kept in prefs.json beside recent.json (the browser build keeps them for the page's run); an older prefs.json still loads. Fixes #262, fixes #273. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
f074e10442
commit
3aab588b8b
8 files changed
+480
-20
No files matched your search
@@ -188,6 +188,8 @@ fn services(inbox: Inbox, ctx: egui::Context) -> Services {
|
||||
pick_save: Some(Box::new(|name: &str, _: &[Filter]| Some(page_path(name)))),
|
||||
// The recent list holds the page's files, which go with the page.
|
||||
recent_path: None,
|
||||
// Preferences last for the page's run.
|
||||
prefs_path: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ fn services() -> Services {
|
||||
})),
|
||||
// Beside the recovery folder in the per-user data folder.
|
||||
recent_path: fieldcraft_io::recovery::default_dir().and_then(|d| d.parent().map(|p| p.join("recent.json"))),
|
||||
prefs_path: fieldcraft_io::recovery::default_dir().and_then(|d| d.parent().map(|p| p.join("prefs.json"))),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user