rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
https://rustwasm.github.io/docs/wasm-bindgen/
Apache License 2.0
7.84k stars 1.08k forks source link

Use web_sys::ImageData in examples/raytrace-parallel #4184

Closed zhiz-m closed 1 month ago

zhiz-m commented 1 month ago

Looks like web_sys now natively exposes the binding to create ImageData from js_sys::Uint8ClampedArray. This feature does some trivial cleanup in examples/raytrace-parallel, the existing code basically lives in a more centralised place now.

Testing: compiles, the example runs fine when served locally to my browser.