The second call to pulse will cause the led's animation() to call clear on a temporal instance but temporal.js shares a single queue for all instances of Temporal. This is nice because we aren't dumping multiple processQueue tasks onto the end of the event loop, but it's also a pain because I need to be able to clear just one animation's entries in the queue. I would like to add the ability to pass in an ID with each entry and have the option of calling:
temporal.clear(); /// clears all entries
// -- or --
temporal.clear(myid); // Only clears entries with an ID === myid
If this sounds like a good idea, I'll whip up a PR.
I have a problem...
This issue highlighted a bug that manifests when running multiple animations concurrently. In this situation:
The second call to pulse will cause the led's animation() to call clear on a temporal instance but temporal.js shares a single queue for all instances of Temporal. This is nice because we aren't dumping multiple processQueue tasks onto the end of the event loop, but it's also a pain because I need to be able to clear just one animation's entries in the queue. I would like to add the ability to pass in an ID with each entry and have the option of calling:
If this sounds like a good idea, I'll whip up a PR.