sprig / wasm-dither-example

Example of using WebAssembly with D to dither an image

Home Page:https://allen-garvey.github.io/wasm-dither-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wasm-dither-example

Example of using WebAssembly with D and LDC to dither an image in the browser, and compare performance with a pure JavaScript implementation. Demo at https://allen-garvey.github.io/wasm-dither-example/

Dependencies for running

  • Modern web browser that supports WebAssembly

Dependencies for building

Optional dependencies (for serving files for local development)

  • npm and node >= 10
  • python 2
  • python 3

Getting Started

  • Run make
  • If you have any of the optional dependencies, follow the instructions in the relevant section. Otherwise, you will need a local web server setup to serve files from the docs directory in this repository.

Serving files using npm and node

Serving files with python 2

  • cd into the docs directory in this repository
  • Run python -m SimpleHTTPServer 3000
  • Open your browser to http://localhost:3000

Serving files with python 3

  • cd into the docs directory in this repository
  • Run python3 -m http.server 3000
  • Open your browser to http://localhost:3000

Helpful Resources

License

wasm-dither-example is released under the MIT License. See license.txt for more details.

About

Example of using WebAssembly with D to dither an image

https://allen-garvey.github.io/wasm-dither-example/

License:MIT License


Languages

Language:D 90.0%Language:Makefile 10.0%