3 ms·
> On the other hand you have Figma and Google Docs as examples of canvas-based applications that work well enough. At what cost? Google Docs is run a by a tri
by dmitriid 4y ago
> On the other hand you have Figma and Google Docs as examples of canvas-based applications that work well enough.
At what cost?
Google Docs is run a by a trillion-dollar corporation, they have the resources to rebuild it in canvas.
Figma isn't based on canvas, it's based on WebGL. And here's what Figma had to say about it: "Pulling this off was really hard; we’ve basically ended up building a browser inside a browser... We’ve implemented our own rendering engine" [1]
Good luck getting text to render properly on your own.
Just because there are two great examples made at great cost doesn't mean it's scalable to all other apps.
[1] https://www.figma.com/blog/building-a-professional-design-tool-on-the-web/ https://www.figma.com/blog/building-a-professional-design-to...
- freeCandy 4y ago> Figma isn't based on canvas, it's based on WebGL. Aren't they the same thing? And egui also talks about challenges with rendering on browsers using WebGL and WASM: https://github.com/emilk/egui/tree/master/crates/eframe#problems-with-running-egui-on-the-web https://github.com/emilk/egui/tree/master/crates/eframe#prob...
- CryZe 4y agoOften when people say "Canvas" they mean "CanvasRenderingContext2D", which still lets the browser do all the text rendering. With WebGL you need to do all that yourself.
- juancampa 4y agoJust in case it isn’t obvious, egui is WebGL based (like Figma)
- dmitriid 4y ago> Aren't they the same thing? Ah. In my mind Canvas refers to the 2D API, https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API Which is different and separate from WebGL, https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API (There will be a third different and separate API, WebGPU: https://www.w3.org/TR/webgpu/ https://www.w3.org/TR/webgpu/) > And egui also talks about challenges with rendering on browsers using WebGL and WASM Ah. It's good they are aware of this.