Jump to content
Search Community

Set a vars value with a constraint?

Visual-Q test
Moderator Tag

Go to solution Solved by Visual-Q,

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

Hey Guys,

 

I was wondering if it is possible without writing an external function to pass a vars value to a tween with a contstraint.

 

In my case I am adding a relative scale value {scaleX:"-=0.3"} to a group of objects.

 

Some of these objects begin with a scale of 0 as they start in a collapsed state and later expand. As such adding the value above would give these objects a value of -0.3 flipping the X axis and making them visible.

 

Is there any way to attach a constraint to the tweens value i.e. {scaleX:"-=0.3",constrain to minimum value of 0}.

 

I can target the objects separately if need be easily enough, but I wanted to check if setting a constraint is possible in this way.

 

 

 

 

 

 

 

 

 

 

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