Commit graph

39 commits

Author SHA1 Message Date
Yotam Mann
a5503e02d2 linting 2018-03-05 12:25:33 -05:00
Yotam Mann
836a173cf8 forEachBetween is exclusive of endTime 2018-02-25 15:08:43 -05:00
Yotam Mann
dded291a25 linting 2018-01-02 10:37:27 -05:00
Yotam Mann
8dbaf71d89 forEachBetween iterator 2017-12-27 11:46:27 -05:00
Yotam Mann
1bb0a95a8e clone array so that events can be added/removed during iteration 2017-12-17 14:18:47 -05:00
Yotam Mann
92c7638786 evaluate time with .valueOf 2017-12-17 12:53:34 -05:00
Yotam Mann
5d86d72cfb handles events which are added during iteration in the same was as events which are removed during iteration 2017-09-04 16:04:16 -04:00
Yotam Mann
6a3461bee8 simplifying removal code 2017-09-04 10:46:27 -04:00
Yotam Mann
303e171c6b fixing spelling of comparator 2017-09-04 10:41:23 -04:00
Yotam Mann
8a5dd01274 only test loop length in _search method 2017-09-02 11:39:40 -04:00
Yotam Mann
73adc20088 get an event before the given event 2017-05-28 13:57:47 -04:00
Yotam Mann
8081940629 timeline takes optional comparator arg to getters
allows it to do binary search on other attributes, not just time
2017-05-26 17:06:11 -04:00
Yotam Mann
b0a0ff2a38 removing unnecessary conditional 2017-05-02 20:48:20 -04:00
Yotam Mann
b927395825 making defaultArg static 2017-04-30 15:03:49 -04:00
Yotam Mann
edfa168713 moving to static type queries
i.e. this.isString -> Tone.isString
2017-04-26 00:24:19 -04:00
Yotam Mann
c9d41345b7 bass constructor invoked without options 2017-04-25 23:08:57 -04:00
Yotam Mann
a3f54ce4cd new defaults api 2017-04-25 22:23:22 -04:00
Yotam Mann
58bdbbc82a invoke super constructor first
preparation for moving to es6 modules. also moving to slightly
simplified `default` method
2017-04-24 23:23:15 -04:00
Yotam Mann
4bf55605c8 removing circular dependency 2017-04-24 23:18:53 -04:00
Yotam Mann
a4a94b63ea callback is invoked with the timeline as the context 2017-04-24 22:59:21 -04:00
Yotam Mann
9c94b89eec renaming addEvent->add, removeEvent->remove, getEvent->get 2016-12-18 21:56:22 -05:00
Yotam Mann
2b7789b3a9 peek and shift methods
this allows the timeline to be used as a priority queue.
2016-12-02 18:59:12 -05:00
Yotam Mann
4711d704da timeline classes require Number instead of Time
since they were used with different time scales, it makes sense not to
impose Time, but allow for any kind of number.
2016-09-20 19:12:43 -04:00
Yotam Mann
4628f8c47a prefixing errors with class name. 2016-05-25 20:50:46 -04:00
Yotam Mann
733b49bcd5 using new types 2016-04-18 00:36:08 -04:00
Yotam Mann
2020194a1c testing and handling edge cases 2016-03-03 13:00:59 -05:00
Yotam Mann
f7547217c8 Timeline has an optional memory length 2015-12-06 23:48:53 -05:00
Yotam Mann
dbc33d0a1c fixes case of canceling events when there's only one event in the timeline 2015-12-06 17:23:30 -05:00
Yotam Mann
2bf8039b4e iterator with guarding in case items are deleted
makes it safer to delete an item during a forEach loop
2015-12-06 13:14:36 -05:00
Yotam Mann
61fb1df660 adding strict mode 2015-10-21 12:11:19 -04:00
Yotam Mann
3fe5ef2b6c after-inclusive search 2015-10-11 16:03:20 -04:00
Yotam Mann
615c120688 getNextEvent -> getEventAfter and getEventBefore method
also fixed bug in forEachAfter method
2015-09-05 16:27:19 -04:00
Yotam Mann
eccdb659c2 renamed Tone/core/Types -> Tone/core/Type 2015-09-04 16:48:21 -04:00
Yotam Mann
7393a59410 cancel <-> clear
clear removes an ID and cancel cancels events after the given time. API
is now more consistent with the Web Audio’s cancelScheduledValues
2015-09-03 16:56:05 -04:00
Yotam Mann
80b938a4d1 removed old comment 2015-08-31 15:15:53 -04:00
Yotam Mann
dff1e43239 fixes bug when clear time was before any events 2015-08-18 18:07:35 -04:00
Yotam Mann
36e8002e85 fixed clearBefore to do what it says 2015-08-18 17:33:39 -04:00
Yotam Mann
d85c973a83 added index to iterator.
removeEvent uses iterator
2015-08-18 17:08:14 -04:00
Yotam Mann
72ee2dcc37 renamed Schedulable to Timeline 2015-08-18 16:28:55 -04:00