Filyus
Filyus
72: var fileExt = ""; 82: fileExt = path.extname(filepath).toLocaleLowerCase(); 83: var match, possibleExtensions = ["", ".html", ".htm", ".xhtml", ".php", ".svg"]; 84: if (hasNoOrigin && (possibleExtensions.indexOf(fileExt) > -1)) { 112: if...
Just fixed for myself, maybe someone will come in handy.
I have no time. I will be grateful if you do it for me.
I finally did it.
I need to say that the idea with the eraser needs some work, because of it is necessary to create a new `` and parent group every time you erase...
@jonobr1 I found something, but here you have to change the transparency, not the luminance. ```js context.globalCompositeOperation = "destination-out"; //"xor" also can be used context.strokeStyle = "rgba(0, 0, 0, 1.0)";...
Most likely this formula is used in SVG mask for transparency: ```js const alpha = 0.2126 * red + 0.7152 * green + 0.0722 * blue; ``` with only gray...
Example of computing alpha with `getImageData`: https://jsfiddle.net/c73fLkzn/ ```js for (let i = 0; i < data.length; i += 4) { const red = data[i]; const green = data[i + 1];...
Well, I figured out the problem with`globalCompositeOperation`. Itersections will change transparency: http://jsfiddle.net/7gkdn6ha/1/ But converting colors to alpha with `getImageData` as described above solves the problem.