diff --git a/src/util/Utils.js b/src/util/Utils.js index be3c946..be69f01 100644 --- a/src/util/Utils.js +++ b/src/util/Utils.js @@ -384,7 +384,9 @@ export const vecArrToObj = (val, useZ = false) => { const pixel = document.createElement('canvas'); pixel.width = 1; pixel.height = 1; -const pixelContext = pixel.getContext('2d'); +const pixelContext = pixel.getContext('2d', { + willReadFrequently: true +}); export const getPixel = (img, x, y) => { pixelContext.drawImage(img, Math.floor(x), Math.floor(y), 1, 1, 0, 0, 1, 1);