/**
* Procedural SVG Viewport Frames & Bezels for Observation Mode
*/
window.ObservationBezels = {
getViewportFrameSvg(universeId, presetId, engine) {
if (universeId === 'spacestations') {
// Space Stations has its own authentic native station viewport in observationStage!
return '';
}
if (universeId === 'starfleet') {
let era = 'tng';
const preset = (typeof StarshipPresets !== 'undefined' && presetId) ? StarshipPresets[presetId] : null;
if (preset && preset.era) era = preset.era;
if (era === 'tos') {
// TOS Original Series - hexagonal bridge viewscreen bezel
return `
`;
}
if (era === 'voyager') {
// Voyager Intrepid Class - sleeker rounded modern arch, cyan accent
return `
`;
}
if (era === 'ds9') {
// Defiant Class / DS9 Ops - angular, aggressive warship framing
return `
`;
}
if (era === 'nx') {
// Enterprise NX-01 - early, industrial, submarine-like bulkhead
return `
`;
}
// era === 'tng' (or unrecognized) falls through to the default Ten Forward arch below.
}
if (universeId === 'industrial' || universeId === 'outlaw') {
// Heavy Industrial Reinforced Bulkhead & Riveted Blast Shutter Framing
return `
`;
}
if (universeId === 'whoniverse') {
// Gallifreyan Observatory Roundel Viewing Portal / TARDIS Frame
// Console era (classic/revival/modern) tints the rings and label.
let era = 'revival';
const wUniverse = (typeof UniverseRegistry !== 'undefined') ? UniverseRegistry['whoniverse'] : null;
const preset = (wUniverse && wUniverse.presets && presetId) ? wUniverse.presets[presetId] : null;
if (preset && preset.era) era = preset.era;
let ringA = '#d4af37', ringB = '#00e5ff', dash = '16 12', labelColor = '#d4af37';
let label = 'T.A.R.D.I.S. TEMPORAL VORTEX OBSERVATION PORTAL';
if (era === 'classic') {
ringA = '#b45309'; ringB = '#f5deb3'; dash = '22 10'; labelColor = '#f5deb3';
label = 'TYPE 40 CLASSIC CONSOLE // TEMPORAL VIEWPORT';
} else if (era === 'modern') {
ringA = '#e2e8f0'; ringB = '#94a3b8'; dash = '4 6'; labelColor = '#e2e8f0';
label = 'INFINITE WHITE // TEMPORAL OBSERVATION PORTAL';
}
return `
`;
}
if (universeId === 'deepspace') {
// Terok Nor / DS9 Arched Station Viewport overlooking Docking Pylons
return `
`;
}
if (universeId === 'bioships' || universeId === 'retrofuture' || universeId === 'military' || universeId === 'comedy') {
// These four universes previously had no case here at all and silently fell through
// to the Starfleet default below, which hardcodes "USS ENTERPRISE" into the plaque --
// showing the wrong ship name in every one of these themes' Observation view.
// Fix: reuse the same bulkhead shape (it already themes correctly via the CSS
// accent variables set per universe), but pull the REAL ship/deck name for the
// plaque text from this universe's own preset data, same source the header uses.
const universe = UniverseRegistry[universeId];
const preset = (universe && universe.presets && presetId) ? universe.presets[presetId] : null;
const plaqueText = preset
? `${preset.name.toUpperCase()} // OBSERVATION DECK`
: `${universe ? universe.name : universeId.toUpperCase()} // OBSERVATION DECK`;
return `
`;
}
// Default: Iconic Starfleet Ten Forward / Galaxy-Class Observation Lounge
return `
`;
}
};