1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 15:15:45 +02:00
This commit is contained in:
syuilo
2026-04-27 17:13:25 +09:00
parent 130a43f39a
commit 1d71c0c6dd
3 changed files with 14 additions and 0 deletions

View File

@@ -3565,3 +3565,4 @@ _room:
yourDeviceNotSupported_title: "お使いのデバイスはMisskeyRoomをサポートしていません。"
yourDeviceNotSupported_description: "MisskeyRoomを動作させるには、WebGPUをサポートするデバイスが必要です。"
failedToInitialize: "初期化に失敗しました"
crushed_description: "バグ、またはデバイスのリソース不足の可能性が考えられます。"

View File

@@ -12,6 +12,8 @@ import type { ShallowRef } from 'vue';
import type { RoomState } from './engine.js';
import type { ObjectDef, RoomStateObject } from './object.js';
import * as sound from '@/utility/sound.js';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
export type RoomControllerOptions = {
workerMode?: boolean;
@@ -83,6 +85,13 @@ export class RoomController {
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance' });
babylonEngine.compatibilityMode = false;
babylonEngine.enableOfflineSupport = false;
babylonEngine.onContextLostObservable.add(() => {
os.alert({
type: 'error',
title: i18n.ts.somethingHappened,
text: i18n.ts._room.crushed_description,
});
});
await babylonEngine.initAsync();
if (this.options.resolution === 2) babylonEngine.setHardwareScalingLevel(0.5);
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);

View File

@@ -13303,5 +13303,9 @@ export interface Locale extends ILocale {
* 初期化に失敗しました
*/
"failedToInitialize": string;
/**
* バグ、またはデバイスのリソース不足の可能性が考えられます。
*/
"crushed_description": string;
};
}