cbcff385c1
Of note, it is very important for the -DSK_RELEASE/-DSK_DEBUG to match between libskia.a and the WASM bindings, otherwise things like SKDEBUGCODE are sometimes compiled in and sometimes not, which can cause headaches like sizeof() mismatching between .cpp files and .h files. Bug: skia: Change-Id: Id6ef58c44a7c10014a243b36708e0891514f6008 Reviewed-on: https://skia-review.googlesource.com/158341 Reviewed-by: Mike Klein <mtklein@google.com> |
||
---|---|---|
.. | ||
npm-asmjs | ||
npm-wasm | ||
tests | ||
.gitignore | ||
chaining.js | ||
compile.sh | ||
externs.js | ||
helper.js | ||
karma.conf.js | ||
Makefile | ||
package.json | ||
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 ./compile.sh
to compile a production, WASM build to $SKIA_HOME/out/pathkit
.
Add "--help" for more options.
Deploying to npm
# Build all 3 versions (release, test, debug) for both asmjs and WASM
# These binaries will be placed in the proper places of npm-*/bin
# This takes 5-10 minutes.
make npm
# Update the package.json files of both npm-asmjs and npm-wasm
make update-patch # or update-minor or update-major
# Publish both repos
make publish