wasm-bindgen/examples/julia_set
Alex Crichton 7b495468f6 Implement support for Uint8ClampedArray
This commit implements support for binding APIs that take
`Uint8ClampedArray` in JS. This is pretty rare but comes up in a
`web-sys` binding or two, and we're now able to bind these APIs instead
of having to omit the bindings.

The `Uint8ClampedArray` type is bound by using the `Clamped` marker
struct in Rust. For example this is declaring a JS API that takes
`Uint8ClampedArray`:

    use wasm_bindgen::Clamped;

    #[wasm_bindgen]
    extern {
        fn takes_clamped(a: Clamped<&[u8]>);
    }

The `Clamped` type currently only works when wrapping the `&[u8]`, `&mut
[u8]`, and `Vec<u8>` types. Everything else will produce an error at
`wasm-bindgen` time.

Closes #421
2018-09-24 13:58:37 -07:00
..
src Implement support for Uint8ClampedArray 2018-09-24 13:58:37 -07:00
styles adds julia set example (#419) 2018-07-08 10:57:19 -05:00
.gitignore adds julia set example (#419) 2018-07-08 10:57:19 -05:00
build.sh adds julia set example (#419) 2018-07-08 10:57:19 -05:00
Cargo.toml Implement support for Uint8ClampedArray 2018-09-24 13:58:37 -07:00
index.html Reorganize and rewrite examples 2018-09-20 16:45:30 -07:00
index.js adds julia set example (#419) 2018-07-08 10:57:19 -05:00
package.json Examples: use html-webpack-plugin 2018-09-11 08:42:22 +03:00
README.md Build examples and deploy to gh-pages 2018-09-20 20:55:02 -07:00
webpack.config.js Examples: use html-webpack-plugin 2018-09-11 08:42:22 +03:00

Julia Set

View documentation for this example online or View compiled example online

You can build the example locally with:

$ ./build.sh

(or running the commands on Windows manually)

and then visiting http://localhost:8080 in a browser should run the example!