jmtrivial / flatten.js

Transform any svg file into a simplified version by removing all the transformation matrices
MIT License
4 stars 1 forks source link

SVGO awareness #1

Open msurguy opened 4 years ago

msurguy commented 4 years ago

I don't know if you used SVGO before, but it seems like a lot of code in this library could be made as a plugin to SVGO or use SVGO plugins to do certain operations that are implemented here. Just wanted to bring awareness to those plugins: https://github.com/svg/svgo

Btw, it also works in the browser beautifully.

jmtrivial commented 4 years ago

Thank you for this message. The aim of this library is to provide a browser version to be enbedded in an online service to convert svg to stl: https://github.com/jmtrivial/svg-to-stl Is there a solution to embed SVGO in a browser application that is purely client-side?

msurguy commented 4 years ago

@jmtrivial absolutely there is :) There's one way in this repo : https://github.com/jakearchibald/svgomg but I also made a simple example here: https://codesandbox.io/s/billowing-paper-03erd?file=/src/index.js

jmtrivial commented 4 years ago

Thank you for the tip, I'll consider migrating. If you're interested, we can work together on it!