fix: failed to execute 'toDataURL' #163
This commit is contained in:
@@ -28,6 +28,7 @@ export class ImageParticle {
|
|||||||
} else {
|
} else {
|
||||||
const imageLoadPromise = new Promise((resolve, reject) => {
|
const imageLoadPromise = new Promise((resolve, reject) => {
|
||||||
const img = new Image()
|
const img = new Image()
|
||||||
|
img.setAttribute('crossOrigin', 'Anonymous')
|
||||||
img.src = element.value
|
img.src = element.value
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
ctx.drawImage(img, x, y, width, height)
|
ctx.drawImage(img, x, y, width, height)
|
||||||
|
|||||||
Reference in New Issue
Block a user