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).
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,boxor a singlepositionandBoundspublishes the camera's distance to it each frame, measured in this component's local space and divided bycamera.zoom(matching WellboreBounds, soDistance'smin/maxbehave identically).If more than one shape is provided the precedence is
sphere>box>position. With none, the distance staysInfinity(so distance-gated children remain hidden).