rdgAtl Posted September 2, 2020 Share Posted September 2, 2020 Greetings all, I'm working on a project and would like to use the code from this pen as a starting point for what I would like to accomplish. However, when I download the pen and update the gsap library to the latest and greatest version, the emitter on shoots one single particle then stops. Checked my console and no errors are being thrown. Any ideas what I need to edit in order to make this work correctly? Thank you, Renard See the Pen rJtjw by jamiejefferson (@jamiejefferson) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted September 2, 2020 Share Posted September 2, 2020 Hey Renard. I think the GSAP 3 Migration Guide and, if necessary, the Release Notes can help you get up to speed on GSAP 3. If you're still running into issues, please create a minimal demo of the issue using something like CodePen Link to comment Share on other sites More sharing options...
rdgAtl Posted September 2, 2020 Author Share Posted September 2, 2020 22 minutes ago, ZachSaucier said: Hey Renard. I think the GSAP 3 Migration Guide and, if necessary, the Release Notes can help you get up to speed on GSAP 3. If you're still running into issues, please create a minimal demo of the issue using something like CodePen Thanks Zach! Looking through the documentation and I can't see any syntax that I over looked(?) Here is a basic pen of my problem. As you can see, it fires only a single particle one time... See the Pen YzqrYQm by rizzy3000 (@rizzy3000) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted September 2, 2020 Share Posted September 2, 2020 Good work! I think this might be a minor bug with zero duration timelines being repeated. If you add a tween with a really small duration it fixes the issue: gsap.timeline({repeat: -1}).to({}, {duration: 0.001}).call(shootDot, [emitter], null, 2 / dotQuantity); See the Pen RwaLxyP?editors=0010 by GreenSock (@GreenSock) on CodePen Side note: I also switched out the random function for GSAP 3's built in random utility method. Link to comment Share on other sites More sharing options...
PointC Posted September 2, 2020 Share Posted September 2, 2020 Looks like .call is different from v2 and v3. No scope listed in the parameters for v3. var explosion = gsap.timeline({repeat: -1}).call(shootDot, [emitter], 2 / dotQuantity); See the Pen 857d70e01ab3737d21c8843ad5167a0f?editors=1010 by PointC (@PointC) on CodePen 1 Link to comment Share on other sites More sharing options...
rdgAtl Posted September 2, 2020 Author Share Posted September 2, 2020 You guys are all ROCK STARS! Thank you very much for this! Best Regards, Renard 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