logoalt Hacker News

WorldPeasyesterday at 7:28 PM2 repliesview on HN

all we need is keyboard input and audio output and we have (most of) flash back. I may have to look into this in my idle hours


Replies

zamadatixyesterday at 8:22 PM

The magic here is happening via the <script> tags, where you have access to the browser APIs like you would an <canvas> instead of <svg>. E.g. here's a sample I forked following the mouse using <svg> with <script> inside https://codepen.io/zamadatix/pen/emZXZKx?css-preprocessor=sc...

Libraries like three.js had SVG rendering as an option but it got deprecated as <canvas> with more direct GPU APIs was a lot more efficient and flexible.

fragmedeyesterday at 8:13 PM

JavaScript to catch keypress events and edit the SVG in situ maybe?