Open afragon opened 7 years ago
wow, that's beautiful!
Eventually we could make this happen. But honestly I have some serious revamping of the codebase to do before it can be feasible. There are several subtle things we'd need to achieve first, like allowing the creation of non-regular polys (this thing can generate any shape it wants, e.g. a triangle with sides that are of any length, not just equilateral like our current triangle)
It also requires Go on the server, and right now we have a delightfully simple node stack. Perhaps we could spin this up as a companion service instead of intertwining it with bustashape itself. Bustashape can hit the Primitive API and then spit out all the shapes to the user.
This thing works wonderfully though!
Yeah i looked at the output options and the data we'd need is kinda buried, but I'm sure we could surface it especially with a little guidance from the maintainer if needed.
Nice, someone wrote the API we needed! https://github.com/possan/polyserver
It will take an image, turn it into primitives, and output the coordinates. They have a step 4 called "write your own renderer" — the part that bustashape can fulfill.
Found this work that reproduces images with geometric primitives.
:link: https://github.com/fogleman/primitive :link: https://github.com/possan/polyserver
Is there a possibility to integrate this solution to bustashape as a feature?