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

Add left/right X & up/down Y ranges #24

Open
demark opened this issue May 31, 2012 · 1 comment
Open

Add left/right X & up/down Y ranges #24

demark opened this issue May 31, 2012 · 1 comment

Comments

@demark
Copy link

demark commented May 31, 2012

Hi, it would be great if we'll can specify for example:
<img src="..." data-lxrange="200" data-rxrange="50" data-uyrange="50" data-dyrange="0">

@cameronmcefee
Copy link
Owner

What would be the usecase for something like this?

Doing something like this would create some weird visual effects. Currently plax is set up so that the start location of each object is assumed to be at the 50% point of it's range. This means that there is an even movement velocity as the mouse travels from 0% to 100% across the browser. If you were to specify uneven ranges via the suggested method, the object would inherit one velocity for the left side of the range, and get a different velocity for the right side.

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

No branches or pull requests

2 participants