I am useing Node.js and sailsjs
I want to use ScrollMagic ( http://janpaepke.github.io/ScrollMagic/ ) in my work, to make use of the scrollbar (parallax and such).
I haven't been able to understand from the documentation of both just how to enable the functions.
I tried "npm install scrollmagic" in my app's folder and I also tried manually copying the .js files into both my assets/js and my assets/js/dependancies.
Both did not seem to do make it work.
This is my repository on github https://github.com/yhattav/Vitae
Thanks for your time and help! Yonatan.
This is what I found in the documentation:
To implement animations, ScrollMagic can work with multiple frameworks. The recommended solution is the Greensock Animation Platform (GSAP) due to its stability and feature richness. For a more lightweight approach the VelocityJS framework is also supported. Alternatively custom extensions can be implemented or the necessity of a framework can be completely avoided by animating simply using CSS and class toggles.
So you need to go here: http://greensock.com/gsap and download the TweenMax
library and add it as a js dependency to your project's assets.
Plus, you have a small typo in your main.js file: ScrollMagic.scene
should be with a capital s, like this ScrollMagic.Scene
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.