orbital-engine
    Preparing search index...

    Function distanceToFillView

    • Camera distance at which a sphere of worldRadius fills fill of the view's height — its silhouette, not its bare radius, so the share holds even close in where perspective makes a sphere look bigger than r/d suggests. distanceToFit's margin convention can't express "fill 40% of the view" directly, and 'body' framing (see computeFocusForBody) is specified exactly that way. Same floor (minCameraDistanceForRadius, so nothing ever frames inside the near plane) and ceiling as distanceToFit. A fill outside (0, 1] falls back to BODY_VIEW_FILL.

      Parameters

      • worldRadius: number
      • fill: number = BODY_VIEW_FILL

      Returns number