Jump to content
Search Community

ScrollMagic GSAP SVG Mask Bug

helden test
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

Hi and welcome to the GreenSock forums.

 

Thanks for the demo.

I don't have an iOS11 device handy but I would suggest you reduce the demo even more.

Just try to set the height on that element without GSAP and see if it works like:

 

maskPath = $('#path-1');
maskPath.attr("height", "1280")

 

I know it some cases it is recommended not to animate things in <defs> tags as some browsers don't update changes, not sure of the particulars.

My hunch this is a bug on the browser side and not GSAP.

 

Someone else may have some more insight.

  • Like 1
Link to comment
Share on other sites

I've experienced the same issue you have right now. but it only happens when I create SVG in HTML document. (Like copy paste SVG from illustrator or svgomg, and  also coding SVG data by hand without concerning browser compatibility ) I know its kind of wired. but to solve my problem I used SnapSVG plugin to create and animate SVG element with GSAP. specially masking and clipping related animations. and it can handle browser compatibility pretty well. but like @Carl sed before try to avoid <defs> data animation as much as possible. this might not be the correct solution but I suggest you to give it a try and see. but for me, the SnapSVG plugin work well with every desktop and mobile browsers.

  • Like 1
Link to comment
Share on other sites

Hello @Carl, Hello @Jack, Hey @Yashi-2

 

 

Manual animation (click the button in the CodePen demo) works. It just does not work synced to the scroll. 

I will try a workaround the <defs> Animation. Will post an Update here. 

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