@webviz/subsurface-viewer
Version:
3D visualization component for subsurface reservoir data
47 lines (46 loc) • 1.81 kB
TypeScript
import type { Color, PickingInfo, UpdateParameters, LayerContext } from "@deck.gl/core";
import { Layer } from "@deck.gl/core";
import type { Device, UniformValue } from "@luma.gl/core";
import { Model } from "@luma.gl/engine";
import type { DeckGLLayerContext, ExtendedLayerProps, LayerPickInfo } from "../utils/layerTools";
import { type ColormapFunctionType } from "../utils/colormapTools";
export interface PrivateMapLayerProps extends ExtendedLayerProps {
positions: Float32Array;
normals: Float32Array;
triangleIndices: Uint32Array;
vertexProperties: Float32Array;
vertexIndices: Int32Array;
lineIndices: Uint32Array;
contours: [number, number];
gridLines: boolean;
isContoursDepth: boolean;
colormapName: string;
colormapRange: [number, number];
colormapClampColor: Color | undefined | boolean;
colormapFunction?: ColormapFunctionType;
propertyValueRange: [number, number];
smoothShading: boolean;
depthTest: boolean;
ZIncreasingDownwards: boolean;
enableLighting: boolean;
}
export default class PrivateMapLayer extends Layer<PrivateMapLayerProps> {
get isLoaded(): boolean;
setShaderModuleProps(args: Partial<{
[x: string]: Partial<Record<string, unknown> | undefined>;
}>): void;
initializeState(context: DeckGLLayerContext): void;
shouldUpdateState({ props, oldProps, context, changeFlags, }: UpdateParameters<this>): boolean;
updateState({ context }: UpdateParameters<this>): void;
_getModels(device: Device): Model[];
draw(args: {
moduleParameters?: unknown;
uniforms: UniformValue;
context: LayerContext;
}): void;
decodePickingColor(): number;
getPickingInfo({ info }: {
info: PickingInfo;
}): LayerPickInfo;
getShaders(): any;
}