cameronmcefee / plax

JQuery powered parallaxing
http://www.cameronmcefee.com/plax
MIT License
2.28k stars 206 forks source link

Configurable degrees of tilt for gyro parallaxing #44

Closed magebarf closed 11 years ago

magebarf commented 11 years ago

(Sorry, seems GitHub won't let me create a pull request without my merging of branches as an additional commit)

A easy change that I figured while restricting the range for the gyro was configurable range of tilt, as it today was hard coded to limit the range to a total of 60 degrees (30 degrees in each direction from the center position).

This will bring back options to do what was removed when restricting the range. With this change the same result can be achieved by increasing the x and y range for the objects, and instead increase the gyroRange value when enabling plax.

Also, while fixing this I noticed that the activity target was actually being set upon every mousemove event.

cameronmcefee commented 11 years ago

Sorry for dragging my feet on this. My email seems to have increased by an order of magnitude in the last month.

This looks awesome, particularly the tilt limit.

Also, while fixing this I noticed that the activity target was actually being set upon every mousemove event.

Lol, yeah that's a good call.