Jump to content
Search Community

Continuing a loop on a tween

bromel 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

Good evening all,

 

I have been experimenting with GSAP (which is awesome!!) and I am trying to create a loading animation for which can be viewed here: 

 

The effect does work, but I am wanting to keep the spinner, spinning clock-wise on 'loadout' (when the button is pressed). due to the method for which I have the animation working I was wondering if I could still have the animation in reverse but keep the rotation property going in the direction that I want it.

 

initially I had in mind the use of:

 

tlspin.kill({rotation:true})

 

in an effort to rebuild the animation again, but this did not work, out of interest is there a way to reinstate a tweens property once it has been killed? or is there another way of creating the same effect.

 

many thanks

 

Bromel

See the Pen pvvPyW by w9914420 (@w9914420) on CodePen

Link to comment
Share on other sites

Hi Maelfyn

 

You hit the nail on the head, this is exactly what I was trying to achieve opinions are always welcome ;). Im not too familiar with JS but I understand what you have done and now I have something to study. My immediate thought is that by your method, I could easily create libraries of tweens for one element. Thank you very much for your help.

 

regards

 

bromel

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...