Blax Posted May 15, 2015 Share Posted May 15, 2015 3D jedi-knights, hi ! I found strange behavior keyframes in animations.If use keyframe#1 without keyframe#0 BABYLON add keyframe#0 forcibly. http://www.babylonjs-playground.com/#1R5Y6W#4 but, such animation can be load from .babylon file and do not corrected automatically, while animation do not play.And "correction" insert one more extra frame, how broke animation. Can comment this situation? It bug or a features? Advise please how i must do in situation? Find and edit such keys or something else? Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 15, 2015 Share Posted May 15, 2015 Hello ! Indeed, Babylon adds an extra frame 0 if it is missing : // Adding a start key at frame 0 if missingif (this._keys[0].frame !== 0) { var newKey = { frame: 0, value: this._keys[0].value }; this._keys.splice(0, 0, newKey);}But it should not break your animation. Try this: http://www.babylonjs-playground.com/#1R5Y6W#5I just replace the setInterval by setTimeout and the alert by console.log. Is it better ? Quote Link to comment Share on other sites More sharing options...
Blax Posted May 15, 2015 Author Share Posted May 15, 2015 Thanks for fast answer! But it not change meaning. For cyclic animation one more frame is stop animation for a moment (insert frame) Anyway - if it normal behavior for BABYLON i try find solution. It's a pity engine not do this at once after file loading. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 15, 2015 Share Posted May 15, 2015 I'm sorry but I do not get the issue. Why adding a keyframe0 which is the clone of keyframe1 is a problem? Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 15, 2015 Share Posted May 15, 2015 But it not change meaning. For cyclic animation one more frame is stop animation for a moment (insert frame) Indeed, but it "stops" for 1/60 seconds, which is pretty fast. I'm sure you won't see the difference. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 15, 2015 Share Posted May 15, 2015 And worse case, you are free to remove the automatically added key Quote Link to comment Share on other sites More sharing options...
Blax Posted May 19, 2015 Author Share Posted May 19, 2015 And worse case, you are free to remove the automatically added key Yes, in total, i simple delete extra frame 2 Temechon: M...why 1/60? - i can set any play speed for animation. Slowest values (if it ok for scene) save resources... or not? Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 19, 2015 Share Posted May 19, 2015 Your animation will run at 60 frame per second: it's only one frame, so 1/60 second. Quote Link to comment Share on other sites More sharing options...
Blax Posted May 20, 2015 Author Share Posted May 20, 2015 Your animation will run at 60 frame per second: it's only one frame, so 1/60 second. hmm.... not understand I can set any fps for animation. 24, 25, 30, etc.Why 60? Please, drop link in documentation or other place, where it explained. new Animation(name, targetProperty, framePerSecond, dataType, loopMode) Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 20, 2015 Share Posted May 20, 2015 60 is the standard value for fluid animations, but indeed yo ucan set the value you want with framePerSecond...So let me rephrase: Your animation will run at framePerSecond frame per second: it's only one frame, so 1/framePerSecond second. In all cases, not much time Quote Link to comment Share on other sites More sharing options...
RaananW Posted May 20, 2015 Share Posted May 20, 2015 In all cases, not much time Unless you choose 1 Temechon 1 Quote Link to comment Share on other sites More sharing options...
Blax Posted May 29, 2015 Author Share Posted May 29, 2015 Thanks! Now all is clear for me. Regards GameMonetize 1 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.