Jump to content
Search Community

Can I use `render` when using MorphSVG v3 plugin with canvas?

larsvers test
Moderator Tag

Recommended Posts



When using MorphSVG on Canvas, I can choose between setting the render function:


  1. either globally with MorphSVGPlugin.defaultRender = draw
  2. or as part of the tween with the render property 


This works great in the example codepen:


See the Pen WYWZab by GreenSock (@GreenSock) on CodePen


based on gsap 2x and MorphSVG 0.92, however,  it doesn't seem to work with gsap 3x and MorphSVG 3x:


See the Pen ZEQopYr?editors=0010 by doldinger (@doldinger) on CodePen


Do I miss something obvious or how can I trigger the render function on a tween level in gsap v3x / MorphSVG v3x?


Many thanks for any help!

See the Pen ZEQopYr by doldinger (@doldinger) on CodePen

Link to comment
Share on other sites

Sorry about the confusion there - the problem was that by default GSAP's core will automatically find function-based values and swap in the values accordingly. So it found your "render" value as a function, called it, and used the RESULT as the actual value to feed in to MorphSVGPlugin. I just had to set a flag on the plugin itself to prevent that. The latest version should have it resolved. Please give it a shot and let us know if it works well for you. 

  • 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.
  • Create New...