Auz / Bug

Add bugs to your website
https://auz.github.io/Bug/
435 stars 80 forks source link

Method to destroy the animation? #4

Closed thetrickster closed 8 years ago

thetrickster commented 10 years ago

Is there a method to destroy the bugs? I've tried setting the controller class to a variable and tried setting it to null with no effect:

`var bugAnimate = new BugController(); ... ... bugAnimate = null;

Is there a way to destroy them once they've been instantiated?

Auz commented 10 years ago

Fixed. You can now call bugAnimage.stop(); to stop the animations, end() to stop and remove the elements, killAll() for carnage, and reset() if you want to bring them back to life again.

jimbuck commented 8 years ago

That works on any bugs already created, but new ones continue to appear. Is there any way to stop everything? (I'd like to turn it completely off)

Auz commented 8 years ago

Ya, I think there is a bug with the timer, I'll take a look

Auz commented 8 years ago

Yep, found the bug

Auz commented 8 years ago

Thanks @JimmyBoh, should be fixed now.

jimbuck commented 8 years ago

Wow, nice hustle! FYI, I got this running in a transparent electron window so it covers your desktop. I will be sure to have proper attribution for the first release.

Auz commented 8 years ago

Cool. Love to see it when you're done. I am pretty happy how the spiders turned out, considering I drew them by hand in photoshop. If someone throws their laptop across the room, are we liable? :)

jimbuck commented 8 years ago

(Adding liability clause to top of todo list...)

The spiders look great, even the dead ones. I would think making the legs look realistic despite all of the overlap would be tough. Great job!

As far as working builds, building from source works on Windows (clone, run npm i, then npm start). I will create a downloadable build soon, but unfortunately it will be an installer (portable app would make more sense from a prank use case). As for other platforms, I'll have to ask a buddy to build for macOS and Linux.