1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 21:35:38 +02:00
This commit is contained in:
syuilo
2026-04-27 16:58:01 +09:00
parent 76ce6c84c0
commit 9c25c44a8a
3 changed files with 20 additions and 0 deletions

View File

@@ -163,6 +163,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, defineAsyncComponent, nextTick, onMounted, onUnmounted, ref, shallowRef, useTemplateRef, watch } from 'vue';
import * as BABYLON from '@babylonjs/core';
import XObjectCustomizeForm from './room.object-customize-form.vue';
import type { RoomControllerOptions } from '@/world/room/controller.js';
import { definePage } from '@/page.js';
@@ -275,6 +276,15 @@ const roomControllerOptions = computed<RoomControllerOptions>(() => ({
const controller = new RoomController(data, roomControllerOptions.value);
onMounted(async () => {
if (!await BABYLON.WebGPUEngine.IsSupportedAsync) {
os.alert({
type: 'warning',
title: i18n.ts._room.yourDeviceNotSupported_title,
text: i18n.ts._room.yourDeviceNotSupported_description,
});
return;
}
controller.init(canvas.value!);
canvas.value!.focus();