Share Posted July 13, 2020 Hello! I am working to reveal this shape/outline via a mask ...specifically the rectangle shape, as it animates via motionPath the shape should reveal. This pen is set up to show the rectangle animating along its path (.path2) successfully, but when I place it within a mask ("theSquare"), motionPath breaks. Commenting in <defs> and <mask> within the linked pen will replicate the error. Can you help me understand why this is happening? Thank You! See the Pen xxZJgYd by bai-ee (@bai-ee) on CodePen Link to comment Share on other sites More sharing options...
Share Posted July 13, 2020 Hey Bryan and welcome to the GreenSock forums. If you open up the dev tools console you can see an error that says "Uncaught TypeError: t.getBBox is not a function". Using #theSquare instead of the containing <g> element seems to fix the issue: See the Pen XWXBZqw?editors=1000 by GreenSock (@GreenSock) on CodePen Side note: We don't recommend having any transforms on elements that you're animating with GSAP outside of GSAP. The most common mistakes article explains why. Link to comment Share on other sites More sharing options...
Author Share Posted July 13, 2020 Thank you for both pieces of insight! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now