Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/camera/sidescroll2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ impl PanZoomCamera2d {
self.update_projviews();
}

/// Gets the zoom step of the camera.
pub fn zoom_step(&self) -> f32 {
self.zoom_step
}

/// Sets the zoom step of the camera.
pub fn set_zoom_step(&mut self, new_zoom_step: f32) {
self.zoom_step = new_zoom_step;
}

/// Move the camera such that it is centered on a specific point.
pub fn look_at(&mut self, at: Vec2, zoom: f32) {
self.at = at;
Expand Down