Skip to content

Rust + WASM + Canvas2D, a working template with `requestAnimationFrame()` / `request_animation_frame()`

License

Notifications You must be signed in to change notification settings

dipdowel/rust-wasm-raf-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust + WASM + Canvas2D, a working template with `requestAnimationFrame()` / `request_animation_frame()`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published