I think you have already touched on the most straightforward approach to solving this issue.
- , mousemove , , . left-mouse , , . - , , . - 9x9 pixels, , . , , odd , .
, getImageData() . : getImageData(center_x - Math.floor(window_size / 2), center_y - Math.floor(window_size / 2), window_size, window_size), . , , - , , .
, , , , , ( ). .
. , (.. point-in-path ), . point-in-path, , .
: , , getPixel(), WebGL . WebGL , , , , . , WebGL, , 2D- ( , ).