Pulsar is inspired by something I came across on HN a while ago. Unable to find it again, I decided to create my own version. I swear, only after finishing Pulsar I managed to find it again [1].
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
I intended to write a blog post before sharing it on HN, but that is taking forever. So, I'll just give you a few technical details:
It is built in TypeScript and is open source. User code is executed in a web worker to minimize the risk of malicious use. I'm proud of the solution, and I find it quite nifty. Initially, I used to render it as an SVG, but in order to create GIFs for the frame, I switched to canvas. 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, the code is highlighted and placed into a div which lays on top of the textarea.
So, that is Pulsar. I hope it will be as fun for you as it is for me. Let me know what you think.
I prepared a simple animation of a Christmas tree for the holidays. It is a bit late, but here it is anyway :)
https://muffinman.io/pulsar/?grid=classic&animate=both&code=...