Jump to content
Search Community

show gsap: parallax intro (works on mobile)

Guest Vic_
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

post-45475-0-77997900-1473047598_thumb.png

post-45475-0-77997900-1473047598.png

I'm too tired tonight to make a code pen, but here is how I did parallax. I did not use scrollmagic, I had some issue.

 

Step 1: get the tweens to work just by self, w/o triggers.
For example, on click.
Only once that is tested work on triggers, after tweens work.



Step 2: Load your trigger lib, Waypoints should work also, but you can see I used http://vissense.github.io/vissense
Note it is best to trigger on another element, not the one you are tweening - so you need to track 2 things: trigger element and tweened element.
Test in console that your trigger work(console.log) and for mobile use the 'USB debug' - it's easy to debug mobile!!!!!
You can see this code run on http://masons-foundation.org/en/about/about page, the bottom address tweens.


Step 3: Of course you should get a lot more elements moving, z-index, .png transparent and maybe use background-attachment: fixed. Happy to hear comments on any of these examples as far as ideas.

 
hth,
Vin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...