←back to thread

An SVG is all you need

(jon.recoil.org)
258 points sadiq | 5 comments | | HN request time: 0s | source
1. _ache_ ◴[] No.46237989[source]
I really like SVG, I did a lot of things with it and some interesting ones. The only blame I have is that it is sometime slow.

Like for QR Code, precise maps or +100 pixels wide squares. More than 100 "DOM" elements and it will take multiple seconds to show.

The animations also are slow too, compared to canvas, plain CSS or Lottie but nothing very cursed, it's mostly fine.

replies(1): >>46239134 #
2. newcup ◴[] No.46239134[source]
I embedded a chess engine in SVG image of a chess board (https://github.com/jnykopp/svg-embedded-chess) so that the engine moved the pieces automatically and played against itself, just by viewing the SVG.

This was done for a friend of mine who made an art installation that projected like some 50x20 (can’t remember exactly) of these images in a grid on a wall, for perpetual chess madness.

The number of chess SVGs a laptop’s browser was able to run simultaneously did feel suprisingly low, but luckily it was enough for that particular piece of art.

replies(1): >>46241703 #
3. albert_e ◴[] No.46241703[source]
interesting -- is there any video of the art installation
replies(1): >>46242782 #
4. newcup ◴[] No.46242782{3}[source]
Sadly, seems there is not. But the artist has still the web page up he used for the installation: https://heikkihumberg.com/chess/

He said he used ipads as renderers. And even one grid may have looked different back in the day than that page now, as the font might be different. The SVG just uses system fonts and the chess pieces are just unicode characters.

replies(1): >>46243218 #
5. albert_e ◴[] No.46243218{4}[source]
Cool thanks.

Is there a way to control the speed. When I load a single SVG into browser, it runs through the whole game in a flash. (Edge shows animation; chrome and firefox show static image for me)