Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class RecordingPanel

    Recording panel for capturing screenshots and recording video.

    The Panel is a thin coordinator: GUI + mode dispatch only. All capture pipelines (screenshot, real-time video, frame-by-frame offline) live in CaptureStrategy implementations that share state via RecordingSession.

    Index
    gui: GUI
    visible: boolean = false
    mode: RecordingMode = 'video'
    options: RecordingOptions = ...
    audioCapture: AudioCapturePort | null = null

    The sound layer's capture surface; null until the app wires it (or in tests).

    screenshotStrategy: ScreenshotStrategy
    videoRecordingStrategy: VideoRecordingStrategy
    offlineCaptureStrategy: OfflineCaptureStrategy
    imageControllers: Controller<any>[] = []
    videoControllers: Controller<any>[] = []
    turntableControllers: Controller<any>[] = []
    qualityController: Controller<any> | null = null
    transparentController: Controller<any> | null = null
    syncToggleController: Controller<any> | null = null
    syncDimensionController: Controller<any> | null = null
    videoCodecController: Controller<any> | null = null
    videoQualityController: Controller<any> | null = null
    videoDurationController: Controller<any> | null = null
    formatController: Controller<any> | null = null
    captureController: Controller<any> | null = null
    refreshCaptureDPR: (() => void) | null = null
    lodSettledProvider: (() => boolean | null) | null = null

    LOD-quiescence predicate for the offline loop — see setLODSettledProvider.

    sceneManager: SceneManager
    • True only while the frame-by-frame offline capture loop owns the pipeline, i.e. while the animation loop's own render is redundant. Narrower than isCurrentlyRecording(): the real-time MediaRecorder path records the canvas the animation loop paints, so callers that suppress rendering must key off THIS flag, not the general one. Narrower than session.isOfflineCaptureActive too — it is dropped as soon as the capture stops driving the pipeline, so a wedged teardown can never leave the viewport frozen.

      Returns boolean

    • Inject the sound layer's capture surface so real-time recordings carry the mix the listener hears ("Include Audio"). Late-bound like the overlay manager; null leaves videos silent.

      Parameters

      Returns void

    • Supply the predicate the offline capture loop drains on before exporting each frame: "is every in-frame LOD group showing its selected level at final quality?" (LODGroupRegistry.isCaptureQuiescent()). Without it an orbiting turntable bakes coarse-level pops into the sequence whenever a tile re-enters the frustum mid-reload (#1695).

      TRI-STATE: the provider returns null for "this scene has no lod_group to wait for" (no scene loader, no LOD registry, or a registry with none in it), which makes the loop skip the drain entirely — including the one mandatory catch-up rAF a true still costs. The provider is wired unconditionally at init, so a plain points/lines scene depends on that null to stay exactly as fast as it was pre-#1695. It is not a claim that nothing in the scene can be mid-load: a --recipe stream leaf answers null while its additive ladder is still streaming (see the hook's JSDoc in recording-panel/offline-capture-strategy).

      INJECTED rather than read directly: reaching the registry means importing data/scene-loader-manager, which pulls the whole data/cache stack into this module's graph and breaks every consumer that stubs a minimal config. core/app/init/pipeline already imports getSceneLoader and already wires this panel's other cross-cutting predicates (render-skip, pacing-suspend), so it is the natural place. Unset ⇒ the hook answers null and the loop never waits, which is the pre-#1695 behaviour.

      Parameters

      • provider: (() => boolean | null) | null

      Returns void

    • Show/hide controls based on current mode + format. The per-control decision logic lives in recording-panel/gui-builder.ts:computeControlVisibility (pure function); this method only applies the decisions to its named lil-gui controllers and dropdown

      Returns void

    • Snapshot panel visibility, hide own GUI, optionally hide all others. Provided to strategies via the hideAllPanels hook.

      Returns void

    • Routed via the downloadBlob strategy hook. Spied by tests.

      Parameters

      • blob: Blob
      • filename: string

      Returns void

    • Routed via the generateFilename strategy hook.

      Parameters

      • ext: string

      Returns string