videx-3d
Version:
React 3D component library designed for sub surface visualizations in the browser
42 lines (41 loc) • 1.67 kB
TypeScript
import { ReactNode } from 'react';
/**
* Annotations provider component props
* @expand
*/
export type AnnotationsProviderProps = {
maxVisible?: number;
children?: ReactNode;
};
/**
* The Annotations component is special provider component responsible for managing
* and updating annotation layers and instances.
*
* It allow you to register layers, using the AnnotationLayer component, and set a
* global max visible annotations.
*
* Annotations adds point-feature labeling support, where labels are rendered as
* regular React HTML components. Anchors and connector lines are drawn to the frame buffer
* after the 3D scene frame is completed.
*
* Annotations are processed globally to support label collision, occlusion and
* ordering tests. Priority and visibillity distances can be set in the AnnotationLayer
* component and/or int the individual annotation elements.
*
* @example
* <Annotations>
* <AnnotationLayer id="casings_annotations" name="Casing Annotations" />
* </Annotations>
*
* @remarks
* This component sets up a global state and takes control over the render loop!
* It's therefore important that only a single instance of this component is mounted
* at any time in your project. Using this compoent with an EffectsComposer may cause issues,
* and we will likely convert it from being a component into being a post-processing pass at some point.
*
* @see [Storybook](/videx-3d/?path=/docs/components-misc-annotations--docs)
* @see {@link AnnotationsLayer}
*
* @group Components
*/
export declare const Annotations: ({ maxVisible, children }: AnnotationsProviderProps) => import("react/jsx-runtime").JSX.Element;