Open ScreamZ opened 1 year ago
So you see "2 end" but never "3 start" correct? No errors thrown?
So you see "2 end" but never "3 start" correct? No errors thrown?
That is correct, I can give you more insight if you wish. For some reason, I've added some console logs inside animation.js
file and I can see that this.segments.length
is going to 1
to 0
then to 2
then directly to 0
. I'm trying to investigate.
I suspect some kind of race conditions.
I think this could also be nice to buffer things before everything starts. Adding an autoStart
property might be a good choice.
If I can contribute, just let me know. I'm also doing a big work updating typescript definition typings https://github.com/DefinitelyTyped/DefinitelyTyped/pull/67063
@dtex Any idea on that ?
I don't know if it's a race condition, or we're just popping things off the queue too aggressively. I'll set up a test and see if I can find where that's happening.
I don't know if it's a race condition, or we're just popping things off the queue too aggressively. I'll set up a test and see if I can find where that's happening.
Alright thank you very much, Keep me in touch, I would be really pleased because i need this feature, I'm trying debugging on my side.
@dtex Issue happen on https://github.com/rwaldron/johnny-five/blob/094bf6cceb8b9ec424306da8e98308ebd6fa2252/lib/animation.js#L94
Added this code
I've been able to fix the code doing this
Object.assign(this, new Animation.Segment(firstElement), {segments: this.segments});
We need to re-apply segments otherwise we crush the segment array each time. Or we need to pass current second to options so options.segments
can trigger inside Animation.Segment
I can make a pull request if you think it's okay.
@dtex @rwaldron Hi I'm trying to sequence animations on 3 servos using this code:
Using this code, 3 never starts… I don't get why.
Have a look at #1376 but still having issues.
Also, it's impossible to
pause
the sequence before something has been enqueued.Any idea?