larsvers Posted July 8, 2020 Posted July 8, 2020 Hello, When using MorphSVG on Canvas, I can choose between setting the render function: either globally with MorphSVGPlugin.defaultRender = draw 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.
GreenSock Posted July 8, 2020 Posted July 8, 2020 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. 2
larsvers Posted July 8, 2020 Author Posted July 8, 2020 Works very well! Thanks a lot for your quick response - truly impressive!! 1
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