Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First implementation for DeviceMotionEvent #32

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kersten
Copy link

@kersten 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.

Greetings

@stephband
Copy link
Owner

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
Copy link
Author

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.

Greetings

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

Successfully merging this pull request may close these issues.

2 participants