feat: add live V2X Cesium preview overlay
This commit is contained in:
@@ -127,12 +127,33 @@ function normalizeAreaConfig(raw, options = {}) {
|
||||
officeOverrides: raw.blender?.officeOverrides || raw.blender?.office_overrides || "",
|
||||
roadProvider: roadProviderOption(raw.blender?.roadProvider ?? "native"),
|
||||
},
|
||||
v2xPreview: normalizeV2xPreviewConfig(raw.v2xPreview),
|
||||
compress,
|
||||
budget,
|
||||
outputs,
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeV2xPreviewConfig(raw) {
|
||||
if (raw !== undefined && (raw === null || typeof raw !== "object" || Array.isArray(raw))) {
|
||||
throw new Error("v2xPreview must be an object");
|
||||
}
|
||||
const value = raw || {};
|
||||
const text = (name, fallback) => {
|
||||
const item = value[name] ?? fallback;
|
||||
if (typeof item !== "string") throw new Error(`v2xPreview.${name} must be a string`);
|
||||
return item.trim();
|
||||
};
|
||||
return {
|
||||
enabled: booleanOption(value.enabled, false, "v2xPreview.enabled"),
|
||||
// Relative defaults keep credentials and private service origins out of the
|
||||
// generated preview. Production should reverse-proxy these prefixes.
|
||||
apiBaseUrl: text("apiBaseUrl", "/api"),
|
||||
wsBaseUrl: text("wsBaseUrl", "/websocket"),
|
||||
crossCode: text("crossCode", ""),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeJunctionTemplates(raw, repoRoot) {
|
||||
if (raw === undefined || raw === null) return { enabled: false, references: [] };
|
||||
if (typeof raw !== "object" || Array.isArray(raw)) throw new Error("nativeRoad.junctionTemplates must be an object");
|
||||
|
||||
Reference in New Issue
Block a user