Jump to content
Search Community

Activate the morphSVG pluggin

Korben Dallas test
Moderator Tag

Recommended Posts

Hello guys, I've recently purchased the "shockingly green" package, unfortunatly i'm not able to make the morphSVGPluggin works.

 

Here are my scripts :

 

<script src="gsap-shockingly-green/minified/MorphSVGPlugin.min.js"></script>
<script src="gsap-shockingly-green/minified/gsap.min.js"></script>

 

Here is the console warning :

"Invalid property morphSVG set to #star Missing plugin? gsap.registerPlugin()"

 

Thank's for your help guys :)

Link to comment
Share on other sites

Technically you're supposed to register the plugin like:

 

gsap.registerPlugin(MorphSVGPlugin); 

If you load the minified files in the order Zach said, it attempts to do that for you automatically, but we still encourage registering things manually as a good practice. 👍   It's necessary in ES Module environments and build tools, especially to avoid tree shaking problems. 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

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