wagerfield / parallax

Parallax Engine that reacts to the orientation of a smart device
http://wagerfield.github.io/parallax/
Other
16.46k stars 2.14k forks source link

Jump when going from positive to negative values #249

Open SteveEdson opened 6 years ago

SteveEdson commented 6 years ago

Example video: https://www.youtube.com/watch?v=RgIh_aHAp4Q&feature=youtu.be

When tilting the phone beyond the vertical point, the scene jumps to an extreme and the edges of the layers are visible. Happening on all devices, Android phones, iPad, iPhone X etc.

reneroth commented 6 years ago

Thank you for taking the time to record this video and file this issue :) I'm unfortunately really short on time right now, but will try to find at least some kind of solution for this in the future. Still have to do more testing, since the values tend to behave differently from device to device and I'm not yet sure how we could calibrate for this.

As always, any helpful ideas or suggestions are highly encouraged!

Lacika1981 commented 5 years ago

It has been a problem to me as well. However the bug is still exists but with the limit(x, y) method you can prevent the jump.

var parallaxInstance = new Parallax;
parallaxInstance.limit(20, 20);
avdeev commented 5 years ago

I reproduce this bag. Trick with limit doesn't work for me.