* call the right effect method (defined in this.effects) * @param {string} effect - effect type
(effect = 'fx1')
| 394 | * @param {string} effect - effect type |
| 395 | */ |
| 396 | trigger(effect = 'fx1') { |
| 397 | if ( !(effect in this.effects) || this.isAnimating ) return; |
| 398 | this.isAnimating = true; |
| 399 | this.effects[effect](); |
| 400 | } |
| 401 | } |