Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

RoundPropsPlugin

Sign in to follow this  

| GreenSock
21251

Note: This plugin was replaced by SnapPlugin in GSAP 3. Please see the GSAP 3 release notes for details.

If you'd like the inbetween values in a tween to always get rounded to the nearest integer, use the roundProps special property. Just pass in a comma-delimited String containing the property names that you'd like rounded. For example, if you're tweening the x, y, and alpha properties of mc and you want to round the x and y values (not alpha) every time the tween is rendered, you'd do:

TweenMax.to(element, 2, {x:300, y:200, alpha:0.5, roundProps:"x,y"});

Get an all-access pass to premium plugins, offers, and more!

Join the Club

With great power comes great responsibility. Tween wisely.

- Team GreenSock
Sign in to follow this  


User Feedback

Recommended Comments

There are no comments to display.



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

×