Jump to content
Search Community

Spinning propeller

ianben 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

Hello @ianben and Welcome to the GreenSock Forum!

 

To start with you should get familiar with the various types of easing using our Easing Visualizer which even supports custom eases.

 

https://greensock.com/ease-visualizer

 

Once familiar with the easing you can understand how to make it so it,"starts slowly and then speeds up to continually run".

 

That would be the first thing i would look at if i were you.

 

Happy Tweening :)

 

 

 

 

 

 

Link to comment
Share on other sites

@ianben

 

You can get a continually spinning object by adding the special property repeat: -1 to your TweenMax tween or TimelineMax constructor.

  • repeat: Number - Number of times that the animation should repeat after its first iteration. For example, if repeat is 1, the animation will play a total of twice (the initial play plus 1 repeat). To repeat indefinitely, use -1. repeat should always be an integer.
Once i add the special property repeat:-1 you will see how it rotates around forever in an infinite loop
 

See the Pen dRdymg by jonathan (@jonathan) on CodePen

 

Happy Tweening :)

 

Resources:

TweenMax : https://greensock.com/docs/TweenMax

TimelineMax : https://greensock.com/docs/TimelineMax

 

  • Like 3
Link to comment
Share on other sites

Great, thank you once again. The support you guys provide is so good and so prompt!

I am both enjoying learning Greensock and JavaScript. So much better than returning to the Animate CC environment!

  • Like 3
Link to comment
Share on other sites

Excellent solution, Manfred. Adjusting timeScale() is a great way to increase speed over time.

 

ianben, if you want the spin to start slow and speed up and then maintain a constant speed, you can do so by tweening the timeScale() of a tween that repeats infinitely.

 

In the pen below the play button will tween the timeScale() of the tween from 0 to 1 (speed up) and the tween will continue playing and repeating at a timeScale() of 1.

 

See the Pen YQeqGZ?editors=1010 by GreenSock (@GreenSock) on CodePen

 

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