Jump to content
GreenSock

gotaquestion

Error: <path> attribute d: Expected number, "M0,0C"

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

the codepen works exactly the way I want.

the animation disappears after it is done.

However, I do get some errors in the console.

rror: <path> attribute d: Unexpected end of attribute. Expected number

Error: <path> attribute d: Expected number, "M0,0C"

so I'm wondering what the correct way to do it.

See the Pen OWmWKw by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi gotaquestion :)

 

Why are you morphing to an empty path? Couldn't you just tween or set the autoAlpha to 0 and accomplish the same thing?

 

Happy tweening.

:)

  • Like 1
Link to comment
Share on other sites

Unless you want it to actually morph back to those coordinates, in which case you would need to add another command to make the plugin happy.

d="m0,0v0"
  • Like 2
Link to comment
Share on other sites

@pointc, I'm morphing to empty path because in that scene div is used again later in the timeline to show another animation. However, I need the first animation to disappear and then later in time display a completely different morph in that div. (fyi, I have multiple div's in the same scene over time). I tried the autoalpha but it morphed the two together.

 

@OSUblake, I tried your idea d="m0,0v0" but that just morphed the polygon from the 0,0 to its position.

Link to comment
Share on other sites

You could place that empty path where the other one is, like d="m260,187v0". It's gotta morph from something somewhere :)

  • Like 2
Link to comment
Share on other sites

fyi, @greensock, I tried d="m260,187v0" but it just shrinks it finally disappearing but I need it to immediately disappear. 

Link to comment
Share on other sites

Oh, then you're not morphing - you can just set visibility:"hidden", right? Or autoAlpha:0? Do a set() or a to() with a zero duration. Make sense? 

  • Like 1
Link to comment
Share on other sites

Yep - that's why I mentioned setting the autoAlpha back in post #2.  ;)

 

Your response mentioned needing to use the div again later, but you don't have to autoAlpha the entire div in which that path resides. You could just hide the path. Even if you did hide the entire div, you could easily set() the autoAlpha back to 1 when you need it again. I'm just confused about why this won't work for you.  :blink:

  • Like 2
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.
×