mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-19 22:10:53 +01:00
Review: no hardcoded limit. The two MAX_TARGET constants are gone.
- Engine: CameraPrefs { pan_limit, pan_speed } with the defaults in one
place (Default: 5 mesh radii, speed 1), sanitized against NaN and
negative values. Session::set_camera_prefs stores them and pulls the
orbit target back inside a lowered limit; view.3d clamps targets to it;
session.inspect shows it.
- App: Prefs.camera persists with the other preferences (older saved
preferences load the defaults), apply_prefs pushes it into the session,
and Edit > Preferences has "3D pan limit" and "3D pan speed" sliders.
The drag uses the pan speed.
- Renderer: no limit of its own. camera() falls back to the scene center
for a non-finite target and pan() returns the unbounded offset.