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

Allow separate x-y scaling? #46

Open
aldanor opened this issue Sep 17, 2023 · 2 comments
Open

Allow separate x-y scaling? #46

aldanor opened this issue Sep 17, 2023 · 2 comments

Comments

@aldanor
Copy link

aldanor commented Sep 17, 2023

This would be great for any scientific graphs/plots etc, where you may often zoom in only on x or only on y.

A typical way would be by allowing modifiers – e.g. wheel zooms by x, shift-wheel zooms by y, cmd-wheel zooms by both.

Not sure if it's feasible or not but figured I'd chime in anyways.

(Related: #45)

@johanhelsing
Copy link
Owner

I'm tempted to say it's out of scope, unless there is a very clean way to do this that neither complicates implementation nor public api.

@aldanor
Copy link
Author

aldanor commented Sep 21, 2023

I've tested out a static non-uniform scaling myself (basically by fixing #45 which requires changing 2 lines of code in pancam so it doesn't ignore scale when applying and reverting transforms), all it takes is setting .scale on the camera's transform.

Then it's just the question on binding x/y scaling to mousewheel controls and calling update functions at correct times.

But perhaps it's not the most common use case (useful for charting/plotting, not so useful for gamedev and such).

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

No branches or pull requests

2 participants