jdf / peasycam

Dead-simple mouse-driven camera for Processing
http://MrFeinberg.com/peasycam/
Apache License 2.0
116 stars 35 forks source link

Lion Reverse Scrolling #9

Closed eljeffeg closed 13 years ago

eljeffeg commented 13 years ago

So Mac OS Lion set by default "Natural" scrolling, which flips the zoom. It would be easy enough to detect Mac OS < 10.7 uses normal and >= flips it, but you can turn this feature off. I have, love it on IOS, but it's annoying on the Mac. So I'm not sure if there is any way to detect this, but I thought I would mention it.

Side Note: Also, was wondering if you ever had a chance to look at my changes (my fork). I've become dependent on many of them, so I'm really hoping they make it into the official version. One feature that I did add that I don't use, so I would be fine with removing it, would be the pan on edge screen. I think it's a cool feature, but it's not something I use personally, so I wouldn't cry about it if you choose not to include it. I know there is a balance between keeping it simple and adding new features.

jdf commented 13 years ago

I did look at your patch, but find that it adds too much complexity for a feature that I don't understand, so i have to respectfully decline it.

eljeffeg commented 13 years ago

Jon, I never created a patch for Lion Reverse scrolling.

The changes in the fork were the following features. The only one that is complicated is the pan on screen edge, which could be removed if it's too much.

camera.setZoomScale(double scale); // 1.0 by default camera.setRotationScale(double scale); // 1.0 by default camera.setPanScale(double scale); // 1.0 by default

double getZoomScale(); double getRotationScale(); double getPanScale();

camera.setDamping(double rotate, double zoom, double pan); // default 1,1,1 camera.setPanOnScreenEdge(boolean panOnScreenEdge); // default false camera.setPanOnScreenEdge(boolean panOnScreenEdge, boolean panEdgeReverse); //reverses pan direction when true

camera.lookThrough(double x, double y, double z); camera.lookThrough(double x, double y, double z, long animationTimeInMillis); camera.lookThrough(double x, double y, double z, double distance); camera.lookThrough(double x, double y, double z, double distance, long animationTimeInMillis);

camera.getMinimumDistance(); camera.getMaximumDistance();

camera.isMoving(); // returns true or false camera.setRotations(double pitch, double yaw, double roll, long animationTimeInMillis);