tree: e72a22aa7b3e4e7f5525d42b39bac99b22efd970 [path history] [tgz]
  1. build/
  2. go/
  3. modules/
  4. pages/
  5. sources/
  6. wasm_libs/
  7. .eslintrc.js
  8. .gitignore
  9. BUILD.bazel
  10. create-named-scraps.sh
  11. Makefile
  12. README.md
  13. shaders.karma.conf.js
shaders/README.md

Shaders

This is the code for https://shaders.skia.org, a site to allow editing and running SkSL shaders using WASM in the browser.

To run shaders locally with a custom build of CanvasKit, copy the js and wasm files to //shaders/wasm_libs/local_build. Then, copy @skia//canvaskit/npm-build/types/index.d.ts to //shaders/wasm_libs/local_build/canvaskit.d.ts and run:

make run-with-custom

Do not check in those files you copied. You may also need to copy the canvaskit.d.ts to //shaders/wasm_libs/types/ in order to appease some IDEs.

When making changes to this app that require a newer version of CanvasKit, be sure to update WORKSPACE, specifically the entry for container_pull_skia_wasm.

Images

Source images are stored in gs://skia-public-shader-images and should be make world readable so the build of shaders can work from anywhere.