UNPKG

@webviz/subsurface-viewer

Version:

3D visualization component for subsurface reservoir data

39 lines (38 loc) 1.77 kB
import type { Color, PickingInfo } from "@deck.gl/core"; import type { BitmapLayerPickingInfo, BitmapLayerProps } from "@deck.gl/layers"; import { BitmapLayer } from "@deck.gl/layers"; import type { Model } from "@luma.gl/engine"; import type { LayerPickInfo, ReportBoundingBoxAction, TypeAndNameLayerProps } from "../utils/layerTools"; import { type ColormapFunctionType } from "../utils/colormapTools"; import { type ValueDecoder } from "../utils/propertyMapTools"; import type { ContinuousLegendDataType } from "../../components/ColorLegend"; export interface ColormapLayerProps extends BitmapLayerProps, TypeAndNameLayerProps { colorMapName: string; colorMapFunction?: ColormapFunctionType; valueRange: [number, number]; colorMapRange: [number, number]; valueDecoder: ValueDecoder; rotDeg: number; contours: boolean; hillshading: boolean; contourReferencePoint: number; contourInterval: number; /** Clamp colormap to this color at ends. * Given as array of three values (r,g,b) e.g: [255, 0, 0] * If not set or set to true, it will clamp to color map min and max values. * If set to false the clamp color will be completely transparent. */ colorMapClampColor: Color | undefined | boolean; heightMapUrl: string; heightValueRange: [number, number]; reportBoundingBox?: React.Dispatch<ReportBoundingBoxAction>; } export default class ColormapLayer extends BitmapLayer<ColormapLayerProps> { initializeState(): void; setShaderModuleProps(...props: Parameters<Model["shaderInputs"]["setProps"]>): void; getShaders(): any; getPickingInfo({ info, }: { info: PickingInfo; }): BitmapLayerPickingInfo & LayerPickInfo; getLegendData(): ContinuousLegendDataType; }