diff --git a/packages/frontend-embed/src/workers/draw-blurhash.ts b/packages/frontend-embed/src/workers/draw-blurhash.ts index 6e49f6bf66..0f97a525a8 100644 --- a/packages/frontend-embed/src/workers/draw-blurhash.ts +++ b/packages/frontend-embed/src/workers/draw-blurhash.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + import { render } from 'buraha'; const canvas = new OffscreenCanvas(64, 64); diff --git a/packages/frontend-embed/src/workers/test-webgl2.ts b/packages/frontend-embed/src/workers/test-webgl2.ts index b203ebe666..aa512bd959 100644 --- a/packages/frontend-embed/src/workers/test-webgl2.ts +++ b/packages/frontend-embed/src/workers/test-webgl2.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1); // 環境によってはOffscreenCanvasが存在しないため // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition diff --git a/packages/frontend/src/workers/draw-blurhash.ts b/packages/frontend/src/workers/draw-blurhash.ts index 6e49f6bf66..0f97a525a8 100644 --- a/packages/frontend/src/workers/draw-blurhash.ts +++ b/packages/frontend/src/workers/draw-blurhash.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + import { render } from 'buraha'; const canvas = new OffscreenCanvas(64, 64); diff --git a/packages/frontend/src/workers/test-webgl2.ts b/packages/frontend/src/workers/test-webgl2.ts index b203ebe666..aa512bd959 100644 --- a/packages/frontend/src/workers/test-webgl2.ts +++ b/packages/frontend/src/workers/test-webgl2.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1); // 環境によってはOffscreenCanvasが存在しないため // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition