react-gsap-enhancer
react-gsap-enhancer copied to clipboard
Not run the animation when the page is loading
Hello,
Actually, i added the animation to a variable but when the page is loading the animation is run but i just want to run the animation in future handler not when the page is loading. Is that possible ?
This is working but i do not want to the animation run immediately.
componentDidMount(){ window.animCircleNext = this.addAnimation(createAnim2Test) }
Regards.
You may want to put a .pause()
in your createAnim2Test
tween and then in componentDidMount
do something like:
componentDidMount(){
var animCircleNext = this.addAnimation(createAnim2Test);
// Do whatever you need to before animation plays...
animCircleNext.play()
}