didkumi Posted April 29, 2021 Share Posted April 29, 2021 Is this a normal behavior? for anim tween's property to be set before it is called? I expect the initial value to be a value I've set in the dom but during the first scroll enter "#circle2" already has radius which I have no idea how to resolve. I've tried setting a fromTo tween and set immediateRender to false but won't work. I thought I read forums saying gsap will always try to start from an initially set value.. Can anyone help? See the Pen LYxvrOp by 1jiky (@1jiky) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted April 29, 2021 Share Posted April 29, 2021 Hi, The set() instance you're creating is actually active, so as soon as the browser finish going through the code, the circle's radius attribute is updated. That instance has to be paused: const anim = gsap.set("#circle2", { attr: { r: 330 }, paused: true, immediateRender: false }); Happy Tweening!!! 2 Link to comment Share on other sites More sharing options...
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