pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Pinch to zoom

Open alterae opened this issue 1 year ago • 1 comments

When using a trackpad, it would be nice to have the ability to zoom in and out with a pinch gesture, like in many other programs. No clue how easy or hard this would be to implement, though.

alterae avatar Aug 07 '24 23:08 alterae

I believe what this comes down to is support built into GLFW and currently GLFW doesn't have any support for pinch gestures.

@slimsag would know more I'm sure, but as mach will be moving away from GLFW there's a chance that at least on macOS or certain platforms that pinch gestures could be supported in the future, but I think it will be a while before we end up getting to something like that.

foxnne avatar Aug 08 '24 13:08 foxnne

Fun times ahead! The updated_mach branch is getting some work, and I'm actively developing some of the platforms using pixi as a test program. I have implemented pinch to zoom support in mach, as we have now removed GLFW and are writing our own windowing code. So once this PR merges, and the mach PR's are merged, we will have pinch to zoom support. I still need to make zooming center on the mouse location, but the events are there.

foxnne avatar Dec 12 '24 16:12 foxnne

Pinch to zoom is supported now, and correctly offsets camera location based on mouse pointer location

foxnne avatar Dec 26 '24 14:12 foxnne