fxhash/fxhash-boilerplate

Feature request: Add / remove / change params

iuriguilherme opened this issue · 1 comments

As far as my understanding goes, right now $fx.params() can be used once to define params. When I want to add more params, I have to do this:

$fx.params($fx.getDefinitions().concat([{
  "id": "new_param",
  "name": "New param",
  "type": "boolean",
}]));

And if I want to change an existing param, I have to know its index in the list:

$fx.params($fx.getDefinitions().slice(0, -1).concat([{
  "id": "replacing_param",
  "name": "Replacing last param",
  "type": "boolean",
}]));

or:

$fx.params($fx.getDefinitions().slice(0, $fx.getDefinitions().indexOf($fx.getRawParam("replacing_param"))).concat([{
  "id": "replacing_param",
  "name": "Replacing specific param",
  "type": "boolean",
}]));

To remove one param, I would use the same approach:

$fx.params($fx.getDefinitions().slice(0, $fx.getDefinitions().indexOf($fx.getRawParam("deleting_param"))));

I wish I could change the params more easily.

this breaks with the currennt architecture