Expand chronicle to 300 entries with world data

Add a generator script that produces the entries dataset, dedupe
entries sharing coordinates, and ship world city and country
GeoJSON assets for the globe view.

Make the timeline card spacing derive from entry count, move the
view switcher into the bottom bar, and align card and label fonts
with the timeline titles.
This commit is contained in:
2026-09-19 01:07:41 +08:00
parent 9a1a3685ce
commit 71750e5dad
13 changed files with 2716 additions and 216 deletions
+8 -3
View File
@@ -9,7 +9,7 @@ import { clamp, easeInOutCubic } from '../utils/easing.js';
const CAMERA_POSES = {
binder: { pos: new THREE.Vector3(0.2, 0.75, 2.95), target: new THREE.Vector3(0, 0.02, 0), max: 4.4, min: 2.4 },
timeline: { pos: new THREE.Vector3(0, 1.4, 6.86), target: new THREE.Vector3(0, 0, 0), max: 8, min: 6 },
timeline: { pos: new THREE.Vector3(0, 1.4, 6.86), target: new THREE.Vector3(0, 0, 0), max: 8, min: 1.2 },
globe: { pos: new THREE.Vector3(0, 0.35, 3.7), target: new THREE.Vector3(0, 0, 0), max: 8, min: 2.2 },
};
@@ -164,7 +164,7 @@ export class App {
this.interactives.binder.push(m);
});
});
this.timeline.cards.forEach((c) => this.interactives.timeline.push(c.card));
this.timeline.cards.forEach((c) => this.interactives.timeline.push(c.front, c.back));
// 地理视图由 Cesium 自行拾取,不参与 Three.js 射线检测
}
@@ -291,7 +291,10 @@ export class App {
document.getElementById('detail-card').classList.remove('hidden');
this.binder.syncTo(index);
// 时间轴:点击后滑动使该卡片居中
if (view === 'timeline') this._centerTimeline(index);
if (view === 'timeline') {
this._centerTimeline(index);
this.timeline.flip(index);
}
}
}
@@ -313,6 +316,7 @@ export class App {
this.overlay.setEntry(entry, this.selected, ENTRIES.length);
this.timeline.setSelected(this.selected);
this.globe.setSelected(this.selected);
if (this.view === 'globe') this.globe.flyToEntry(this.selected); // 地球页切换时自动居中
if (syncBinder) this.binder.syncTo(this.selected);
}
@@ -438,6 +442,7 @@ export class App {
const dt = Math.min(this.clock.getDelta(), 0.05);
this.binder.update(dt);
this.timeline.update(dt);
if (this.cameraTween) {
const t = this.cameraTween;