Jump to content
Search Community

ColorPropsPlugin In GSAP 3.x?

Heed test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hey everyone! I'm Looking to animate a three js model (in particle form) from one color to another in Hex or RGB. I've had a look around and haven't found anything in GSAP 3.x but it looks like ColorPropsPlugin did this? Does GSAP 3.x have something similar? or am I mistaken.

 

https://greensock.com/docs/v2/Plugins/ColorPropsPlugin

 

//gets
var color = myObject.lineColor(); 
 
//sets
myObject.lineColor("rgb(255,0,51)"); 
 
//tweens
TweenLite.to(myObject, 1, {colorProps:{lineColor:"rgb(102,255,51)"}, ease:Linear.easeNone});

 

I just need to be able to add a starting color and a ending colors and it puts out the right in-between colors during the animation. Which I will then push to:

 

new THREE.Color( outputColor )

 

Any help would be great!

 

Thanks.

 

 

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