kamranahmedse/brusher

Add a destroy method?

zhw2590582 opened this issue · 1 comments

Hi, I just want to use it to achieve multiple background image switching, Are you plan add a destroy method?

For anyone looking in the future:
It doesn't need a destroy method; you can modify the source code of loadSelectedImage().
Currently, it will not change the image if an image is already loaded (if this.image exists).

if (this.image) {
      return; // won't load image if already loaded
}
// code to load image

Simply add a conditional statement and possibly another function to change the image.