Jump to content
GreenSock

hesonline

Simple MorphSVG Not Working

Go to solution Solved by Carl,

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

I couldn't get a simple MorphSVG to work in my project, so I copied snipets from my code and put it in a codepen. It works fine there.

 

The svg loads fine, and I hide the part I want to morph to fine. But when I run the TweenMax (which I confirmed is being hit in the code) nothing happens. No errors, nothing else breaks, just nothing happens.

 

I don't get any console errors.

jQuery, TweenMax, and MorphSVG are all included properly and the files are in sources.

See the Pen xZVOXe by smith46j (@smith46j) on CodePen

Link to comment
Share on other sites

Hello hesonline, and Welcome to the GreenSock Forum!

  • In your project are you loading the latest version of GSAP?
  • What are the GSAP scripts you are loading in your project?

Please paste the code here so we can see what scripts and versions your running in your project versus codepen

 

Thanks :)

Link to comment
Share on other sites

The full code is way too large to post in forum. But the parts in codepen are directly from my project. (besides css)

I even redownloaded gsap and switched out the folders.

 

I'm using: 

  • TweenMax.js
  • ThrowPropsPlugin.min.js
  • Draggable.js
  • DrawSVGPlugin.min.js
  • MorphSVGPlugin.min.js
Link to comment
Share on other sites

Thanks.. Yeah i only meant the script like you posted above.. do you mind also giving us the version of each.. so we can check against, to make sure those are not the special codepen versions of those GSAP scripts.

 

And are those scripts loaded locally or via a CDN?

  • Like 1
Link to comment
Share on other sites

They're all loaded locally.

<script src="bower_components/gsap/src/uncompressed/TweenMax.js"></script> <!-- VERSION: 1.17.0 -->
<script src="bower_components/gsap/src/minified/plugins/ThrowPropsPlugin.min.js"></script> <!-- VERSION: 0.9.9 -->
<script src="bower_components/gsap/src/uncompressed/plugins/Draggable.js"></script> <!-- VERSION: 0.14.0 -->
<script src="bower_components/gsap/src/minified/plugins/DrawSVGPlugin.min.js"></script> <!-- VERSION: 0.0.7 -->
<script src="bower_components/gsap/src/minified/plugins/MorphSVGPlugin.min.js"></script> <!-- VERSION: 0.8.0 -->
Link to comment
Share on other sites

  • Solution

You need to use TweenMax version 1.18.0 

  • Like 2
Link to comment
Share on other sites

That did it. Looking through the files I updated before it looks like I updated TimelineMax when I re downloaded everything -- Even though I don't use it in the project. Oops. Thanks guys!

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