Jump to content

Keyframe 1 --> Keyframe 0


Recommended Posts

3D jedi-knights, hi !  :)


I found strange behavior keyframes in animations.

If use keyframe#1 without keyframe#0 BABYLON add keyframe#0 forcibly.




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?

Link to comment
Share on other sites

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#5

I just replace the setInterval by setTimeout and the alert by console.log.


Is it better ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

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 :)

Link to comment
Share on other sites

  • 2 weeks later...

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.

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.


  • Recently Browsing   0 members

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