Skip to main content

zoom_toward

Function zoom_toward 

Source
pub fn zoom_toward(camera: &mut ViewCamera, factor: f64, cx: f64, cy: f64)
Expand description

Zoom by factor while keeping the world point under the cursor fixed — “zoom toward the mouse”. cx,cy are cursor CSS px (top-left origin).