Hacker News new | ask | show | jobs
by jitl 655 days ago
Skia is available for JS/WASM called “CanvasKit”, see https://skia.org/docs/user/modules/canvaskit/

It has text shaping & editing (might have helped OP) and can play back Lottie animations

It is developed by Google in part for Flutter, which uses CanvasKit by default when you compile Flutter apps for web.

https://docs.flutter.dev/platform-integration/web/renderers

1 comments

This is cool, but still looks painfully low level. A library one level above this would be the sweet spot that would allow people to build killer stuff on top of. (Sort of like what OPs are doing)
Oh I agree. I guess I was just trying to say someone already put in the leg work and supports Skia for WASM, that’s all. I guess my dream pathway would be to combine Tldraw’s high level canvas editor API with Skia/WebGL backend; their current backend uses canvas a bit but is mostly SVG and HTML.
We actually looked into Tldraw. I read a lot of the source code and their editor is impressive. We ran into performance problems at around 1000 nodes when panning and zooming. After seeing that, we decided to make the jump to WebGL.