Add advanced rendering settings to world tests

This commit is contained in:
2026-04-02 20:54:49 +02:00
parent 33facf37fe
commit 300d34ebf6
2 changed files with 12 additions and 0 deletions

View File

@@ -17,6 +17,11 @@ describe("createSetWorldSettingsCommand", () => {
bottomColorHex: "#18212b"
};
nextWorld.ambientLight.intensity = 0.45;
nextWorld.advancedRendering.enabled = true;
nextWorld.advancedRendering.shadows.enabled = true;
nextWorld.advancedRendering.shadows.mapSize = 4096;
nextWorld.advancedRendering.toneMapping.mode = "reinhard";
nextWorld.advancedRendering.toneMapping.exposure = 1.35;
store.executeCommand(
createSetWorldSettingsCommand({

View File

@@ -12,6 +12,8 @@ describe("world settings helpers", () => {
expect(clone).not.toBe(source);
expect(clone.background).not.toBe(source.background);
expect(clone.sunLight.direction).not.toBe(source.sunLight.direction);
expect(clone.advancedRendering).not.toBe(source.advancedRendering);
expect(clone.advancedRendering.shadows).not.toBe(source.advancedRendering.shadows);
});
it("switches a solid background into a gradient while preserving the authored color as the top edge", () => {
@@ -73,5 +75,10 @@ describe("world settings helpers", () => {
right.sunLight.direction.x = right.sunLight.direction.x + 0.25;
expect(areWorldSettingsEqual(left, right)).toBe(false);
right.sunLight.direction.x = left.sunLight.direction.x;
right.advancedRendering.bloom.intensity = right.advancedRendering.bloom.intensity + 0.1;
expect(areWorldSettingsEqual(left, right)).toBe(false);
});
});