Peter Posted November 16, 2013 Share Posted November 16, 2013 Hi i just read the source code of babylon for animation part (for learning engine dev) for testing "BABYLON.Animation.prototype.animate function" by using https://github.com/BabylonJS/Babylon.js/wiki/07-Animation example the example frame number is range from 0-100 but in looping mode that "animate" function i use console.log(currentFrame) print out the value ,the value always range from 0 ~ 99 (integer part) and lost last frame(100). is this a bug? thanks best regard Peter Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 16, 2013 Share Posted November 16, 2013 Hello where do you set your console.log ? Quote Link to comment Share on other sites More sharing options...
Peter Posted November 16, 2013 Author Share Posted November 16, 2013 Hi just like this.......................... // Compute value var repeatCount = (ratio / range) >> 0; var currentFrame = returnValue ? (from + ratio % range) : to; console.log( (currentFrame)); // i put here..................... var currentValue = this._interpolate(currentFrame, repeatCount, this.loopMode, offsetValue, highLimitValue); ........................ is this correct method to do? thanksPeter Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 16, 2013 Share Posted November 16, 2013 Yes:) We drop the last frame (from my memory^^) because we interpolate from n to n +1 Quote Link to comment Share on other sites More sharing options...
Peter Posted November 16, 2013 Author Share Posted November 16, 2013 ok best regardthank you Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 16, 2013 Share Posted November 16, 2013 My pleasure:) 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.