Quick prerelease drop of this project in a 1.0 Beta (as I am on the road again) so you nice forum people can use the time to have a look. Proper example missing (anybody wants to chip in?).
Quick Summary (so far)
This extension aims at integrating scrollama (intersection observer based) and some other scroll related helper functions into Hype. When compiled properly, you would only need to include one JS-file. After that you can then use the attribute panel and custom behavior todo many things already (exit/enter events, directional exit/enter events, steps on same trigger). If you use a couple of new callback features you can even go further and use scroll progress features and more to come. See code and attribute panel for plans and settings for now.
Versionhistory 1.0 (Beta) Initial release under MIT-license 1.1 Some refactoring and scroll functions 1.2 Added hypeDocument.registerScrollCallback 1.3 Included dependencies and a minified version, Safari now supported
I have to use VPN to access it otherwise the browser will always in loading...
It would be great if you could include it into Hype since the speed always fluctuate a lot globally even it is delivered by CDN.
3#I did not found an fixed an element during scroll up and down.
Here is a quite similar feature request for it:
I believe it is really common demand.
4# Please take Enable width Scale setting and flexible layout into consideration, so that this work would flexibly fit more situations.
It is quite easy to achieve that in traditional webpage composer, but it is quite difficult in Hype especially in a long height project.
6# Enable/disable scrollY visible or readable.
In Most case, it is too complicated for designers without software coding background to set a element position in cross purpose case. Since we do not know how to understand the relative or absolute position.
It would be much helpful during Hype project working by Enable that feature, and disable it when it completed.
Safari needs a polyfill for Intersection Observer to work loaded from unpkg. Will be included later
See first
Read the code comments as suggested in the description. Is planned but not in the beta
If scale puts Intersection Observer off (haven’t tested that) then there is little I can and will do about it. Just don’t use it on the objects triggering stuff then I guess. A thing I am planning on doing is exploring Resize Observer.
Full height is part of Hype and will not be included (see Hype pinning/sizing etc.). This is just a trigger helper
Not sure what you mean but the library doesn’t work with scrollY it is based on Intersection Observer (please read about)
Still not happy with the progress callback handlers in hypeDocument. Will probably refactor them with a registerCallback function. Also progress callback handlers in elements with hidden overflow only react correctly if on screen!
This document is just for testing. I used the mentioned elements for testing but then not anymore and put them at the bottom of the document. If everything is working fine now, one can start creating a more appealing example/test-case.
This code is provided as is and not for beginners. Please study the file. If that is beyond your scope of understanding then please use the official function in Hype based on waypoints (enter view and exit view etc.).
I understand how the blue and green trigger work, but I do not understand how the red trigger works by custom behavior, I added a new black trigger to trigger a new timeline named “black”, but it not work.
It would be great if you let me know how the red trigger work,or make the black trigger work too, Please check the document, thanks for in advance. HypeScrollKit_by_Alex.hype.zip (62.6 KB)
The names of custom behaviors much be as:
black_1_exit_up
black_exit_down
The only problem for me now is how to trigger the elements animation at the fixed/sticky position once upon the elements reach/move out the observer trigger.
To achieve this purpose, it maybe need some code to trigger/change the elements from absolute to fixed, and then change back to absolute after animation.
It would be great if someone would like to help.
By the way, I note it support scrolling symbols, is it possible to support scrolling group of elements on specific timeline too please?