Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...
    Index
    url: string
    attrsUrls: readonly string[]

    Candidate root-attribute addresses, newest format first (query-preserving).

    resolvedAttrsUrl: string | null = null

    The candidate that last answered, so steady-state polling costs ONE request. Only the first probe of a format-2 dataset pays the extra 404.

    resolvedETag: string | null = null

    ETag of the document at resolvedAttrsUrl, sent back as If-None-Match so an unchanged scene answers 304 with no body.

    PAIRED with resolvedAttrsUrl — an ETag is only meaningful against the URL it came from, so this is cleared whenever the resolved document changes, and only ever sent to that one candidate.

    Only set from a probe that returned an ok verdict (see probe). That is what makes the 304 short-circuit sound: "unchanged since the ETag" is only equivalent to "still the scene we loaded" if the document that ETag names was itself confirmed to match the baseline.

    conditionalRequestsEnabled: boolean = true

    Disabled after a conditional fetch fails but the same request succeeds bare.

    pendingETag: string | null = null

    ETag seen by the in-flight probe; promoted by probe on ok.

    loadSeed: LoadTimeValidator | null = null

    The load-time validator, verified and adopted by the first probe.

    expectedHash: string | null
    expectedAttrsJson: string | null
    intervalMs: number
    fetchImpl: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    consecutiveFailures: number = 0
    timer: Timeout | null = null
    lastProbeAt: number = 0
    probeInFlight: boolean = false
    inFlightAbort: AbortController | null = null

    Abort handle for the probe currently in flight (timeout / disposal).

    disposed: boolean = false
    changed: boolean = false

    Terminal once the address demonstrably serves something else.

    lastFailureWasConnection: boolean = false

    Whether the latest unreachable verdict came from a request that never got an HTTP answer (thrown fetch: refused, DNS, network error, timeout) rather than an inconclusive status. Reported with the banner so the app pauses rendering only when the server is actually gone.

    • Whether this dataset URL is one the watchdog can meaningfully watch.

      Parameters

      • datasetUrl: string

      Returns boolean

    • Begin watching. No immediate probe: the caller baselines identity from the attrs it actually loaded, and an instant re-fetch would only race the load it just finished.

      Returns void

    • Offer the load-time root fetch's ETag to the first poll.

      The load fetched the root document once and read its ETag; without this, the first poll (15 s local / 120 s remote) was an unconditional full GET of that same document — three root downloads per cold load on a host that sends ETags. With it, that poll is a conditional request answered by a bodyless 304.

      Held to the same bar as a probe's ETag: it is adopted only if its document is verified to be the scene loaded (its content_hash against the loaded hash, or its canonical attrs against the loaded attrs for a hash-less scene). The check runs at the first probe, off the load's critical path. Ignored once a probe has established its own ETag. A cross-origin host whose CORS preflight rejects If-None-Match takes the same unconditional fallback a probe's ETag does.

      Parameters

      Returns void

    • Tell the first poll which root document the load was served from, when the response carried no ETag to seedFromLoad with (Python's http.server, which luxar serve builds on, sends none).

      Without it the first probe of a format-2 dataset asks for zarr.json first and pays a 404 the load already answered. Only the candidate ORDER changes: nothing is trusted, the probe still reads and judges the document, and a 404 on it still falls through to the other format.

      Parameters

      • doc: "zarr.json" | ".zattrs"

      Returns void

    • The document name the last successful probe was served from.

      undefined only before any probe has succeeded, which cannot happen on the paths that call this (they run after a body was read); rootAttributes falls back to sniffing the content in that case, which is the same answer it gave before the name was threaded through.

      Returns string | undefined