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