Update CSS for runner canvas and add new test cases
This commit is contained in:
@@ -1081,6 +1081,7 @@ button:disabled {
|
||||
.runner-canvas {
|
||||
flex: 1 1 auto;
|
||||
cursor: grab;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.viewport-canvas canvas,
|
||||
@@ -1090,6 +1091,11 @@ button:disabled {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.runner-canvas canvas {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.viewport-canvas__overlay {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
@@ -1255,9 +1261,8 @@ button:disabled {
|
||||
.runner-canvas__background-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 180ms linear;
|
||||
}
|
||||
|
||||
.runner-canvas__loading-overlay--hidden {
|
||||
|
||||
@@ -52,6 +52,11 @@ describe("runtime project time", () => {
|
||||
dayCount: 0,
|
||||
dayLengthMinutes: 24
|
||||
});
|
||||
const lateDawn = resolveRuntimeDayNightWorldState(world, time, {
|
||||
timeOfDayHours: 7.9,
|
||||
dayCount: 0,
|
||||
dayLengthMinutes: 24
|
||||
});
|
||||
const postSunset = resolveRuntimeDayNightWorldState(world, time, {
|
||||
timeOfDayHours: 20.5,
|
||||
dayCount: 0,
|
||||
@@ -85,6 +90,10 @@ describe("runtime project time", () => {
|
||||
);
|
||||
expect(midnight.moonLight?.intensity ?? 0).toBeGreaterThan(0);
|
||||
expect(preSunrise.moonLight?.intensity ?? 0).toBeGreaterThan(0);
|
||||
expect(dawn.moonLight?.intensity ?? 0).toBeGreaterThan(0);
|
||||
expect(lateDawn.moonLight?.intensity ?? 0).toBeLessThan(
|
||||
dawn.moonLight?.intensity ?? 0
|
||||
);
|
||||
expect(postSunset.moonLight?.intensity ?? 0).toBeGreaterThan(0);
|
||||
expect(noon.moonLight).toBeNull();
|
||||
expect(preSunrise.nightBackgroundOverlay?.assetId).toBe("asset-night-sky");
|
||||
|
||||
Reference in New Issue
Block a user