2023-07-27 14:31:52 +09:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-06-26 10:45:14 +09:00
|
|
|
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
2023-09-19 17:08:55 +09:00
|
|
|
// 環境によってはOffscreenCanvasが存在しないため
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
|
|
const gl = canvas?.getContext('webgl2');
|
2023-05-19 09:44:06 +09:00
|
|
|
if (gl) {
|
2023-07-27 14:31:52 +09:00
|
|
|
postMessage({ result: true });
|
2023-05-19 09:44:06 +09:00
|
|
|
} else {
|
2023-07-27 14:31:52 +09:00
|
|
|
postMessage({ result: false });
|
2023-05-19 09:44:06 +09:00
|
|
|
}
|