Skip to content

Commit

Permalink
Update src/core/textures/ImageTexture.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Mirko Pecora <33352553+pecoram@users.noreply.github.com>
  • Loading branch information
wouterlucas and pecoram authored Dec 11, 2024
1 parent 8932338 commit cb661fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/textures/ImageTexture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export class ImageTexture extends Texture {

async loadImageFallback(src: string, hasAlpha: boolean) {
const img = new Image();
img.crossOrigin = 'anonymous';
if (!(src.startsWith('data:'))) {
img.crossOrigin = 'Anonymous';
}

return new Promise<{ data: HTMLImageElement; premultiplyAlpha: boolean }>(
(resolve) => {
Expand Down

0 comments on commit cb661fd

Please sign in to comment.