Skip to content

Instantly share code, notes, and snippets.

@iandanforth
iandanforth / canvascapture.md
Last active October 5, 2022 10:57
Capture WebGL frames to disk

How to capture WebGL/Canvas by piping data over a websocket.

This Gist builds on https://gist.github.com/unconed/4370822 from @unconed.

Instead of the original method which writes to the browsers sandboxed filesystem here we use a websocket connection provided by websocketd to pipe image data to a short python script that writes out the .png files to disk.

Install websocketd