If you're interested in adding SVGs that look like truthful screenshots, I wrote a Chrome/Firefox extension that can take screenshots of webpages in SVG: https://github.com/felixfbecker/svg-screenshots
It can't screen record an animation though, but it could be a baseline for hand-animating the elements. Accepting PRs for screen recording functionality :D
macOS has APIs to get a vector PDF snapshot from any view/window [1]. If emacs ends up drawing using platform APIs such as CoreText it should be possible to get a screenshot that way.
Oh that's cool! Did you ever think about recreating the DOM in SVG elements in animating those with CSS, instead of using raster images? It would potentially be possible with MutationObserver, and optionally "copying" any CSS animations in the source DOM. Will likely not be perfect but could still be a good trade-off for a little demo animation of e.g. how to fill out a certain form instead of using a GIF or video.
I'm building this to use to record Electron window recordings - I ultimately want to use this to automatically build animated SVGs showcasing features of VS Code extensions as a part of their CI so the showcased can be coded using VS Code API and the animations in the extension readme just fall out of that. So no DOM in this case. But I am thinking of ways to optimize this. I know this will be used for screen recordings and that gives me some flexibility in what assumptions I can make in the optimization pipeline. At the moment I plan on trying to come up with an algorithm to detect scrolling/jumping regions (like in the demo where the whole line height grows once the first emoji is typed on a given line) and animate their scrolling and cropping using CSS animations instead of image patches. But I think what you describe is definitely something to explore and I might take that up next if I figure a use case for it as it sounds really interesting and fun!
I can't find it on addons.mozilla.org. According to Mozilla[1] I can only use unsigned addons with ESR, Nightly and the Developer Edition of Firefox (which I don't use). I've tried setting xpinstall.signatures.required to false in about:config. It's not helping.
I'd love a tool like this for generating animated SVG clips of a web page, it'd help immensely when creating walkthroughs. Video recordings do work, but it's a mess working with different encodings to make it look ok. Not to mention, with SVG such walkthroughs could actually be made interactive...
The tests take a PNG screenshot of the webpage, then a PNG screenshot of the created SVG and pixelmatch the two. The difference must be below 0.5% for tests to pass.
Hi! Just wanted to say this is an excellent readme, and your Boemska website is equally great. Very impressive – kudos to you and keep up the great work!
https://github.com/boemska/create-sas-app