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

    Function projectWorldRadiusPx

    • Project a node-local radius into logical CSS pixels. The caller divides the accepted radius by sqrt(lodBias) because the public bias remains an area factor while this metric is a length.

      The vertical scale is the projection's own P[1][1] (elements[5]), the term the shaders size geometry with: 1 / tan(fov/2) for a plain perspective camera, 2 / frustumHeight for an orthographic one, and in both cases including zoom and setViewOffset. Only a perspective or orthographic camera has a footprint; any other returns null.

      Parameters

      • radiusWorld: number
      • worldCenter: Vector3
      • view: Pick<ViewContext, "camera" | "viewMatrix">

        The camera and its world → view matrix (the frame's ViewContext).

      • viewportHeight: number
      • viewCenterScratch: Vector3 = ...

      Returns number | null