First implementation for DeviceMotionEvent #32

wants to merge 9 commits into


None yet
2 participants

kersten commented Apr 17, 2012

These changes will make your plugin work with devices that have an gyroscope. If you move the device the parallax effect will be visible.

Known bugs:

  • The initial position of the layers are not calculated, so there is a white space visible on the left side.
  • The demos with the buttons are not working correctly.
  • The minified version is nit updated.

I try to finish the bugs in my spare time.



stephband commented Apr 17, 2012

This is interesting, thanks for this.

I'm not going to merge it straight away, because:

  • It appears to make a choice between using motion events OR mouse events. I think both should be enabled. In fact, I can think of cases where you would want to use parallax without motion events on devices that do have them enabled, so I think motion event support should be an option. (As an aside, I'm working on touch events, and there we definitely don't want an either/or choice).
  • Stylistic changes (such as changing all instances of 'jQuery' to '$') are not necessary.

I'm going to study what you've done here and try and implement device motion events as an option. Great idea.

kersten commented Apr 17, 2012

This is ok. I know that styling was not necessary, but my IDE did it by itself, sorry for that.

I want to fix some more stuff tonight, maybe that could be interesting for you too. Eventually I will integrate the option for enabling disabling too.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment