Hacker News new | ask | show | jobs
by JKCalhoun 381 days ago
Some wild stuff about "defs" that I was unaware of in SVGs.
2 comments

Defs is also how the arrows work in this WebGL2 diagram[2], and in fact, I don't think they're possible without defs, because of `marker-end` which seems to require a marker present in defs.

[2] https://webgl2fundamentals.org/webgl/lessons/resources/webgl...

Defs saved the day here on file size- repeating the image (which we usually base64 encode) would have caused a much larger file size and made rasterization much more appealing!