Files
frontend-miniapp/src/domain/guideModel.ts
cxk 3cc0336806
Some checks failed
CI / verify (push) Has been cancelled
恢复空间标签层级与模型锚点
2026-07-20 08:56:03 +08:00

60 lines
1.3 KiB
TypeScript

import type {
MuseumPoiEntrance,
MuseumPoiKind
} from '@/domain/museum'
import type { PoiDisplayPolicy } from '@/domain/poiDisplay'
export interface GuideRenderPoi {
id: string
name: string
floorId: string
primaryCategory: string
primaryCategoryZh: string
iconType: string
positionGltf?: [number, number, number]
sourceObjectName?: string
kind?: MuseumPoiKind
hallId?: string
hallName?: string
spaceId?: string
sourcePlaceId?: string
sourceSpaceId?: string
entrances?: MuseumPoiEntrance[]
displayPolicy?: PoiDisplayPolicy
}
export interface GuideModelFloorAsset {
floorId: string
label: string
order: number
modelUrl: string
modelUrls?: string[]
sharedModelAsset?: boolean
modelMatchKeys?: string[]
}
export interface GuideModelRenderPackage {
overviewModelUrl: string
overviewModelUrls?: string[]
floors: GuideModelFloorAsset[]
}
export interface GuideModelSource {
loadPackage(): Promise<GuideModelRenderPackage>
loadFloorPois(floorId: string): Promise<GuideRenderPoi[]>
}
export interface AutoSwitchConfig {
enabled: boolean
thresholdLowFactor: number
thresholdHighFactor: number
cooldownMs: number
}
export interface AutoSwitchEvent {
from: 'overview' | 'floor'
to: 'overview' | 'floor'
trigger: 'zoom-in' | 'zoom-out'
distance: number
}