Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thoughts on creating ipyfabric? #259

Open
ianhi opened this issue Mar 15, 2022 · 3 comments
Open

thoughts on creating ipyfabric? #259

ianhi opened this issue Mar 15, 2022 · 3 comments

Comments

@ianhi
Copy link
Contributor

ianhi commented Mar 15, 2022

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

@martinRenou
Copy link
Collaborator

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 😞)

@ianhi
Copy link
Contributor Author

ianhi commented Mar 15, 2022

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?

@martinRenou
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants