View this example online
This is an example of more complex computations needed to generate a fractal (Julia Set). It's also an example of direct interaction with CanvasRenderingContext2D's API via #[wasm_bindgen] macro.
#[wasm_bindgen]
You can build the example with:
$ ./build.sh
(or running the commands on Windows manually)