mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-22 19:49:31 -07:00
add willReadFrequently attribute to radar context
This commit is contained in:
@@ -170,7 +170,7 @@ class Radar extends WeatherDisplay {
|
|||||||
const cropCanvas = document.createElement('canvas');
|
const cropCanvas = document.createElement('canvas');
|
||||||
cropCanvas.width = 640;
|
cropCanvas.width = 640;
|
||||||
cropCanvas.height = 367;
|
cropCanvas.height = 367;
|
||||||
const cropContext = cropCanvas.getContext('2d');
|
const cropContext = cropCanvas.getContext('2d', { willReadFrequently: true });
|
||||||
cropContext.imageSmoothingEnabled = false;
|
cropContext.imageSmoothingEnabled = false;
|
||||||
cropContext.drawImage(workingCanvas, radarSourceX, radarSourceY, (radarOffsetX * 2), (radarOffsetY * 2.33), 0, 0, 640, 367);
|
cropContext.drawImage(workingCanvas, radarSourceX, radarSourceY, (radarOffsetX * 2), (radarOffsetY * 2.33), 0, 0, 640, 367);
|
||||||
// clean the image
|
// clean the image
|
||||||
|
|||||||
Reference in New Issue
Block a user