Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Live-Editable SVG Shaders/Filters for Drawing (brown.edu)
48 points by eutopi 10 days ago | hide | past | favorite | 8 comments





Super cool. Can you add primitives? Square, circle etc as actual shapes?

Thanks! And not all primitives right now -- everything is a polyline for simplicity, but multiple shape support is definitely on the to-do list

I really like it though. What happens when you open in AI/Inkscape? Do they get mangled?

Yeah the filter effects go away if you import to AI/Inkscape so you're left with just the plain polylines.

Nah, the filters and animation survive through Inkscape just fine, though if you change the filter then it’ll probably clobber the animation element.

Ah you're right my bad -- just opening the svgs work fine. I was trying to import them as editable objects, and the filters didn't survive there, so I assume there's not much edit support

Yeah, Ctrl+I import doesn’t seem to preserve everything, not sure what’s up with that. But you can edit the files normally just fine—though you’ll have to convert the polylines to paths to edit the points. Inkscape is mangling the filter regions a bit when you round-trip it, and I’m decidedly unimpressed with that (which has seemed to me to be worse in 1.1 than it was in 1.0, perhaps because it’s more proactive about both recalculating and constraining), but other than that everything’s unaltered, and you can edit the file just fine—though as I mentioned before, edits on an element that contains <animate> children (which here specifically means the filters) may destroy those children.

(polyline and polygon are weird elements, serving no useful purpose, as they can be trivially converted to paths: <polyline points="…"/> → <path d="M…"/>, and <polygon points="…"/> → <path d="M…Z"/>.)


Thoroughly entertaining



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: