News for hackers. Stuff that matters.
Re:CanvasKit – Skia and WebAssembly by patientplatypus on Saturday July 20, 2019 @12:50AM (#20484236)
Can someone explain to me what this drink example is doing?

https://jsfiddle.skia.org/canvaskit/e7ac983d9859f89aff1b6d38...

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.

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 (https://storage.googleapis.com/skia-cdn/misc/drinks.json) 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.

This is incredibly frustrating because a decent canvas tool is sorely needed (generally). Does anyone see what is going on?

EDIT: So they do use lottie files (https://lottiefiles.com/410-lego-loader). But lottie files can already be exported to javascript incredibly easily, so unless you really need the extra performance of WASM this doesn't appear to add anything. Am I still missing something?

There are no comments on this comment yet.