jonkwheeler / ScrollScene

ScrollScene is an extra layer on top of ScrollMagic as well as using IntersectionObserver to achieve similar effects.
https://scrollscene.jonkwheeler.now.sh/
MIT License
136 stars 9 forks source link

how to defined ScrollMagic server side #28

Closed rupesx26 closed 4 years ago

rupesx26 commented 4 years ago

How can we defined scroll magic at server side level

https://findmy-web.herokuapp.com/work here is the site

scrollscene used in work page for tiles animation but on page reload/refresh all tiles are hide due to there is no scrollscene SSR

note:- Have tried with scrollmagic also but its shown "window is not defined" how can we fixed this

Code

import { gsap, TimelineMax, TweenMax, Power1, Power4, Power0 } from 'gsap'; import { ScrollScene } from 'scrollscene';

jonkwheeler commented 4 years ago

ScrollMagic is a client-side based library. You can't run this on the server side. You have to run it on the client.

I gave examples for this in the README: https://github.com/jonkwheeler/ScrollScene#using-react