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

Update engine.ts

This commit is contained in:
syuilo
2026-04-14 12:26:15 +09:00
parent 240c055b45
commit 3bad686c71

View File

@@ -36,7 +36,7 @@
// TODO: 近くのオブジェクトの原点に軸を揃えるオプション
const BAKE_TRANSFORM = false; // 実験的
const SNAPSHOT_RENDERING = false; // 実験的
const SNAPSHOT_RENDERING = true; // 実験的
const SNAPSHOT_RENDERING_NON_SUPPORTED_OBJECTS = ['tv', 'aquarium', 'lavaLamp'];
const IGNORE_OBJECTS: string[] = []; // for debug
@@ -786,14 +786,21 @@ export class RoomEngine {
});
if (SNAPSHOT_RENDERING) {
window.setTimeout(() => {
this.engine.snapshotRendering = true;
this.engine.snapshotRenderingMode = BABYLON.Constants.SNAPSHOTRENDERING_FAST;
}, 3000);
const sr = new BABYLON.SnapshotRenderingHelper(this.scene);
window.setInterval(() => {
this.engine.snapshotRenderingReset();
}, 10000);
window.setTimeout(() => {
sr.enableSnapshotRendering();
if (USE_GLOW) {
const gl = new BABYLON.GlowLayer('glow', this.scene, {
//mainTextureFixedSize: 512,
blurKernelSize: 64,
});
gl.intensity = 0.5;
sr.updateMeshesForEffectLayer(gl);
}
}, 3000);
}
}