Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
nicolasdesle

Scale Three JS object with Tweenmax

Recommended Posts

Hi

 

I would like to tween the scale of an array of Three JS objects.

I am able to do this on requestAnimationFrame, but I would like to use Tweenmax:

 

for ( var i = 0; i < meshes.length; i ++ ) {

 

meshes.scale.x = meshes.scale.y = meshes.scale.z = boost;

 

}

 

Any idea how to?

 

 

Thanks!

Link to post
Share on other sites

It will be like this...

for (var i = 0; i < meshes.length; i++) {
  TweenLite.to(meshes[i].scale, 1, { x: boost, y: boost, z: boost });
}

Can you make a demo? I'm not familiar with the API, but there are ways to simplify that without a plugin. 

 

Here's a post I made about doing that with an another library, and it will work the same way.

http://greensock.com/forums/topic/15361-understanding-autoalpha/?p=66823

  • Like 2
Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×