Open ianhi opened 2 years ago
Fabric provides interactive object model on top of canvas element
Nice!
and could probably build on ipycanvas
It might be more performant to create a specific widget for it. ipycanvas has to make extensive use of custom comms because the canvas API is more of a functional API.
The fact that fabricjs implements an object model makes it very easy to create widgets for it, and by doing that we can keep the rendering loop on the Front-end (while ipycanvas has to make the rendering loop in Python, not very performant animations 😞)
Gotcha. And yeah fabric is pretty great -
hat fabricjs implements an object model makes it very easy to create widgets for it
This sitll requires manual effort right? Like there is no easy automated way to generate these?
Actually pythreejs is completely generated. So you can probably reuse some logic to automatically generate the widgets code from some kind of JSON spec that defines the models.
This would probably be a lot of work but want to put the idea out there. I think something like ipyfabric to enable using http://fabricjs.com/ would be really great, and could probably build on ipycanvas