burbonvagin Posted August 5, 2014 Share Posted August 5, 2014 How do you prevent blender animations such as change in location from running when the scene is loaded so that you just trigger them with javascript instead? Another question if anyone wants to answer: I noticed while using bones animation the the animate "smoothly", that is their speed varies so that they slow down before stopping, and the opposite after starting. How can this be applied to other animations such as location/rotation/scale? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted August 5, 2014 Share Posted August 5, 2014 Just start your animation from frame one to frame one at your scene loading, and the animation will stop, waiting for you to tell it to sart again scene.beginAnimation(your_object,1,1); burbonvagin 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted August 5, 2014 Share Posted August 5, 2014 How do you prevent blender animations such as change in location from running when the scene is loaded so that you just trigger them with javascript instead? burbonvagin, as an alternative to Vousk-prod's suggestion:scene.stopAnimation(your_object)See example here : Desk which stops all the doors and drawers animating when loading, but animating when clicked cheers, gryff burbonvagin 1 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted August 5, 2014 Share Posted August 5, 2014 scene.stopAnimation(your_object) Ah yes, sounds better to prevent animation from running Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted August 5, 2014 Share Posted August 5, 2014 Another question if anyone wants to answer: I noticed while using bones animation the the animate "smoothly", that is their speed varies so that they slow down before stopping, and the opposite after starting. How can this be applied to other animations such as location/rotation/scale? I presume your bone's animation comes from a 3d modeler where someone did a nice animation, that's why this anim is smooth. As opposite if you animate manually your position/rotation/scale values you need then to do that smooth stuff by hand... But good news I'm in the process of adding "easing" to BabylonJS animation system. The purpose is to be able to easily apply these kind of "smoothings" to movement. Bad news is I'm totally over busy so this will have to wait some more weeks. Quote Link to comment Share on other sites More sharing options...
gryff Posted August 5, 2014 Share Posted August 5, 2014 Ah yes, sounds better to prevent animation from running Well actually, Vousk-prod, I've actually used both methods - so it is just an alternative Desk and Book The book was modeled and rigged in the open position. The animation has the closed position at the mid point of the animation - so I play one frame of the animation at the mid point using the method you describe. Not sure it makes much difference which method you use. cheers, gryff 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.