ramshreyas Posted February 22, 2015 Share Posted February 22, 2015 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! Quote Link to comment Share on other sites More sharing options...
iiceman Posted February 23, 2015 Share Posted February 23, 2015 Hey there, you mean like that: http://www.babylonjs-playground.com/#E6LF7 ? Seems to work for me. I used exactly your code in a for loop over all the meshes. Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 24, 2015 Share Posted February 24, 2015 My advice - check your hardware. I've found gpu and framerate has a huge impact. Also, always press your refresh button. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.