Jump to content
Search Community

My Timeline is not looping from the beginning

Pcooney test
Moderator Tag

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

Here I have the skateboard do an ollie (jump) and land with a 2seconds of riding before I want it to repeat, however the repeat is starting on step 2. (board is at an angle)

 

This is my first project so it could very well be a syntax error or spelling misstake on my part but any help would be greatly appreciated. Thanks

See the Pen BwGpEy by Pcooney13 (@Pcooney13) on CodePen

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Did you get this sorted out? The animation looked good to me. When it repeated it looked the same as the first iteration. Is it something subtle I'm missing? Impressive ollie!

 

BTW a skateboard animation was the first thing I did in Flash a million years ago :) http://www.snorkl.tv/2011/08/my-first-cool-flash-animation/

  • Like 3
Link to comment
Share on other sites

Hi @Pcooney :)

 

Welcome to the forum.

 

I took a look at this earlier today, but hadn't had a chance to post a reply until now. As @Carl mentioned, it looks like you've got it working now.

 

The problem with your earlier version was the negative relative position parameter offsets. You were animating rotation and y, but the next tween (with the negative overlap) was also animating those properties so an overwrite was occurring and messing up your loop. I see all those position parameters are gone now so I'm assuming you already had this figured out, but thought I'd mention it just in case.

 

If you don't want to use that 2 second tween at the beginning and end of the timeline, you can use {delay:2, repeatDelay:2} in your timeline vars object as well. That will give you 2 seconds at the beginning of the first iteration and each loop. Cool animation- nice work. :)

 

Hopefully that helps a bit. Happy tweening and welcome aboard.

 

@Carl - I like that skateboarder. Was that really your very first animation?

  • Like 4
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...