@equinor/videx-3d
    Preparing search index...

    Function Bounds

    • A generic provider of the DistanceContext, so the Distance component (and anything else reading the context) can be used for ANY object — not just wellbores. Supply a bounding sphere, box or a single position and Bounds publishes the camera's distance to it each frame, measured in this component's local space and divided by camera.zoom (matching WellboreBounds, so Distance's min/max behave identically).

      If more than one shape is provided the precedence is sphere > box > position. With none, the distance stays Infinity (so distance-gated children remain hidden).

      Parameters

      • __namedParameters: BoundsProps

        Bounds props

        • Optionalchildren?: ReactNode

      Returns Element

      <Bounds sphere={{ center: [0, 0, 0], radius: 5 }}>
      <Distance min={0} max={50}>
      <mesh>
      <sphereGeometry />
      <meshStandardMaterial color="red" />
      </mesh>
      </Distance>
      </Bounds>