Commit Graph

6 Commits

Author SHA1 Message Date
Joel Martin 876a691d2a wasm: use port 7080, use kanaka/rust-wasm image 2018-07-31 11:02:37 -05:00
Joel Martin 5372d169cc wasm: simplify down to just use MODE 3 (draw3).
draw3 was the pretty clear winner performance-wise.
2018-07-26 16:05:55 +09:00
Joel Martin af54d4b95e wasm: use requestAnimationFrame and report FPS. 2018-07-26 15:38:33 +09:00
Joel Martin 82b8ff1c6a wasm: tests/results for 3 modes.
- mode 1: call putImageData from rust/wasm. This involves copying the
  image data via the wasm-bindgen API.
- mode 2: allocating memory in rust/wasm and returning reference to it
  for JS code. JS code calls draw2 using the reference so now image
  data is copying in either direction.
- mode 3: same as mode 2 but the draw3 function treats the memory as
  a vector of u32 instead of a vector of u8.
2018-07-26 14:19:01 +09:00
Joel Martin 9efc362c82 wasm: draw/fill a canvas with solid color. 2018-07-25 16:48:48 +09:00
Joel Martin 62ad00fedf wasm: hello world with rust, wasm-bindgen, webpack 2018-07-25 16:02:40 +09:00