I would like a Skia + v8 runtime. Some of my web apps are just a 2d canvas and JavaScript. Would be nice to be able to use them without a browser and bundle with something more lightweight then Electron.
What is this for and why would someone want to use it?<p>There's basically nothing on the website but the API. No decent overview or tutorial or even why someone would want to use this project.
They should use the desynchronized canvas flag for lower latency on the ink example.<p>canvas.getContext('webgl', {desynchronized: true})<p><a href="https://www.chromestatus.com/feature/6360971442388992" rel="nofollow">https://www.chromestatus.com/feature/6360971442388992</a>
I just created a proposal to support lottie based animated stickers in Discourse two days ago, and this looks very useful to get more performance when playing those using the new Skottie module. Very cool!<p><a href="https://meta.discourse.org/t/plugin-for-animated-stickers/123212?u=falco" rel="nofollow">https://meta.discourse.org/t/plugin-for-animated-stickers/12...</a>
Here's one of the Skia Path Ops videos referenced in the Presentation section -- for some reason it links to slides but not the videos...<p>Skia Path Ops : High Performance Set Operations for Geometry<p><a href="https://www.youtube.com/watch?v=OmfliNQsk88" rel="nofollow">https://www.youtube.com/watch?v=OmfliNQsk88</a>
Would be great if anyone here has some experience with this and examples of use cases. I have been looking at this for a few weeks now for a tile based view with multi threaded rendering and server side prerendering.
But I just can't figure out what the benefits would be over canvas natively, if there even are any. As I wrote in <a href="https://news.ycombinator.com/item?id=20339574" rel="nofollow">https://news.ycombinator.com/item?id=20339574</a><p>"
context: I want to build a tile based view (tiles in x/y dimensions + zoom levels). The content of the tiles is loaded from server (shapes mostly) and rendered into tile images client side. I also want the same tiles prerendered as identical images on the server.<p>For this I have a feeling that something like skia is the way to go. Skia can be used via wasm bindings. How I would fetch the shapes and render the tiles (or fetch the prerendered ones) transparently and then where to render the tiles into, that is what I am trying to figure out. It feels like multithreading could be very useful here. Right now only chrome appears to support OffscreenCanvas (which can be accessed from webworkers), hence the idea of using skia directly and possibly going a level higher to write whatever kind of multithreaded render logic in rust and run it with wasm and a single "canvas output". Whether skia is the right choice here or not is also something I have yet to figure out<p>The ultimate goal is quick startup (prerendered tiles) while simultaneously high performance when updating the entire view (=multiple tiles in parallel). This is mostly a learning project for me
context: I want to build a tile based view (tiles in x/y dimensions + zoom levels). The content of the tiles is loaded from server (shapes mostly) and rendered into tile images client side. I also want the same tiles prerendered as identical images on the server.<p>For this I have a feeling that something like skia is the way to go. Skia can be used via wasm bindings. How I would fetch the shapes and render the tiles (or fetch the prerendered ones) transparently and then where to render the tiles into, that is what I am trying to figure out. It feels like multithreading could be very useful here. Right now only chrome appears to support OffscreenCanvas (which can be accessed from webworkers), hence the idea of using skia directly and possibly going a level higher to write whatever kind of multithreaded render logic in rust and run it with wasm and a single "canvas output". Whether skia is the right choice here or not is also something I have yet to figure out<p>The ultimate goal is quick startup (prerendered tiles) while simultaneously high performance when updating the entire view (=multiple tiles in parallel). This is mostly a learning project for me
"<p>Essentially what I am wondering is if using skia via wasm would allow me to bypass limits on canvas natively (and canvas in webworkers) so that I can render multiple tile images in parallel and then draw them into a single view for the user to interact with. Think google maps or similar but tiles rendered client side<p>Overall this feels like there might be a better way and I am just not seeing it
Can someone explain to me what this drink example is doing?<p><a href="https://jsfiddle.skia.org/canvaskit/e7ac983d9859f89aff1b6d385190919202c2eb53d028a79992892cacceffd209" rel="nofollow">https://jsfiddle.skia.org/canvaskit/e7ac983d9859f89aff1b6d38...</a><p>Just from a brief parse of the code I don't see how the drink could possibly be transforming the way that it is doing. The renderer - drawFrame in this case - isn't doing any heavy lifting to really make all the side animations (drink splash etc) occur.<p>It appears that at least with this example, possibly the others (the lego one?) if they work they've hidden a lot of data in the fetched json data. Which seems not great. I mean the drink json (<a href="https://storage.googleapis.com/skia-cdn/misc/drinks.json" rel="nofollow">https://storage.googleapis.com/skia-cdn/misc/drinks.json</a>) is not human parse-able so I don't see how they made these examples at all. Maybe they made them in Adobe After Effects and then exported the keyframes as json or something, but there's no tutorial or directions that I can see.<p>This is incredibly frustrating because a decent canvas tool is sorely needed (generally). Does anyone see what is going on?<p>EDIT: So they do use lottie files (<a href="https://lottiefiles.com/410-lego-loader" rel="nofollow">https://lottiefiles.com/410-lego-loader</a>). But lottie files can already be exported to javascript incredibly easily, so unless you <i>really</i> need the extra performance of WASM this doesn't appear to add anything. Am I still missing something?
Cool, but why?<p>Any browser already includes the very same set of graphic primitives that Skia provides. Just to render what you see on the screen right now.<p>Why not just to expose all that as API for WASM or whatever?
It's less than 50KB Gzipped, not bad at all.<p><a href="https://bundlephobia.com/result?p=canvaskit-wasm@0.6.0" rel="nofollow">https://bundlephobia.com/result?p=canvaskit-wasm@0.6.0</a>