Skip to content

Commit

Permalink
create Effects in EffectChain in given order
Browse files Browse the repository at this point in the history
The first created Effect is closest to the input. The last is closest
to the output.
  • Loading branch information
mzgoddard committed Jun 21, 2018
1 parent ea52c8e commit 09d0729
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/effects/EffectChain.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ class EffectChain {
* @type {Array<Effect>}
*/
this._effects = effects
.reverse()
.map(Effect => {
const effect = new Effect(audioEngine, this, lastEffect);
this[effect.name] = effect;
lastEffect = effect;
return effect;
})
.reverse();
});

/**
* First effect of this chain.
Expand Down

0 comments on commit 09d0729

Please sign in to comment.