skia2/site/user/modules/canvaskit.md
Kevin Lubick e5a06e7bd3 [canvaskit] Update examples after enum name change
Docs-Preview: https://skia.org/?cl=169186
Bug: skia:
Change-Id: I083a07cc44e1534f4aeedc4e25e8ed786e29f168
Reviewed-on: https://skia-review.googlesource.com/c/169186
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-07 15:45:14 +00:00

13 KiB

CanvasKit - Skia + WebAssembly

Skia now offers a WebAssembly build for easy deployment of our graphics APIs on the web.

CanvasKit provides a playground for testing new Canvas and SVG platform APIs, enabling fast-paced development on the web platform. It can also be used as a deployment mechanism for custom web apps requiring cutting-edge features, like Skia's Lottie animation support.

Features

  • WebGL context encapsulated as an SkSurface, allowing for direct drawing to an HTML canvas
  • Core set of Skia canvas/paint/path/text APIs available, see bindings
  • Draws to a hardware-accelerated backend
  • Security tested with Skia's fuzzers

Samples

An Interactive Path

Star JSFiddle
Ink JSFiddle

Skottie (click for fiddles)

Nima (click for fiddle)

Lottie files courtesy of the lottiefiles.com community: Lego Loader, I'm thirsty, Confetti, Onboarding

Nima files courtesy of 2dimensions.com: Robot

Test server

Test your code on our CanvasKit Fiddle

Download

Work is underway on an npm download. Check back soon.