Jump to content
GreenSock

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

Scale Three JS object with Tweenmax

Go to solution Solved by OSUblake,

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

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 comment
Share on other sites

  • Solution

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