mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 06:24:15 +02:00
wip
This commit is contained in:
@@ -3565,3 +3565,4 @@ _room:
|
|||||||
yourDeviceNotSupported_title: "お使いのデバイスはMisskeyRoomをサポートしていません。"
|
yourDeviceNotSupported_title: "お使いのデバイスはMisskeyRoomをサポートしていません。"
|
||||||
yourDeviceNotSupported_description: "MisskeyRoomを動作させるには、WebGPUをサポートするデバイスが必要です。"
|
yourDeviceNotSupported_description: "MisskeyRoomを動作させるには、WebGPUをサポートするデバイスが必要です。"
|
||||||
failedToInitialize: "初期化に失敗しました"
|
failedToInitialize: "初期化に失敗しました"
|
||||||
|
crushed_description: "バグ、またはデバイスのリソース不足の可能性が考えられます。"
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import type { ShallowRef } from 'vue';
|
|||||||
import type { RoomState } from './engine.js';
|
import type { RoomState } from './engine.js';
|
||||||
import type { ObjectDef, RoomStateObject } from './object.js';
|
import type { ObjectDef, RoomStateObject } from './object.js';
|
||||||
import * as sound from '@/utility/sound.js';
|
import * as sound from '@/utility/sound.js';
|
||||||
|
import * as os from '@/os.js';
|
||||||
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
export type RoomControllerOptions = {
|
export type RoomControllerOptions = {
|
||||||
workerMode?: boolean;
|
workerMode?: boolean;
|
||||||
@@ -83,6 +85,13 @@ export class RoomController {
|
|||||||
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance' });
|
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance' });
|
||||||
babylonEngine.compatibilityMode = false;
|
babylonEngine.compatibilityMode = false;
|
||||||
babylonEngine.enableOfflineSupport = false;
|
babylonEngine.enableOfflineSupport = false;
|
||||||
|
babylonEngine.onContextLostObservable.add(() => {
|
||||||
|
os.alert({
|
||||||
|
type: 'error',
|
||||||
|
title: i18n.ts.somethingHappened,
|
||||||
|
text: i18n.ts._room.crushed_description,
|
||||||
|
});
|
||||||
|
});
|
||||||
await babylonEngine.initAsync();
|
await babylonEngine.initAsync();
|
||||||
if (this.options.resolution === 2) babylonEngine.setHardwareScalingLevel(0.5);
|
if (this.options.resolution === 2) babylonEngine.setHardwareScalingLevel(0.5);
|
||||||
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
||||||
|
|||||||
@@ -13303,5 +13303,9 @@ export interface Locale extends ILocale {
|
|||||||
* 初期化に失敗しました
|
* 初期化に失敗しました
|
||||||
*/
|
*/
|
||||||
"failedToInitialize": string;
|
"failedToInitialize": string;
|
||||||
|
/**
|
||||||
|
* バグ、またはデバイスのリソース不足の可能性が考えられます。
|
||||||
|
*/
|
||||||
|
"crushed_description": string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user