Last year I was working sporadically on creating fireworks-like blasts on a single strip

Last year I was working sporadically on creating fireworks-like blasts on a single strip mounted on the eaves of my house. I kept hitting a wall trying to get blasts to overlap each other without resetting the code. Since giving up, I’ve done quite a bit of learning in HTML5 and Javascript and with the 4th of July closing in, I thought I’d take another crack at the LEDs using concepts I’ve soaked up in the last couple months, particularly with Constructor Classes.

I’m happy to say I’ve had a good amount of success here and I wanted to share my code. Should anyone feel magnanimous and offer suggestions on improving the code or changing the look, I’m happy to listen, but at the very least, maybe my struggles might help someone else who happens along the group in the future.
https://pastebin.com/dZZy5iUW

Cool Christopher. Thanks for sharing this.
I added another variable, updateSpeed, which I pluged into EVERY_N_MILLISECONDS in the main loop. It’s an interesting animation when slowed down too.

I don’t see the totalShells variable used anywhere, yes?

ah, yes, you’re right. That was left over from a previous iteration.

I’m not super happy with the tails of each blast. I was hoping to mimic the flaming tails look of another project I saw on here somewhere, where there was a tilt bar and the colors went back and forth based on input from an accelerometer, but for the life of me I can’t find the project.

One other thing I got to thinkin about was to slow the blasts down as they branch out (easing) but I think this get’s into math my brain tends to avoid.

Thanks for sharing! I just added an interactive fireworks mode to my FastLED Arcade: https://plus.google.com/u/0/+JasonCoon1/posts/gpN7pEqRQUe

Pressing a button launches a shell of that color, pressing it again detonates it. :slight_smile: I’m still not happy with the animation, still working on it. I’ll try out your code on it.