tween.js
tween.js copied to clipboard
Animation on repeat speeds up over time.
Here's @jonobr1's original, forked to use array values:
https://codepen.io/trusktr/pen/04518ee24a8d1d7822e584c6a513d378?editors=1010
Watch it for a while. Over time, the animation speeds up, which shouldn't happen.
Do you know what the bug I'm leveraging is?
@jonobr1 Oops, I meant to post a link to a fork of yours, where the only difference is that I'm passing an array of values to o's rotation, on line 10:
http://jsfiddle.net/18ymqpdw/0/
If you watch it for a while, you'll notice that the animation seems to speed up after a few repeats.
I updated the original post to use the forked link. What bug were you leveraging in yours?
I'm not too familiar with arrays in Tween.js..., but if that's the difference then I don't think I'm leveraging any bugs in the fiddle I made. Also, this might be an inaccurate use of the API and may not be a bug.
Interesting, at least that behavior is consistently repeating, rather than changing each time it repeats. Let's see what's going on here..
@trusktr It is about tween.js or es6-tween. I am added this to es6-tween issue list and i will fix as soon as possible
@trusktr Is in this fiddle issue was fixed?
Looks like the examples broke. I update the OP with a working example on codepen. I'd like to start fixing stuff and moving forward!
@dalisoft Mind updating your example?
Also, sidenote, if you don't mind making some PRs to bring your ideas into the main repo, that'd be great!
@trusktr I updated, but seems does not work, some incompatibility with two.js
I deprecated es6-tween due of less time to spent, i think these some things can be applied and source code can be got from es6-tween
- TypeScript (currently es6-tween is ES6, but before have been written TS)
- DOM Plugins
- Infinite Deep-Level tweening without loss of performance
- Events (multiple
.on('complete' | 'update', 'start'))
@dalisoft Thanks! I updated your example with the working version of Two.js: https://codepen.io/trusktr/pen/b10d7a5693b7ba6b9ed70b13e7ab0fb2?editors=1010
I like those ideas. In particular I'm curious about Infinite Deep-Level tweening without loss of performance. I just merged and updated outstanding nested properties pull requests from @Malows and @talltyler. See https://github.com/tweenjs/tween.js/pull/536 and https://github.com/tweenjs/tween.js/pull/366
Interested to learn about the alternative method. I'm thinking perhaps to cache the nested objects to key paths. What'd you do in es6-tween?
Updated the broken example with newest changes. No luck though: https://codepen.io/trusktr/pen/c258027326d412f81e3aad96d669307c?editors=1010 Need to dig into it...
@dalisoft In which commit did you fix the bug in es6-tween?
@trusktr Which bug? I don’t remember, there but more commits, really I don’t have time to checkout all them. Of course, if you mean infinite deep level tweening - it’s not bug, i made it feature from start of planning es6-tween. Most of tweening library still does not support this feature
I meant the bug that the above demo goes faster and faster over time. I'll peruse through es6-tween next.
I don’t think i can support es6-tween anymore currently and within few month. Of course, it’s off-topic, but did you got my mail message?
Looks like this is still reproducible in v22, and in particular it looks like it happens with the new startFromCurrentValues() method which used to be the default behavior in v16.6:
https://codepen.io/trusktr/pen/oNVBjKG/ff650c9a627e22bb629cdae20b8eaec4?editors=1010
When using the current .start() method in recent tween.js version, the issue is bypassed. This provides a clue: it has to do with starting with current values!