javascript - Cross-dissolve transition for scrolled elements -
i creating long single page website , using scrollmagicjs v1.3.0 trigger events , make elements sticky. create variety of other transition effects 1 scrolls down page.
here's jsfiddle replicates horizontal scrolling of site.
scrollcontrol = new scrollmagic({ vertical: false, }); var myscrollscene = new scrollscene({ triggerhook: 0, offset: 0, triggerelement: '#shot-0-1', duration: '100vw', pushfollowers: true }) .setpin('#shot-0-1') .addto(scrollcontrol);
for instance, want create fade-to-black, flare-to-white, , cross-dissolve transitions between pages.
i understand of basic principles of html5 transitions, how make 1 image dissolve another, haven't been able figure out clever way using scrollmagic scrolling.
things i've considered: next page slides under current page , transitions 1.0 0 opacity using scrollmagic triggers?
but how in way non-hacky , consistent scrollmagic's framework?
this has been asked , answered in scrollmagic's issues section: https://github.com/janpaepke/scrollmagic/issues/269
here's copy:
a common misconception need scrollmagic pin functionality. if content isn't moving within scroll flow anyway (it stays in position , faded out or moved side or sth. that) can have "fixed" right beginning. saves lot of work , confusion.
the reason use scrollmagic's pinning functionality when element should scroll naturally dom , shouldn't.
so if have elements in place , should replaced others, have them fixed whole time. this: https://jsfiddle.net/janpaepke/6kyd6ss0/1/
if indeed case should use scrollmagic's pinning method, animation inside of wrapper, pin. this: https://jsfiddle.net/janpaepke/6kyd6ss0/3/
Comments
Post a Comment