I've ported the GPU code that OpenEmulator uses to WebGL. You can view a demo here: https://zellyn.com/apple2shader/ (source is on github).
I also ported it to Javascript, in an Observable notebook, with some attempt at explaining what was going on, here: https://observablehq.com/@zellyn/apple-ii-ntsc-emulation-ope...
This was my attempt to understand what the code was doing, but I went down the “I should learn signal processing” rabbit hole for a while and eventually got distracted.