linebender / vello

A GPU compute-centric 2D renderer.
http://linebender.org/vello/
Apache License 2.0
2.4k stars 140 forks source link

Integration with Leptos #355

Open GioPat opened 1 year ago

GioPat commented 1 year ago

Good morning. I was thinking to develop a charting web application using Leptos+Vello (For the charting rendering and interaction). I saw from the examples that it's possible to attach a rendering scene to an HTML canvas element which is created starting from the window struct. Do you think that it's a feasible integration? I'm afraid the re-rendering system of Leptos could clash with some of the rendering lifecycles of Vello.

Thanks!

power-unsealed commented 1 year ago

I cannot comment on the feasibility of using Vello for rendering charts in Leptos. However, I happen to just have developed a web application in Leptos that included chart rendering. For the current implementation, I resorted to almost raw HTML5 canvas rendering with the Context2D API via web-sys, and my own thin abstraction on top of it. I cannot share the source code, but I hope that little hint helps a bit at least.