I am working on a project where I need certain parts of an image to be transparent after the user selects certain coordinates on the image. I am using React Konva to display the user's selection and the image layers. I understand how I could make the polygon the user selected to be transparent, but how would I use those coordinates from the user's polygon to make the pixels on the image itself transparent?
I am fairly new to using ReactJS and front end developing in general so any help would be greatly appreciated.
Here is my codeSandbox with the basic idea of my code: https://codesandbox.io/s/test-transparency-quyn4x