Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and improve component API with f32 infinities #62

Merged
merged 6 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 4 additions & 4 deletions examples/camera_scaling_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ fn setup(mut commands: Commands) {
commands.spawn((
cam,
PanCam {
min_x: Some(-10.),
max_x: Some(10.),
min_y: Some(-10.),
max_y: Some(10.0),
min_x: -10.,
max_x: 10.,
min_y: -10.,
max_y: 10.0,
..default()
},
));
Expand Down
10 changes: 5 additions & 5 deletions examples/clamped_borders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ fn setup(mut commands: Commands) {
Camera2dBundle::default(),
PanCam {
// prevent the camera from zooming too far out
max_scale: Some(40.),
max_scale: 40.,
// prevent the camera from zooming too far in
min_scale: 0.5,
// prevent the camera from panning or zooming past x -750. -750 was chosen to display both the edges of the
// sample image and some boundary space beyond it
min_x: Some(-750.),
min_x: -750.,
// prevent the camera from panning or zooming past x 1750. 1750 was chosen to show an asymmetric boundary
// window with more space on the right than the left
max_x: Some(1750.),
max_x: 1750.,
// prevent the camera from panning or zooming past y -750. value chosen for same reason as above
min_y: Some(-750.),
min_y: -750.,
// prevent the camera from panning or zooming past y 1750. value chosen for same reason as above
max_y: Some(1750.),
max_y: 1750.,
..default()
},
));
Expand Down
2 changes: 1 addition & 1 deletion examples/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn setup(mut commands: Commands) {
Camera2dBundle::default(),
PanCam {
// Set max scale in order to prevent the camera from zooming too far out
max_scale: Some(40.),
max_scale: 40.,
// Set min scale in order to prevent the camera from zooming too far in
min_scale: 1.,
..default()
Expand Down
Loading
Loading