/** * PanoramaSettingsBridge — JS-side adapters that convert the v0.4 * typed `PanoramaSettings` / `SlitscanSettings` / `HybridSettings` * shape into the flat `configOverrides` dictionary the native * bridges read. * * Why this file exists * ──────────────────── * * The v0.4 types use hierarchical sub-trees (`stitcher`, * `frameSelection.flow`, `painting`, `registration.ncc1d`, * `registration.ncc2d.emaSmoothing`, `plane`, …) to give consumers * a clean, ergonomic settings surface that mirrors the native * engine's domain. But the native bridges (iOS Swift's * `applyConfigOverrides`, Android Kotlin's `IncrementalStitcher.start`) * read a FLAT dictionary of native-named keys (e.g. `nccSearchRadius1d`, * `enable1dNcc`, `ncc2dEmaAlpha`, `flowMaxTranslationCm`). * * Two semantic gaps to bridge: * * 1. **Naming.** JS `registration.ncc1d.searchRadius` → * native `nccSearchRadius1d`. JS `painting.paintMode` → * native `paintMode` (same). Etc. * * 2. **Presence-as-enable.** The native side reads explicit * `enable1dNcc`, `enable2dNcc`, `enableNcc2dEmaSmoothing`, * `enableNcc2dPanAxisLock` booleans. JS models these as * optional sub-objects (sub-object present ⇒ enabled). This * adapter flattens the booleans for the wire. * * 3. **Skipped engine defaults.** Hybrid engine presets internally * clobber most fields (see HybridSettings JSDoc), so we don't * send overrides that would be ignored — just the small useful * surface. * * The Camera component calls `panoramaSettingsToNativeConfig` once * per capture start to produce the value passed as * `incremental.start({ config: … })`. Layer 2 callers building * SlitscanSettings or HybridSettings call the matching adapter * before reaching `incremental.start()`. */ import { type PanoramaSettings } from './PanoramaSettings'; /** * Flat config dictionary type — what the native bridges expect. * Indexed by the native-side key name; values are platform- * marshallable (booleans / numbers / strings). Keep this type * loose: native validates each key individually, and silently * ignores keys it doesn't recognise. */ export type NativeConfigDict = Record; /** * Convert a v0.4 PanoramaSettings tree into the flat dict the * batch-keyframe native side reads. Maps every consumed field * exactly once and skips fields the engine doesn't reach. * * Verified against: * - iOS `IncrementalStitcher.swift:810-960` (batch path) * - Android `IncrementalStitcher.kt:280-430` (batch path) */ export declare function panoramaSettingsToNativeConfig(s: PanoramaSettings, opts?: { frameSourceMode?: 'frameProcessor' | 'arSession'; }): NativeConfigDict; //# sourceMappingURL=PanoramaSettingsBridge.d.ts.map