UNPKG

@webviz/subsurface-viewer

Version:

3D visualization component for subsurface reservoir data

91 lines (90 loc) 2.51 kB
import { Model } from "@luma.gl/engine"; import type { Accessor, Color, Position, PickingInfo, UpdateParameters, Unit } from "@deck.gl/core"; import { Layer } from "@deck.gl/core"; import type { ExtendedLayerProps, LayerPickInfo } from "../utils/layerTools"; export type WellMarkersLayerProps = _WellMarkersLayerProps; /** * Input data of the layer. */ export type WellMarkerDataT = { /** * Position of a marker center. */ position: Position; /** * Size of a marker in size units. */ size: number; /** * Azimuth of the a marker in degrees. */ azimuth: number; /** * Inclination of a marker against vertical direction in degrees. */ inclination: number; /** * Fill color of a marker. */ color: Color; /** * Outline color of a marker. */ outlineColor: Color; }; export interface _WellMarkersLayerProps extends ExtendedLayerProps { /** * Shape of the markers. * @default 'circle' */ shape: "triangle" | "circle" | "square"; /** * The units of the marker size, one of `'meters'`, `'common'`, and `'pixels'`. * @default 'meters' */ sizeUnits: Unit; /** If true means that input z values are interpreted as depths. * For example depth of z = 1000 corresponds to -1000 on the z axis. * @default 'true' */ ZIncreasingDownwards: boolean; /** * Center position accessor. */ getPosition?: Accessor<WellMarkerDataT, Position>; /** * Size accessor. */ getSize?: Accessor<WellMarkerDataT, number>; /** * Azimuth accessor. */ getAzimuth?: Accessor<WellMarkerDataT, number>; /** * Inclination accessor. */ getInclination?: Accessor<WellMarkerDataT, number>; /** * Color accessor. */ getColor?: Accessor<WellMarkerDataT, Color>; /** * Outline color accessor. */ getOutlineColor?: Accessor<WellMarkerDataT, Color>; } export default class WellMarkersLayer extends Layer<WellMarkersLayerProps> { private shapes; constructor(props: WellMarkersLayerProps); initializeState(): void; updateState(params: UpdateParameters<Layer<WellMarkersLayerProps>>): void; getModels(): Model[]; draw(args: any): void; getPickingInfo({ info }: { info: PickingInfo; }): LayerPickInfo; getShaders(): any; private initShapes; protected _createModels(): Model[]; protected _createEmptyModels(): Model[]; }