Jump to content
Search Community

Add dummy to end of timeline?

swampthang test
Moderator Tag

Go to solution Solved by OSUblake,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

The codepen has a tween/timeline that's 1 second. Clicking the record button steps through the animation and snaps 60 PNGs per second - so there are 60 images. The last bit of the Circ.easeIn is so fast that it doesn't make it into the collection of images. I hate to increase above 60/sec. Is there any way to add a little padding onto the end of the timeline so that last snapshot gets the end of the animation?

 

In the codepen, when you click the record button, you see the images dropping in below and can see where the last image is snapped at the beginning of that last 60th of a second but prior to the end of the animation. The preview button shows the actual animation.

 

For experimental purposes, I increased the FPS to 120 and it still never made it.

 

I searched through the forum and found a post in the actionscript area that talked about adding a dummy "set" like the following:

// get the duration of the timeline
var totalTime = mainTimeline.duration();
var dummySet = TweenMax.set({},{},totalTime+1);

When I tried that in my app I got the same duration - nothing changed. Is it possible to pause at the end and then finish?

 

If I missed an explanation for this please point me in the right direction. Thanks!

See the Pen ?editors=0010 by swampthang (@swampthang) on CodePen

Link to comment
Share on other sites

Yes!!! That fixed it!. using ++current instead of current++ - geeez, that's like javascript 101. Thanks so much for that. I'll leave that pen out there for anyone else who runs across this issue. 

 

I left a comment in the code where the change needed to be made. Thanks again, Blake.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...