Appearance
Zoom
Camera zoom controls. Frame the viewport camera onto scene geometry — mirrors the canvas zoom menu ("Zoom extents" / "Zoom to selection"). Accessed via snaptrude.core.zoom.
Functions
extents()
Zoom (fit) the camera to all geometry in the scene — the "zoom extents" action.
- Returns:
boolean—trueonce the camera has been framed to the scene.
ts
await snaptrude.core.zoom.extents();selection()
Zoom (fit) the camera to the current selection.
- Returns:
boolean—trueif there was a selection to frame;falseif nothing is selected (no-op).
ts
await snaptrude.core.zoom.selection();Errors
Failed calls reject with a typed PluginError — see Error Handling. This namespace has no specific error conditions: both methods are total — selection() reports an empty selection as false, never an error.