feat(map): add Cesium visual settings and fullscreen-safe scene windows
This commit is contained in:
@@ -15,6 +15,7 @@ import type {
|
||||
MapProviderId,
|
||||
MapRuntimeState,
|
||||
} from "./contracts.js";
|
||||
import {applyMapSceneEffects} from "./sceneEffects.js";
|
||||
import { advanceGhostPins } from "./ghostPins.js";
|
||||
import {
|
||||
parseProviderEndpoint,
|
||||
@@ -495,7 +496,9 @@ function applyPresentation(
|
||||
buildings.maximumScreenSpaceError =
|
||||
settings.buildings_maximum_screen_space_error;
|
||||
buildings.style = new Cesium.Cesium3DTileStyle({
|
||||
color: `color('${settings.buildings_color}', ${settings.buildings_opacity})`,
|
||||
color: settings.buildings_style_default
|
||||
? `Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}, ${settings.buildings_opacity}) : color('#ffffff', ${settings.buildings_opacity})`
|
||||
: `color('${settings.buildings_color}', ${settings.buildings_opacity})`,
|
||||
});
|
||||
}
|
||||
runtime.ghostPins.show = layers.targets;
|
||||
@@ -541,9 +544,9 @@ function applyPresentation(
|
||||
}
|
||||
viewer.shadows = settings.shadows_enabled;
|
||||
const sunDate = Cesium.JulianDate.toDate(Cesium.JulianDate.now());
|
||||
sunDate.setUTCHours(
|
||||
clamp(Math.round(settings.sun_hour), 0, 24),
|
||||
0,
|
||||
if (!settings.sun_time_current) sunDate.setUTCHours(
|
||||
Math.floor(clamp(settings.sun_hour, 0, 24)),
|
||||
Math.round((settings.sun_hour % 1) * 60),
|
||||
0,
|
||||
0,
|
||||
);
|
||||
@@ -556,6 +559,7 @@ function applyPresentation(
|
||||
2,
|
||||
);
|
||||
viewer.scene.light = sun;
|
||||
applyMapSceneEffects(runtime, settings);
|
||||
viewer.scene.requestRender();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user