This commit is contained in:
syuilo 2026-04-27 16:51:05 +09:00
commit 76ce6c84c0
3 changed files with 3 additions and 3 deletions

View file

@ -80,7 +80,7 @@ export class RoomController {
}
};
} else {
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true });
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance' });
babylonEngine.compatibilityMode = false;
babylonEngine.enableOfflineSupport = false;
await babylonEngine.initAsync();

View file

@ -15,7 +15,7 @@ import { deepClone } from '@/utility/clone.js';
import { store } from '@/store.js';
export async function createRoomObjectPreviewEngine(canvas: HTMLCanvasElement) {
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true });
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'low-power' });
babylonEngine.compatibilityMode = false;
babylonEngine.enableOfflineSupport = false;
await babylonEngine.initAsync();

View file

@ -17,7 +17,7 @@ onmessage = async (event) => {
case 'init': {
const roomState = event.data.roomState as RoomState;
canvas = event.data.canvas as HTMLCanvasElement;
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true });
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance' });
babylonEngine.compatibilityMode = false;
babylonEngine.enableOfflineSupport = false;
await babylonEngine.initAsync();