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

    Function Trajectory

    • Renders a wellbore trajectory as a single instanced tube. Radius is a shader uniform (so thickness — and a future Y-axis scale — never rebuild geometry), with a screen-space minPixelRadius floor so the tube reads as a ~1 px line at field scale and gains thickness continuously as the camera approaches. A coarse radial-segment geometry LOD is swapped based on the DistanceContext published by WellboreBounds. Must be a child of the Wellbore component (wrap it in a WellboreBounds for the distance-driven LOD).

      This supersedes the older BasicTrajectory + TubeTrajectory composition: one generator, one geometry, GPU picking and Highlighter support, OIT-compatible, plus optional depth markers, data-driven interval colouring and an albedo texture map.

      Parameters

      • __namedParameters: TrajectoryProps

        Trajectory props

        • Optionalcolor?: string
        • OptionalcolorIntervals?: TrajectoryColorInterval[]

          Data-driven interval colouring: an array of measured-depth (MSL) intervals, each { from, to, color }, that recolour the tube where a point falls inside an interval (outside every interval the base color is used). Intended for colouring a trajectory by data instead of a single diffuse colour. Colours are de-duplicated internally, so many intervals may share a colour cheaply. Memoize the array — a new reference rebuilds the interval textures.

        • OptionaldepthInterval?: number

          Spacing between depth markers in metres. Default 100.

        • OptionaldepthMarkerColor?: string

          Depth-marker colour used by the mixed colour mode. Default black.

        • OptionaldepthMarkerColorMode?: ContourColorMode

          How depth markers modulate the tube colour (mirrors the Surface contour modes): darken / lighten / mixed. Default ContourColorMode.darken.

        • OptionaldepthMarkerColorModeFactor?: number

          Depth-marker modulation strength (0..1). Default 0.5.

        • OptionaldepthMarkerOffset?: number

          Metre offset applied to the MSL datum used by the depth markers (e.g. set to the RT elevation or a kickoff depth to align the marker grid to that reference). Default 0.

        • OptionaldepthMarkers?: boolean

          Draw depth-marker lines along the tube (measured depth, MSL).

        • OptionaldepthMarkerWidth?: number

          Depth-marker band thickness in metres, centred on each interval. Default 1.

        • OptionalhighlightBlending?: Blending

          Blend mode for the highlight ghost. AdditiveBlending (the default) glows on dark scenes but washes out on light ones; use NormalBlending (with highlightOpacity < 1) for a solid overlay that reads on any background.

        • OptionalhighlightColor?: string

          Highlight (ghost) colour used by the Highlighter on hover/selection.

        • OptionalhighlightOpacity?: number

          Highlight (ghost) opacity (0..1). Together with highlightBlending this tunes how strongly the hover/selection effect reads against a given background. Default 1.

        • OptionallodDistance?: number

          Camera distance (from DistanceContext) below which the high LOD is used.

        • OptionallowRadialSegments?: number

          Radial resolution of the low (field-scale) LOD.

        • Optionalmap?: Texture

          Optional albedo texture applied to the tube (combined with color: the tube centre reads as color x texel). The trajectory is unlit, so only a colour map is supported.

        • OptionalmapUvUnits?: "normalized" | "world"

          UV units for map: 'normalized' (azimuth 0..1 around x curve position 0..1 along, so the texture fits the whole well) or 'world' (circumference metres x measured-depth metres, so map.repeat sets a world-consistent texel density). Default 'normalized'.

        • OptionalminPixelRadius?: number

          Screen-space floor so the tube never thins below this many pixels.

        • Optionalopacity?: number

          Opacity (1 = opaque, the default). Values < 1 render semi-transparent.

        • Optionalpriority?: number
        • OptionalradialSegments?: number

          Radial resolution of the high LOD.

        • Optionalradius?: number

          Real-world tube radius in metres. Applied as a shader uniform (no rebuild).

        • OptionalshadingColor?: string

          Colour the silhouette darkens toward (default black = a darker same-hue diffuse).

        • OptionalshadingFalloff?: number

          Rim shading exponent. The tube centre is always EXACTLY the diffuse colour; this shapes how the darkening rises toward the silhouette: higher = darkening hugs the edge (broad exact-colour front), lower = spreads inward. Default 2.

        • OptionalshadingStrength?: number

          Silhouette darkening amount (0 = flat, 1 = full). Default 0.6.

      Returns Element

      <Wellbore id="abc">
      <WellboreBounds id="abc">
      <Trajectory color="red" radius={1} />
      </WellboreBounds>
      </Wellbore>

      Depends on the trajectory generator. Picking and highlighting are wired by exposing per-mesh userData.emitterMaterial and userData.highlightMaterial (which the PickingHelper / Highlighter prefer over their defaults); register the pointer handlers on the ancestor Wellbore (or another listener) as usual — the tube is then picked/highlighted correctly with no dedicated registration of its own.