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

add support for custom viewport rects in bevy integration #55

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

ThomasAlban
Copy link
Contributor

closes #54.

@@ -88,6 +87,10 @@ pub struct GizmoOptions {
/// using a single gizmo. If `false`, each target
/// has its own gizmo.
pub group_targets: bool,
/// Allows you to provide a custom viewport rect, which will be used to
/// scale the cursor position. By default, this is set to `None` which means
/// the full window size is used as the viewport.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks great! I might change the wording here a bit, since one might assume that simply by setting the custom viewport rect, they can render the gizmo to the specified rect (even though it does say "will be used to scale the cursor position"). Technically the full window size is still used as the viewport, but only the interaction is affected.

@urholaukkarinen urholaukkarinen merged commit 63d8aae into urholaukkarinen:main Apr 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for custom viewport size in bevy integration
2 participants