Jump to content

Multiple running animations?


ramshreyas
 Share

Recommended Posts

I have an array of 3 meshes. I'm trying to add a fade animation on all three.

When I loop over them beginning at index 0 and begin the animation on each, the first doesn't animate but the latter two do.

 

Curious, I changed the loop from index = 2 down to 0. Now a different mesh (i = 2) doesn't animate, but 0 and 1 do.

 

This is the animation:

      var anim = new BABYLON.Animation("fade", "visibility", 60,  BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);    var keys = [];    keys.push({              frame: 0,              value: 1.0              });    keys.push({              frame: 60,              value: 0.0              });    anim.setKeys(keys);        mesh.animations.push(anim);    scene.beginAnimation(mesh, 0, 60, false, 1);

If instead of applying this animation, I just do

 

mesh.isVisible = false;

 

then all 3 meshes disappear.

 

Is there a limit on the # of simultaneous animations somewhere?

 

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...