Jump to content
Search Community

Animation stops on browser resize.

buster808 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi, I have animation here https://xtracreative.co.uk/snow/

I tried putting on codepen but wouldn't work but will try again zzzzzzzz at mo.

 

The  snowboarder stops working on browser resize.

 

I used ScrollTrigger.scrollerProxy() with native maybe this is the issue.

 

How can i get round this.

 

I have used two svgs and scrolltriggers for the animation. I couldn't get it too work using one SVG.

 

Thanks

See the Pen mdWVKYq by buster808 (@buster808) on CodePen

Link to comment
Share on other sites

  • Solution

You weren't loading ScrollTrigger in that CodePen. Here's a fork with it loading: 

See the Pen eYvJbgG?editors=1010 by GreenSock (@GreenSock) on CodePen

 

Are you saying that after you resize, scrolling doesn't animate anything? Or are you saying that you want you smooth scrolling not to be interrupted by the resizing? If it's the latter, it isn't something that's officially supported and I'm not sure how feasible it would be. But in my fork, scrolling seems to work fine even after resize, but maybe I'm missing something. 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

After browser resize the snowboarder position goes off screen and most of the time stops moving on scroll,  everything else works fine, works again if I refresh the browser.

 

Think I might add refresh browser on resize script and stop on ipad/mobile.

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...