Live data from Hacker News

Nice things with SVG

fuma-nama.vercel.app

1–10 of 112 posts

Re: Nice things with SVG

#2
This taught me that SVGs can be animated with CSS. Cool!

I wonder if anybody has recreated vector graphics games like Asteroids using SVGs and animation. You'd have to use JS to change the shape and direction of the asteroids when they're shot, but that would just require a bit of JS.

Re: Nice things with SVG

#3
One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0].

The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities.

[0] https://kingbird.myphotos.cc/packing/squares_in_squares.html

Re: Nice things with SVG

#5
post #2

This taught me that SVGs can be animated with CSS. Cool! I wonder if anybody has recreated vector graphics games like Asteroids using SVGs and animation. You'd have to use JS to change the shape and direction of the asteroids when they're shot, but that would just require a bit of JS.

[deleted]

Re: Nice things with SVG

#6
post #2

This taught me that SVGs can be animated with CSS. Cool! I wonder if anybody has recreated vector graphics games like Asteroids using SVGs and animation. You'd have to use JS to change the shape and direction of the asteroids when they're shot, but that would just require a bit of JS.

It would be more performant to use canvas, but it might be kind of fun to do with svg

Re: Nice things with SVG

#8

Was always fascinated by SVG art. How good are LLMs in generating SVGs?

In at least my limited experience, they're kind of bad. They can retrieve shapes that already exist, sometimes inaccurately, but they are less reliable at creating novel ones

Re: Nice things with SVG

#9
I always thought transforms were an odd inclusion in SVG until I tried to make my own icons/logo with it. Those curves are challenging to get right. When I got done with the second logo I decided it looked flat and I needed to skew it 10°. The thought of rewriting all of those lines and curves suddenly made rotation seem like a much much better idea. Good thing too because it looked weird next to test and I changed the angle several more times to make the kerning look right.

Re: Nice things with SVG

#10
post #2

This taught me that SVGs can be animated with CSS. Cool! I wonder if anybody has recreated vector graphics games like Asteroids using SVGs and animation. You'd have to use JS to change the shape and direction of the asteroids when they're shot, but that would just require a bit of JS.

Video I bookmarked when I was stuck in backend land because I knew I’d want to learn it some day:

https://youtube.com/watch?v=wc8ovZZ78SY

I discovered this shortly after introducing The Secret of Kells to a child and had terrible, beautiful ideas about overly ornate websites that I have since thought better of. Mostly.

Post reply on HN