bevy_pancam icon indicating copy to clipboard operation
bevy_pancam copied to clipboard

Allow separate x-y scaling?

Open aldanor opened this issue 2 years ago • 2 comments

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)

aldanor avatar Sep 17 '23 13:09 aldanor

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.

johanhelsing avatar Sep 21 '23 09:09 johanhelsing

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).

aldanor avatar Sep 21 '23 13:09 aldanor