~/talk

Canvas Pixel Transformation: Beauty comes slowly

Talkat Conf42 JavaScript 2020 · 2020-09-30..10-01· [web-platform, web-performance]
slides:none on file

A Mapbox canvas is read with Mapbox webgl readPixels and converted into a 2D ImageData array, a flood‑fill area detector paints road‑delimited mosaics, and the prototype runs in a React + TypeScript app. Pixel loop costs dominate: a fullHD frame (~5 million pixels) takes up to 5 seconds (uploader estimated >2s earlier). Moving the flood fill into web workers with worker‑loader prevents UI jank and aborts stale jobs, but overall rendering remains slow and needs a WebGL or WASM reimplementation.

AI-written summary · about

  1. 0:00Canvas pixel manipulation
  2. 2:40React canvas demo setup
  3. 4:50Painting rectangle and pixels
  4. 10:08Canvas size vs Mapbox
  5. 13:06Copying Mapbox pixels
  6. 16:42Area detection algorithm
  7. 23:16UI blocking with workers
  8. 28:46Integrating web workers
  9. 32:19Worker performance
  10. 33:29Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.