// Acts as a public static class class Util { /** Pastes the source image data on the destination image data, keeping the pixels where the * source image data is transparent * * @param {*} source * @param {*} destination */ static pasteData(underlyingImageData, pasteData, finalContext) { for (let i=0; i= 0 && mousePos[1] >= 0 && canvasSize[0] > mousePos[0] && canvasSize[1] > mousePos[1]; } static getFileExtension(fileName) { return (fileName.substring(fileName.lastIndexOf('.')+1, fileName.length) || fileName).toLowerCase(); } }