This is a template for a Rust / WASM project which needs to call requestAnimationFrame() from within rust code in order to animate HTML canvas.
The template is based on the brilliant example by sifyfy.
git clone [email protected]:dipdowel/rust-wasm-raf-template.git
cd rust-wasm-raf-template
wasm-pack build --target webWhile in rust-wasm-raf-template:
python3 -m http.serverThen open your browser and go to http://localhost:8000.
Rust, wasm, WebAssembly requestAnimationFrame, requestAnimationFrame(), request_animation_frame, request_animation_frame() canvas, animation, template