Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.53k stars 3.49k forks source link

Percentage visible / dynamic elements? #39

Closed andrewmartin closed 12 years ago

andrewmartin commented 12 years ago

Hi there, sorry for the issue bomb, but figured I would ask while it was on my mind.

Say I have several 'full screen panels' that each are to fill the entire screen, based on the window size; therefore the position of each of the panels can vary based on different monitor / window sizes.

How would you suggest I perform animations on objects within these panels as you enter / leave them? Maybe easier to just scrap the full screen height of each of the panels and set them to hardcoded values, yes?

You can see what I'm referring to on my personal site I hacked together this week. The first panel (my photo) is set to fill the window area (try resizing the window to see what I mean).

http://www.andrewmart.in

Just thought I'd reach out and see if you had any suggestions for a solution.

andrewmartin commented 12 years ago

Also, love the plugin. Smooth :sailboat:

Prinzhorn commented 12 years ago

Thank you.

I guess you'll love 0.4 : https://github.com/Prinzhorn/skrollr/issues/34

Does this answer your question? You will then be able to animate elements for example as soon as they enter or leave the viewport.

You can clone the anchor branch and check out examples/anchors.html if you want to. Still WIP.

andrewmartin commented 12 years ago

Alexander,

Just wanted to say THANK YOU For your very thorough responses! I haven't had a chance to work on my project but I will be starting soon. I did notice that anchors were added, which is truly awesome. Are those working pretty well and tested I presume (e.g. ready for production) then?

Thanks again for this truly incredible plugin.

On Wednesday, July 4, 2012 at 2:36 AM, Alexander Prinzhorn wrote:

Thank you.

I guess you'll love 0.4 : https://github.com/Prinzhorn/skrollr/issues/34

Does this answer your question? You will then be able to animate elements for example as soon as they enter or leave the viewport.

You can clone the anchor branch and check out examples/anchors.html if you want to. Still WIP.


Reply to this email directly or view it on GitHub: https://github.com/Prinzhorn/skrollr/issues/39#issuecomment-6755305

Prinzhorn commented 12 years ago

You're welcome.

Anchors are neither 100% working nor fully tested. That's why they are not in master branch and skrollr is still on 0.3.11. As soon as they are finished I will release 0.4 with some other changes as well.

Prinzhorn commented 12 years ago

I close this issue since the progress of the same feature is being tracked in #34.