Added crossOrign flag to images so that we can load them correctly when origins are different.

This commit is contained in:
MattMo 2022-01-05 17:08:12 -08:00
parent 9b24fd186c
commit ee26b122e6

View File

@ -15,6 +15,7 @@ class Aperture {
img.onload = () => resolve(); img.onload = () => resolve();
img.onerror = () => resolve(); img.onerror = () => resolve();
}); });
img.crossOrigin = "Anonymous";
img.src = image; img.src = image;
await promise; await promise;
} }
@ -56,6 +57,7 @@ class Aperture {
img.onload = () => resolve(); img.onload = () => resolve();
img.onerror = () => resolve(); img.onerror = () => resolve();
}); });
img.crossOrigin = "Anonymous";
img.src = image; img.src = image;
await promise; await promise;
@ -89,6 +91,7 @@ class Aperture {
img.onload = () => resolve(); img.onload = () => resolve();
img.onerror = () => resolve(); img.onerror = () => resolve();
}); });
img.crossOrigin = "Anonymous";
img.src = image; img.src = image;
await promise; await promise;
} }