UNPKG

@webviz/subsurface-viewer

Version:

3D visualization component for subsurface reservoir data

106 lines (105 loc) 3.52 kB
import type React from "react"; import type { Color, PickingInfo, UpdateParameters } from "@deck.gl/core"; import { CompositeLayer } from "@deck.gl/core"; import type { Material } from "../gpglLayers/typeDefs"; import { PrivatePolylinesLayer } from "../polylines/privatePolylinesLayer"; import { GpglValueMappedSurfaceLayer, type ValueMappedTriangleProps } from "../gpglLayers/gpglValueMappedSurfaceLayer"; import type { ExtendedLayerProps, LayerPickInfo, ReportBoundingBoxAction } from "../utils/layerTools"; import type { ColormapProps, ColormapSetup } from "../utils/colormapTools"; import type { Point3D } from "../../utils"; /** * Cage properties. * * Definition of the cage and its visual properties. * The cage, specified by an origin and 3 edges, represents the bounds of the seismic data. */ export interface CageProps { /** * Origin point of the cage. */ origin: Point3D; /** * Edge U of the cage. */ edgeU: Point3D; /** * Edge V of the cage. */ edgeV: Point3D; /** * Edge W of the cage. */ edgeW: Point3D; /** * The units of the line width, one of `'meters'`, `'common'`, and `'pixels'`. * Default "meters". */ widthUnits: "meters" | "common" | "pixels"; /** * Line width defined in width units. Default 2. */ lineWidth: number; /** * Line color defined as RGB or RGBA array. Each component is in 0-255 range. */ color: Color; /** * Cage visibility. Default true. */ visible: boolean; } export type SeismicFenceProps = ValueMappedTriangleProps; export interface SeismicLayerProps extends ExtendedLayerProps { /** * Cage properties */ cage: CageProps; /** * Seismic fences. * A fence is a list of triangles with texture coordinates associated to a 2D array of seismic values * that will be mapped on the fence. * It can easily be used to display seismic I, J or K slices. */ seismicFences: SeismicFenceProps[]; showMesh: boolean; colormap?: ColormapProps; colormapSetup?: ColormapSetup; /** Surface material properties. * material: true = default material, coloring depends on surface orientation and lighting. * false = no material, coloring is independent on surface orientation and lighting. * or full spec: * material: { * ambient: 0.35, * diffuse: 0.9, * shininess: 32, * specularColor: [38, 38, 38], * } */ material: Material; smoothShading: boolean; /** * Layer visibility. Default true. */ visible: boolean; /** * Enable/disable depth testing when rendering layer. Default true. */ depthTest?: boolean; /** * 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; reportBoundingBox?: React.Dispatch<ReportBoundingBoxAction>; } export default class SeismicLayer extends CompositeLayer<SeismicLayerProps> { initializeState(): void; updateState({ props, oldProps }: UpdateParameters<SeismicLayer>): void; private rebuildCageAttributes; private loadCageData; private rebuildFencesAttributes; getPickingInfo({ info }: { info: PickingInfo; }): LayerPickInfo; renderLayers(): [PrivatePolylinesLayer?, GpglValueMappedSurfaceLayer?]; }