@webviz/subsurface-viewer
Version:
3D visualization component for subsurface reservoir data
44 lines (43 loc) • 1.72 kB
TypeScript
import type { Color, LayersList, UpdateParameters } from "@deck.gl/core";
import { CompositeLayer } from "@deck.gl/core";
import type { BoundingBox3D, Point3D } from "../../utils";
import type { ExtendedLayerProps, ReportBoundingBoxAction } from "../utils/layerTools";
export interface AxesLayerProps extends ExtendedLayerProps {
/**
* [xmin, ymin, zmin, xmax, ymax, zmax]
* Note that z values are default interpreted as going downwards. See property "ZIncreasingDownwards".
* So by default zmax is expected to be bigger than zmin.
*/
bounds: BoundingBox3D;
labelColor?: Color;
/**
* Font size for tick labels, specified in pixels. Axis labels are +7 pixels relative to this size.
* @default 12
*/
labelFontSize: number;
fontFamily?: string;
axisColor?: Color;
/** If true means that input z values are interpreted as depths.
* For example a depth of 2000 will be further down than a depth value of 1000.
* @default true
*/
ZIncreasingDownwards: boolean;
reportBoundingBox?: React.Dispatch<ReportBoundingBoxAction>;
}
type TextLayerData = {
label: string;
from: Point3D;
to: Point3D;
size: number;
};
export default class AxesLayer extends CompositeLayer<AxesLayerProps> {
rebuildData(reportBoundingBox: boolean): void;
initializeState(): void;
shouldUpdateState({ props, oldProps, context, changeFlags, }: UpdateParameters<this>): boolean;
updateState(): void;
getAnchor(d: TextLayerData, is_orthographic: boolean): string;
getLabelPosition(d: TextLayerData): Point3D;
getBaseLine(d: TextLayerData, is_orthographic: boolean): string;
renderLayers(): LayersList;
}
export {};