Hersir Posted May 22, 2018 Share Posted May 22, 2018 Hi, Trying to debug weird animation issue, when during animation it jumps to first/last frame and than back and continue further normally. Happens for both camera/mesh animation, as it is very rare its not easy to get some data Maybe someone have seen similar issues ? Happens ofter on safari especially on iPhone 10. Thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2018 Share Posted May 22, 2018 Never witness it Hard to repro on the PG I guess? Quote Link to comment Share on other sites More sharing options...
Hersir Posted May 23, 2018 Author Share Posted May 23, 2018 Its hard to reproduce even in project but its happens much more on safari (desktop and mobile), will try to get some more data. Quote Link to comment Share on other sites More sharing options...
Hersir Posted May 23, 2018 Author Share Posted May 23, 2018 Ok found something, when it happens `currentFrame` inside `animate` function of `RuntimeAnimation` is `0`, so if there are 25 frames it goes like 1,2,3,4,5 .... and than 0 and after that jumps back to 25. Will dig more to understand what causes it to be 0. Quote Link to comment Share on other sites More sharing options...
Hersir Posted May 23, 2018 Author Share Posted May 23, 2018 var currentFrame = returnValue ? from + ratio % range : to; This causes it. So example: from: 0; to: 25; if ratio is 25 than this will cause current frame to be 0. if (((to > from && ratio > range) || (from > to && ratio < range)) && !loop) { ...} and ratio can be end value as in the if statement `ratio > range` is used, so in case ratio === range it still will do that calculation and will not set returnValue to false to jump to last frame Quote Link to comment Share on other sites More sharing options...
Hersir Posted May 23, 2018 Author Share Posted May 23, 2018 So trivial fix would be if (((to > from && ratio >= range) || (from > to && ratio <= range)) && !loop) { ...} but could be that I have missed something Quote Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2018 Share Posted May 23, 2018 Well this should work Let me do some testings and if this is ok I will fix it Quote Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2018 Share Posted May 23, 2018 Ok looks good I do the change Quote Link to comment Share on other sites More sharing options...
Hersir Posted May 24, 2018 Author Share Posted May 24, 2018 @Deltakosh Ok thanks, will it be available as 3.2 npm update or it will go in 3.3 only ? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2018 Share Posted May 24, 2018 3.3 only (already deployed on preview channel) 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.