Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 882 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 882 Bytes

Rust WASM requestAnimationFrame() template

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.

Live demo

See the template in action.

How to build

git clone [email protected]:dipdowel/rust-wasm-raf-template.git
cd rust-wasm-raf-template
wasm-pack build --target web

How to run

While in rust-wasm-raf-template:

python3 -m http.server

Then open your browser and go to http://localhost:8000.

Keywords

Rust, wasm, WebAssembly requestAnimationFrame, requestAnimationFrame(), request_animation_frame, request_animation_frame() canvas, animation, template