Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    interface CameraAwareMaterial {
        updateCameraParams(
            resolution: Vector2,
            isOrtho?: boolean,
            nearCull?: number,
            pixelRatio?: number,
        ): void;
    }

    Implemented by

    Index
    • Update camera-dependent uniforms (viewport, projection kind, near cull).

      Push again after a resize, a projection-kind flip, a near-cull change or a pixel-ratio change. An FOV or ortho-zoom change needs no push.

      Parameters

      • resolution: Vector2

        Viewport resolution in pixels

      • OptionalisOrtho: boolean

        Whether camera is orthographic (default false)

      • OptionalnearCull: number

        Near-fade start distance in world units (consumed by all four geometry materials via the shared perspectiveNearFade)

      • OptionalpixelRatio: number

        Physical render-target pixels per CSS pixel; screen-space appearance constants scale with it above 1×

      Returns void