Closed torch2424 closed 6 years ago
Is this just a question about API design? You could make two methods, setFilter()
(singular), and setFilters
(plural).
setFilters()
could take an array of filters, and replace all current filters with the filters passed as arguments.
setFilter()
could take a single filter, and an index, and replace only that filter (assume index 0, if not specified).
How does that sound?
That sounds great!
And yes, it was more of a question of API design I will admit, I dont understand wad fully, since I am still learning and diving into it. but I am getting there! I figured it'd be best to ask you how this should be implemented, since you understand the filter create a lot better than I do.
Currently, in another application that implements the use of wad (see here: https://github.com/julianpoy/Flyxer), I was able to set the filter of a wad doing the following:
Where
masterLowpass
is bound to a slider using angularJS' ngModel.Currently, I am only accessing the first filter in the array, implying there are multiple filters.
I am setting the wad as follows:
I was thinking I could simply allow developers to pass the index of the filter they would like to change. However, I dont see how they can set multiple filters. So I was hoping for a bit of help to solve this issue. Thank You!