5f0e3a158a
This makes our calls to emscripten::val a bit more consistent. Adds in the macro SkPathOrVal to self-document where it's really a SkPath we are returning, but C++ doesn't realize SkPath and emscripten::val::null() can be the same type. Casting SkPath via emscripten::val() is basically a no-op, since Emscripten bind seems to be doing it under the hood anyway. No functional changes, except when there would be a failure, methods will return null instead of an empty SkPath. Bug: skia:8216 Change-Id: I1fff620d5aa50ec4a57f76e706d8d005ea26605f Reviewed-on: https://skia-review.googlesource.com/145728 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> |
||
---|---|---|
.. | ||
docker | ||
npm-wasm | ||
.gitignore | ||
compile.sh | ||
Makefile | ||
pathkit_wasm_bindings.cpp | ||
README.md | ||
serve.py |
PathKit WASM API
This library lets you use Skia's feature-rich PathOps API in the browser.
Compiling the source
Download the Enscriptem SDK.
Set the EMSDK environment variable to the directory you installed it to.
Run ./experimental/pathkit/compile.sh
to compile a production, WASM build to $SKIA_HOME/out/pathkit
.
Add "--help" for more options.