Movement galleries split large catalogs into chronological wings (~55 works), use era-themed 3D interiors with side-wall windows, wing navigator on the back exit, and front archways between wings. Also adds painting annotations, timeline event guides, portrait hover highlights, and documentation/API updates. Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
2.5 KiB
TypeScript
45 lines
2.5 KiB
TypeScript
/** Major world events shown as markers on the timeline (frontend curation). */
|
|
export interface HistoricalEvent {
|
|
id: string;
|
|
name: string;
|
|
startYear: number;
|
|
/** Omit for a single-year marker. */
|
|
endYear?: number;
|
|
/** Shorter label when the view is crowded. */
|
|
shortLabel?: string;
|
|
}
|
|
|
|
export const HISTORICAL_EVENTS: readonly HistoricalEvent[] = [
|
|
{ id: 'fall-rome', name: 'Fall of Rome', startYear: 476 },
|
|
{ id: 'charlemagne', name: 'Charlemagne crowned emperor', startYear: 800 },
|
|
{ id: 'battle-hastings', name: 'Battle of Hastings', startYear: 1066 },
|
|
{ id: 'first-crusade', name: 'First Crusade', startYear: 1096, endYear: 1099 },
|
|
{ id: 'magna-carta', name: 'Magna Carta', startYear: 1215 },
|
|
{ id: 'black-death', name: 'Black Death', startYear: 1347 },
|
|
{ id: 'printing-press', name: 'Printing press', startYear: 1450 },
|
|
{ id: 'fall-constantinople', name: 'Fall of Constantinople', startYear: 1453 },
|
|
{ id: 'columbus', name: 'Columbus reaches the Americas', startYear: 1492 },
|
|
{ id: 'reformation', name: 'Protestant Reformation', startYear: 1517 },
|
|
{ id: 'thirty-years-war', name: 'Thirty Years\' War', startYear: 1618, endYear: 1648, shortLabel: '30 Years\' War' },
|
|
{ id: 'english-civil-war', name: 'English Civil War', startYear: 1642, endYear: 1651 },
|
|
{ id: 'glorious-revolution', name: 'Glorious Revolution', startYear: 1688 },
|
|
{ id: 'war-spanish-succession', name: 'War of the Spanish Succession', startYear: 1701, endYear: 1714, shortLabel: 'Spanish Succession' },
|
|
{ id: 'american-revolution', name: 'American Revolution', startYear: 1776 },
|
|
{ id: 'french-revolution', name: 'French Revolution', startYear: 1789 },
|
|
{ id: 'waterloo', name: 'Battle of Waterloo', startYear: 1815 },
|
|
{ id: 'revolutions-1848', name: 'Revolutions of 1848', startYear: 1848 },
|
|
{ id: 'german-unification', name: 'Unification of Germany', startYear: 1871 },
|
|
{ id: 'ww1', name: 'World War I', startYear: 1914, endYear: 1918, shortLabel: 'WWI' },
|
|
{ id: 'russian-revolution', name: 'Russian Revolution', startYear: 1917 },
|
|
{ id: 'ww2', name: 'World War II', startYear: 1939, endYear: 1945, shortLabel: 'WWII' },
|
|
{ id: 'berlin-wall', name: 'Fall of Berlin Wall', startYear: 1989 },
|
|
];
|
|
|
|
export function eventEndYear(event: HistoricalEvent): number {
|
|
return event.endYear ?? event.startYear;
|
|
}
|
|
|
|
export function eventInView(event: HistoricalEvent, viewStart: number, viewEnd: number): boolean {
|
|
return eventEndYear(event) >= viewStart && event.startYear <= viewEnd;
|
|
}
|