@webviz/subsurface-viewer
Version:
3D visualization component for subsurface reservoir data
44 lines (43 loc) • 1.68 kB
TypeScript
import type { PickingInfo, UpdateParameters } from "@deck.gl/core";
import { CompositeLayer } from "@deck.gl/core";
import type { ExtendedLayerProps, LayerPickInfo, ReportBoundingBoxAction } from "../utils/layerTools";
import type { RGBAColor, RGBColor } from "../../utils";
import { PrivatePointsLayer } from "./privatePointsLayer";
export interface PointsLayerProps extends ExtendedLayerProps {
/**
* Point positions as [x, y, z, x, y, z....].
*/
pointsData: number[] | Float32Array;
/**
* Point color defined as RGB or RGBA array. Each component is in 0-255 range.
*/
color: RGBColor | RGBAColor;
/**
* The units of the point radius, one of `'meters'`, `'common'`, and `'pixels'`.
*/
radiusUnits: "meters" | "common" | "pixels";
/**
* Point radius defined in radius units.
*/
pointRadius: number;
/** 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;
/** Enable/disable depth testing when rendering layer. Default true.
*/
depthTest: boolean;
reportBoundingBox?: React.Dispatch<ReportBoundingBoxAction>;
}
export default class PointsLayer extends CompositeLayer<PointsLayerProps> {
constructor(props: PointsLayerProps);
renderLayers(): [PrivatePointsLayer?];
initializeState(): void;
updateState({ props, oldProps }: UpdateParameters<PointsLayer>): void;
getPickingInfo({ info }: {
info: PickingInfo;
}): LayerPickInfo;
private rebuildDataAttributes;
private loadData;
private updateBoundingBox;
}