import type { Orihon } from "../map.js"; import { type HeatLayer } from "../layers/heat.js"; import type { HeatBackend, HeatMode, HeatEvaluation } from "./heat.js"; import { type WebGLSymbolLayer, type WebGLSymbolInstance } from "../layers/webgl-symbol-layer.js"; import { type WebGLStyledPathBatch } from "../layers/webgl-styled-path-batch.js"; import { type WebGLPolygonBatch } from "../layers/webgl-polygon-batch.js"; import { ObjectIconAtlas, type ManagedIconOptions, type ManagedIconSource } from "./object-icon-atlas.js"; import { ObjectSearchIndex, type ObjectSearchOptions, type ObjectSearchResult } from "./object-search-index.js"; import { ObjectTimeIndex, type ObjectTimeConfig } from "./object-time-index.js"; import { ObjectTrailStore } from "./object-trail-store.js"; import { type LabelCandidate } from "./object-label-layout.js"; import { type ClusterPropertiesConfig, type ClusterAggregateValues } from "./object-cluster-aggregates.js"; import type { NormalizedGeometry, NormalizedLineString, NormalizedPolygon } from "./object-geometry.js"; import type { ObjectId, ObjectStyle, ObjectDirtyFlag } from "./object-types.js"; export { normalizeLabel, styleTint } from "./object-style-helpers.js"; export type ObjectVisualizationMode = "objects" | "clusters" | "heatmap" | "auto"; export interface ObjectVisualizationByZoom { heatmapUntil?: number; clustersUntil?: number; } export interface ObjectLabelAnchor { id: ObjectId; lat: number; lng: number; text: string; font: string; width: number; height: number; offsetX: number; offsetY: number; priority: number; collisionMode: "auto" | "always" | "hide"; color: string; haloColor: string; haloWidth: number; } export interface ObjectMotionState { fromLat: number; fromLng: number; toLat: number; toLng: number; startTimeMs: number; durationMs: number; } export interface ObjectSceneOptions { declutter?: boolean; visualization?: ObjectVisualizationMode; visualizationByZoom?: ObjectVisualizationByZoom; search?: { fields: string[]; normalize?: boolean; } | null; time?: ObjectTimeConfig | null; clusterProperties?: ClusterPropertiesConfig; heatmapWeight?: ((object: { properties?: Record; }, id?: string | number) => number) | null; heatmapReferenceMax?: number | null; heatmapDisplay?: HeatMode; heatmapIsolineLabels?: boolean; heatmapBackend?: HeatBackend; heatmapEvaluation?: HeatEvaluation; heatmapIsolineStep?: "auto" | number; } /** * Opt-in scene subsystems for ObjectManager: icons, labels, search, time, * trails, lines/polygons, heatmap visualization. Keeps object-manager.ts lean. */ export declare class ObjectSceneController { #private; readonly atlas: ObjectIconAtlas; readonly trails: ObjectTrailStore; readonly motions: Map; readonly geometries: Map; readonly dirty: Map; searchIndex: ObjectSearchIndex | null; timeIndex: ObjectTimeIndex | null; clusterProperties: ClusterPropertiesConfig; declutter: boolean; visualization: ObjectVisualizationMode; visualizationByZoom: ObjectVisualizationByZoom; heatmapWeight: ((object: { properties?: Record; }, id?: string | number) => number) | null; heatmapReferenceMax: number | null; heatmapDisplay: HeatMode; heatmapIsolineLabels: boolean; heatmapBackend: HeatBackend; heatmapEvaluation: HeatEvaluation; heatmapIsolineStep: "auto" | number; symbolLayer: WebGLSymbolLayer | null; heatLayer: HeatLayer | null; pathBatch: WebGLStyledPathBatch | null; polygonBatch: WebGLPolygonBatch | null; labelCanvas: HTMLCanvasElement | null; private labelCtx; private labelAnchors; private map; private activeVisualization; private motionRaf; /** Count of LineString/Polygon geometries (for skipping pointless scene sync). */ private nonPointGeometryCount; configure(options: ObjectSceneOptions): void; attach(map: Orihon): void; detach(): void; clear(): void; clearHeat(): void; clearNonHeatLayers(): void; clearLayers(): void; registerIcon(name: string, source: ManagedIconSource, options?: ManagedIconOptions): void; removeIcon(name: string): void; clearIcons(): void; hasIcon(name: string): boolean; markDirty(id: ObjectId, flags: ObjectDirtyFlag): void; consumeDirty(): Map; setGeometry(id: ObjectId, geometry: NormalizedGeometry): void; removeGeometry(id: ObjectId): void; removeObject(id: ObjectId): void; hasNonPointGeometries(): boolean; /** Reset geometry bookkeeping after a bulk `geometries.clear()`. */ resetGeometryStats(): void; resolveVisualization(zoom: number): "objects" | "clusters" | "heatmap"; getActiveVisualization(): "objects" | "clusters" | "heatmap"; setActiveVisualization(mode: "objects" | "clusters" | "heatmap"): boolean; search(query: string, objects: Map; [key: string]: unknown; }>, options?: ObjectSearchOptions): ObjectSearchResult[]; setTimeRange(from: number | null, to: number | null): void; activeTimeIds(): Set | null; startMotion(id: ObjectId, fromLat: number, fromLng: number, toLat: number, toLng: number, durationMs: number): void; visualPosition(id: ObjectId, fallbackLat: number, fallbackLng: number): { lat: number; lng: number; }; syncSymbols(instances: WebGLSymbolInstance[], map: Orihon): void; /** Patch in-flight GPU motion/rotation without rebuilding the whole symbol batch. */ patchSymbolMotions(headingPatches?: Array<{ id: ObjectId; rotation: number; }>): void; syncHeat(points: Array<[number, number, number?]>, map: Orihon): void; syncHeatPacked(merc64: Float64Array, pointCount: number, map: Orihon, weights?: ArrayLike | null): void; syncPaths(paths: Parameters[0], map: Orihon): void; syncPolygons(polygons: Parameters[0], map: Orihon): void; setLabelAnchors(anchors: ObjectLabelAnchor[]): void; /** * Reproject cached label anchors into screen space and redraw. * Used on every map `move` frame so labels track the camera with WebGL layers. */ redrawLabels(map: Orihon, options?: { declutter?: boolean; }): void; drawLabels(candidates: LabelCandidate[], map: Orihon): void; buildLabelAnchor(id: ObjectId, style: ObjectStyle, lat: number, lng: number, ctx: CanvasRenderingContext2D | null): ObjectLabelAnchor | null; buildLabelCandidate(id: ObjectId, style: ObjectStyle, screenX: number, screenY: number, ctx: CanvasRenderingContext2D | null): LabelCandidate | null; aggregateCluster(ids: ObjectId[], objects: Map; [key: string]: unknown; }>, selectedId: ObjectId | null): ClusterAggregateValues; lineGeometry(id: ObjectId): NormalizedLineString | null; polygonGeometry(id: ObjectId): NormalizedPolygon | null; } //# sourceMappingURL=object-scene.d.ts.map