auto-git:

[change] tests/unit/world-background-renderer.test.ts
This commit is contained in:
2026-04-22 13:00:28 +02:00
parent 490312408c
commit 8e1733ab25

View File

@@ -32,27 +32,21 @@ describe("resolveWorldEnvironmentState", () => {
environmentIntensity: 0.4 environmentIntensity: 0.4
}; };
expect( const earlyTwilight = resolveWorldEnvironmentState(world.background, dayTexture, {
resolveWorldEnvironmentState(world.background, dayTexture, {
texture: nightTexture, texture: nightTexture,
opacity: 0.25, opacity: 0.25,
environmentIntensity: 0.8 environmentIntensity: 0.8
})
).toEqual({
texture: dayTexture,
intensity: 0.5
}); });
const lateTwilight = resolveWorldEnvironmentState(world.background, dayTexture, {
expect(
resolveWorldEnvironmentState(world.background, dayTexture, {
texture: nightTexture, texture: nightTexture,
opacity: 0.75, opacity: 0.75,
environmentIntensity: 0.8 environmentIntensity: 0.8
})
).toEqual({
texture: nightTexture,
intensity: 0.7000000000000001
}); });
expect(earlyTwilight.texture).toBe(dayTexture);
expect(earlyTwilight.intensity).toBeCloseTo(0.5);
expect(lateTwilight.texture).toBe(nightTexture);
expect(lateTwilight.intensity).toBeCloseTo(0.7);
}); });
it("fades the night environment in when the authored day background has no image environment", () => { it("fades the night environment in when the authored day background has no image environment", () => {