mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-05 16:24:10 +02:00
clean
This commit is contained in:
@@ -100,7 +100,6 @@ export class RoomController {
|
|||||||
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
if (this.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
||||||
|
|
||||||
this.engine = new RoomEngine(this.roomState.value, {
|
this.engine = new RoomEngine(this.roomState.value, {
|
||||||
canvas,
|
|
||||||
engine: babylonEngine,
|
engine: babylonEngine,
|
||||||
...this.options,
|
...this.options,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ export type RoomEngineEvents = {
|
|||||||
|
|
||||||
export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
||||||
private useGlow: boolean;
|
private useGlow: boolean;
|
||||||
private canvas: HTMLCanvasElement;
|
|
||||||
private engine: BABYLON.WebGPUEngine;
|
private engine: BABYLON.WebGPUEngine;
|
||||||
public scene: BABYLON.Scene;
|
public scene: BABYLON.Scene;
|
||||||
private shadowGeneratorForRoomLight: BABYLON.ShadowGenerator | null = null;
|
private shadowGeneratorForRoomLight: BABYLON.ShadowGenerator | null = null;
|
||||||
@@ -222,7 +221,6 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
}> = new EventEmitter();
|
}> = new EventEmitter();
|
||||||
|
|
||||||
constructor(roomState: RoomState, options: {
|
constructor(roomState: RoomState, options: {
|
||||||
canvas: HTMLCanvasElement;
|
|
||||||
engine: BABYLON.WebGPUEngine;
|
engine: BABYLON.WebGPUEngine;
|
||||||
graphicsQuality: number;
|
graphicsQuality: number;
|
||||||
fps: number | null;
|
fps: number | null;
|
||||||
@@ -238,7 +236,6 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
options: { ...getObjectDef(o.type).options.default, ...o.options },
|
options: { ...getObjectDef(o.type).options.default, ...o.options },
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
this.canvas = options.canvas;
|
|
||||||
|
|
||||||
this.fps = options.fps;
|
this.fps = options.fps;
|
||||||
this.useGlow = options.graphicsQuality >= GRAPHICS_QUALITY_MEDIUM;
|
this.useGlow = options.graphicsQuality >= GRAPHICS_QUALITY_MEDIUM;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ onmessage = async (event) => {
|
|||||||
if (event.data.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
if (event.data.options.resolution === 0.5) babylonEngine.setHardwareScalingLevel(2);
|
||||||
|
|
||||||
engine = new RoomEngine(roomState, {
|
engine = new RoomEngine(roomState, {
|
||||||
canvas,
|
|
||||||
engine: babylonEngine,
|
engine: babylonEngine,
|
||||||
...event.data.options,
|
...event.data.options,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user