1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 12:55:30 +02:00

Update engine.ts

This commit is contained in:
syuilo
2026-05-03 17:02:36 +09:00
parent 479e9af17e
commit d4fa5cf7ca

View File

@@ -809,8 +809,10 @@ export class RoomEngine extends EventEmitter {
public async changeEnvType(type: RoomState['env']['type'], forInit = false) {
this.roomState.env.type = type;
this.sr.disableSnapshotRendering();
this.pauseRender();
if (!forInit) {
this.sr.disableSnapshotRendering();
this.pauseRender();
}
const onMeshUpdatedCallback = (meshes: BABYLON.AbstractMesh[]) => {
for (const m of meshes) {
@@ -868,8 +870,10 @@ export class RoomEngine extends EventEmitter {
this.camera.maxZ = this.envManager.maxCameraZ;
this.resumeRender();
this.sr.enableSnapshotRendering();
if (!forInit) {
this.resumeRender();
this.sr.enableSnapshotRendering();
}
if (!forInit) {
this.ev('changeRoomState', { roomState: this.roomState });