-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
feat: Introduce the FixedResolutionViewport
#2796
Conversation
Reposting here: HudButton.mp4 |
This has shown quite tricky to get clean code for, so I'm turning it to a draft. |
e53d419
to
adf5a95
Compare
CameraComponent.withFixedResolution
FixedResolutionViewport
packages/flame/lib/src/camera/viewports/fixed_aspect_ratio_viewport.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
Description
This enables you to zoom when using the
CameraComponent.withFixedResolution
constructor, without disabling the fixed resolution after doing so, by introducing a new viewport theFixedResolutionViewport
.Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Maybe slightly breaking for the people that have done work-arounds.
Related Issues
Closes #2776