release: bump version to 0.54.0
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled

This commit is contained in:
linkong
2026-05-13 14:26:47 +08:00
parent d9efd98d26
commit 3b4347c87d
11 changed files with 98 additions and 45 deletions

View File

@@ -339,13 +339,13 @@ export const SATELLITE_CONFIG = {
dotZoomScalePower: 1,
ringSize: 0.07,
apiPath: '/api/v1/visualization/geo/satellites',
breathingSpeed: 0.08,
breathingScaleAmplitude: 0.15,
breathingOpacityMin: 0.5,
breathingOpacityMax: 0.8,
breathingSpeed: 0.036,
breathingScaleAmplitude: 0.22,
breathingOpacityMin: 0.34,
breathingOpacityMax: 0.9,
dotBreathingSpeed: 0.12,
dotBreathingScaleAmplitude: 0.2,
dotOpacityMin: 0.7,
dotBreathingScaleAmplitude: 0.28,
dotOpacityMin: 0.42,
dotOpacityMax: 1.0
};

View File

@@ -782,6 +782,7 @@ function getCurrentSharedSettingsSnapshot() {
rotationMode,
cruiseModules: getCruiseModules(),
satelliteDisplayStyle: getSatelliteDisplayStyle(),
trailsEnabled: getShowTrails(),
layerVisibility: Object.fromEntries(
getPersistedLayers().map((layer) => [layer.id, Boolean(layer.getVisible?.())]),
),
@@ -834,6 +835,7 @@ function cloneEarthSettings(settings) {
cruiseModules: [...(settings.shared.cruiseModules || DEFAULT_CRUISE_MODULES)],
satelliteDisplayStyle:
settings.shared.satelliteDisplayStyle || DEFAULT_SATELLITE_DISPLAY_STYLE,
trailsEnabled: settings.shared.trailsEnabled !== false,
terrainOpacity: settings.shared.terrainOpacity,
dayNightEnabled: settings.shared.dayNightEnabled,
defaultEarthZoom: settings.shared.defaultEarthZoom,
@@ -978,6 +980,11 @@ function normalizeEarthSettings(rawSettings, defaults) {
typeof sharedSettings?.interactableCompactDotsEnabled === "boolean"
? sharedSettings.interactableCompactDotsEnabled
: defaults.shared.interactableCompactDotsEnabled;
const nextTrailsEnabled = typeof sharedSettings?.trailsEnabled === "boolean"
? sharedSettings.trailsEnabled
: typeof inputLayerVisibility.trails === "boolean"
? inputLayerVisibility.trails
: defaults.shared.trailsEnabled;
return {
version: EARTH_SETTINGS_VERSION,
@@ -987,6 +994,7 @@ function normalizeEarthSettings(rawSettings, defaults) {
? nextCruiseModules
: [...DEFAULT_CRUISE_MODULES],
satelliteDisplayStyle: nextSatelliteDisplayStyle,
trailsEnabled: nextTrailsEnabled,
layerVisibility: normalizedLayerVisibility,
terrainOpacity: Number.isFinite(nextTerrainOpacity)
? nextTerrainOpacity
@@ -1371,6 +1379,10 @@ async function applyEarthSettings(settings, { applyLayers = true } = {}) {
persist: false,
suppressStatus: true,
});
setTrailsDisplayEnabled(settings.shared.trailsEnabled, {
persist: false,
silent: true,
});
setSatelliteIdleBreathingEnabled(settings.shared.satelliteIdleBreathingEnabled, {
persist: false,
suppressStatus: true,
@@ -1774,14 +1786,34 @@ async function setVesselsLayerEnabled(button, enabled, { persist = true, silent
}
}
function setTrailsLayerEnabled(button, enabled, { persist = true, silent = false } = {}) {
function syncTrailsDisplayControls() {
const trailsEnabled = getShowTrails();
const disabledState = getLayerDisabledState("trails");
document.querySelectorAll("[data-trails-toggle]").forEach((toggle) => {
if (!(toggle instanceof HTMLInputElement)) return;
toggle.checked = trailsEnabled;
toggle.disabled = disabledState.disabled;
const label = toggle.closest("label");
label?.classList.toggle("is-disabled", disabledState.disabled);
if (label instanceof HTMLElement) {
if (disabledState.disabled && disabledState.tooltip) {
label.title = disabledState.tooltip;
} else {
label.removeAttribute("title");
}
}
});
}
function setTrailsDisplayEnabled(enabled, { persist = true, silent = false } = {}) {
toggleTrails(enabled);
const disabledState = getLayerDisabledState("trails");
setLayerButtonState(button, {
setLayerButtonState(getLayerButton("trails"), {
active: enabled,
disabled: disabledState.disabled,
tooltip: disabledState.tooltip || (enabled ? "隐藏轨迹" : "显示轨迹"),
});
syncTrailsDisplayControls();
syncMobileLayerCards();
if (persist) persistEarthSettings();
if (!silent) {
@@ -1798,6 +1830,7 @@ function syncTrailsAvailability() {
disabled: disabledState.disabled,
tooltip: disabledState.tooltip || (trailsEnabled ? "隐藏轨迹" : "显示轨迹"),
});
syncTrailsDisplayControls();
syncMobileLayerCards();
}
@@ -2021,23 +2054,6 @@ function getBuiltinLayerDefinitions() {
setVisible: (visible, options = {}) =>
setSatellitesLayerEnabled(getLayerButton("satellites"), visible, options),
},
{
id: "trails",
buttonId: "toggle-trails",
icon: "timeline",
label: "轨迹",
meta: "Trails",
keywords: "轨迹 trails",
defaultActive: true,
displayOrder: 20,
startupPriority: null,
startupMode: "visible",
startupLabel: "轨迹",
startupMessage: "",
getVisible: () => getShowTrails(),
setVisible: (visible, options = {}) =>
setTrailsLayerEnabled(getLayerButton("trails"), visible, options),
},
{
id: "terrain",
buttonId: "toggle-terrain",
@@ -2698,6 +2714,13 @@ function setupSettingsControls() {
});
});
document.querySelectorAll("[data-trails-toggle]").forEach((toggle) => {
if (!(toggle instanceof HTMLInputElement)) return;
bindListener(toggle, "change", () => {
setTrailsDisplayEnabled(toggle.checked);
});
});
document.querySelectorAll("[data-interactable-compact-dots-toggle]").forEach((toggle) => {
if (!(toggle instanceof HTMLInputElement)) return;
bindListener(toggle, "change", () => {

View File

@@ -681,9 +681,9 @@ function createSatelliteTwinkleState(index) {
return {
phase: hashSatelliteUnit(index, 1) * Math.PI * 2,
secondaryPhase: hashSatelliteUnit(index, 2) * Math.PI * 2,
speed: 0.62 + hashSatelliteUnit(index, 3) * 1.45,
floor: hashSatelliteUnit(index, 4) * 0.22,
intensity: 0.48 + hashSatelliteUnit(index, 5) * 0.52,
speed: 0.38 + hashSatelliteUnit(index, 3) * 0.72,
floor: hashSatelliteUnit(index, 4) * 0.16,
intensity: 0.68 + hashSatelliteUnit(index, 5) * 0.62,
};
}