https://pocketninja.github.io/enjine-fidget-shuriken/
This is a rudimentary example made with Enjine, a toy ECS JS game engine I'm chipping away at.
It is using contemporary features of JavaScript, such as native classes and visibility. YMMV.
NB: The repo for Enjine itself is not publicly available right now - it's very unfinished and lacks many core features.
NB: For best results, please use a desktop browser. Input tracking is designed to work with a mouse for the time being.
- Shuriken graphic by SCaydi: https://opengameart.org/content/shuriken-0