feat: wire guide data source and POI focus UI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lyf
2026-06-12 09:25:22 +08:00
parent a6bfda30e1
commit 2055b13b90
58 changed files with 5768 additions and 1898 deletions

26
src/domain/guideModel.ts Normal file
View File

@@ -0,0 +1,26 @@
export interface GuideRenderPoi {
id: string
name: string
floorId: string
primaryCategory: string
primaryCategoryZh: string
iconType: string
positionGltf?: [number, number, number]
}
export interface GuideModelFloorAsset {
floorId: string
label: string
order: number
modelUrl: string
}
export interface GuideModelRenderPackage {
overviewModelUrl: string
floors: GuideModelFloorAsset[]
}
export interface GuideModelSource {
loadPackage(): Promise<GuideModelRenderPackage>
loadFloorPois(floorId: string): Promise<GuideRenderPoi[]>
}

View File

@@ -0,0 +1,11 @@
export const NAV_ROUTE_GRAPH_READY = false
export const NAV_ROUTE_UNAVAILABLE_MESSAGE = '正式路线数据尚未接入,可先查看馆内三维位置'
export const NAV_ROUTE_READINESS = {
ready: NAV_ROUTE_GRAPH_READY,
message: NAV_ROUTE_UNAVAILABLE_MESSAGE,
requiredData: ['route_graph', 'nav_data']
} as const
export const NAV_ASSET_BASE_URL = '/static/nav-assets/app_nav_assets_v2_clean_20260611_093623'

123
src/domain/museum.ts Normal file
View File

@@ -0,0 +1,123 @@
export interface MuseumFloor {
id: string
label: string
order: number
}
export interface MuseumCategory {
id: string
label: string
iconType?: string
}
export interface MuseumPoi {
id: string
name: string
floorId: string
floorLabel: string
primaryCategory: MuseumCategory
categories: MuseumCategory[]
positionGltf?: [number, number, number]
sourceConfidence?: string
navigationReadiness?: string
accessible: boolean
}
export interface MuseumHall {
id: string
name: string
floorId?: string
floorLabel?: string
description?: string
image?: string
exhibitCount?: number
area?: string
poiId?: string
}
export interface MuseumExhibit {
id: string
name: string
hallId?: string
hallName?: string
floorId?: string
floorLabel?: string
image?: string
description?: string
poiId?: string
artist?: string
year?: string
material?: string
size?: string
tags?: string[]
}
export interface GuideLocationPreview {
poiId: string
name: string
floorId: string
floorLabel: string
primaryCategoryZh?: string
positionGltf?: [number, number, number]
}
export interface GuideStartLocation {
label: string
floor?: string
source?: string
}
export interface GuidePreviewStep {
id: string
text: string
}
export interface GuideLocationPreviewPlan {
id: string
facilityId: string
target: string
summary: string
steps: GuidePreviewStep[]
targetLocation: GuideLocationPreview | null
startLocation: GuideStartLocation | null
}
export interface GuideRouteReadiness {
ready: boolean
message: string
requiredData: string[]
}
export interface MediaAsset {
id: string
type: 'audio' | 'image' | 'transcript'
url?: string
duration?: number
language?: string
available: boolean
unavailableReason?: string
}
export interface ExplainTrack {
id: string
exhibitId?: string
hallId?: string
title: string
summary?: string
mediaId?: string
coverImage?: string
poiId?: string
floorId?: string
available: boolean
}
export interface SearchIndexItem {
id: string
name: string
desc: string
type: 'exhibit' | 'hall' | 'facility'
poiId?: string
floorId?: string
exhibitId?: string
hallId?: string
}