auto-git:
[change] tests/unit/world-background-renderer.test.ts
This commit is contained in:
@@ -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
|
});
|
||||||
})
|
const lateTwilight = resolveWorldEnvironmentState(world.background, dayTexture, {
|
||||||
).toEqual({
|
texture: nightTexture,
|
||||||
texture: dayTexture,
|
opacity: 0.75,
|
||||||
intensity: 0.5
|
environmentIntensity: 0.8
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(
|
expect(earlyTwilight.texture).toBe(dayTexture);
|
||||||
resolveWorldEnvironmentState(world.background, dayTexture, {
|
expect(earlyTwilight.intensity).toBeCloseTo(0.5);
|
||||||
texture: nightTexture,
|
expect(lateTwilight.texture).toBe(nightTexture);
|
||||||
opacity: 0.75,
|
expect(lateTwilight.intensity).toBeCloseTo(0.7);
|
||||||
environmentIntensity: 0.8
|
|
||||||
})
|
|
||||||
).toEqual({
|
|
||||||
texture: nightTexture,
|
|
||||||
intensity: 0.7000000000000001
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
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", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user