It is inspired by a project that I saw on HN a while ago. I wasn't able to find it again, so I made my own version. I swear, only after finishing Pulsar I managed to find https://tixy.land/ again.
As a bonus, I wanted to run these animations on my DIY LED frame. Check out the video:
https://github.com/Stanko/pulsar/tree/dev#led-retro-frame
Here are a few technical details:
It is built in TypeScript and open source. User code is executed in a web worker to minimize the risk of malicious use (tbh I'm proud of the solution, and I find it quite nifty). Initially, I used to render everything as an SVG, but in order to create GIFs for the LED frame, I switched to canvas. Not to mention that SVG gave me a few headaches which I'll cover in a blog post (if I ever write one). The syntax highlighter is a trick I found on Stack Overflow. The textarea is transparent, and as you type in it, I take the code, highlight and copy it into a div which overlays the textarea.
It was really fun to build and I hope you had some fun playing with it.
I made it around last new year's eve, so here is a simple animation of a Christmas tree:
https://muffinman.io/pulsar/?grid=classic&animate=both&code=...