Hi!
I'm trying out the new GSAP (which looks absolutely bonkers, especially with regard to SVG manipulation) but I'm having a hard time understanding how to do some of the things I was able to do with the previous one
A couple examples:
Calling a function at some point within the timeline
This is something I was able to do with the .add method:
new TimelineMax()
// do something here
.add( function(){ callMeMaybe(); } )
// do something else there
I tried to use the method in the exact same way with the new gsap object, but that doesn't seem to work - reckon I'm doing something wrong here ?
new gsap.add( function(){ callMeMaybe(); } )
Tweening the value of an object
Previously, if I needed to tween a value for whatever reason I would just create an object and then manipulate it with Gsap:
let changemecontainer = {changethislilguy: 0 }
new TimelineMax().to(changemecontainer,1,{changethislilguy:30})
Again, I attempted to use the same process in Gsap 3, to no avail:
new gsap.to(changemecontainer, {changethislilguy:30, duration: 1})
Both attempts return me with the same error message - the method used "is not a function".
Uncaught TypeError: (intermediate value).to is not a function
Uncaught TypeError: (intermediate value).add is not a function
Any feedback would be more than appreciated!