vim-webgl-component
Version:
A demonstration app built on top of the vim-webgl-viewer
34 lines (33 loc) • 1.65 kB
TypeScript
import '../style.css';
import 'vim-webgl-viewer/dist/style.css';
import * as ULTRA from 'vim-ultra-viewer/';
import { VimComponentContainer } from '../container';
import { ModalRef } from '../panels/modal';
import { ILoadRequest } from 'vim-ultra-viewer/dist/types/viewer/loadRequest';
export * from 'vim-ultra-viewer/';
export type UltraComponentRef = {
viewer: ULTRA.Viewer;
modal: ModalRef;
dispose: () => void;
load(url: string): ILoadRequest;
};
/**
* Creates a UI container along with a VIM.Viewer and its associated React component.
* @param container An optional container object. If none is provided, a container will be created.
* @param componentSettings UI Component settings.
* @param viewerSettings Viewer settings.
* @returns An object containing the resulting container, reactRoot, and viewer.
*/
export declare function createUltraComponent(container?: VimComponentContainer | HTMLElement): Promise<UltraComponentRef>;
/**
* Represents a React component providing UI for the Vim viewer.
* @param container The container object containing root, gfx, and UI elements for the Vim viewer.
* @param viewer The Vim viewer instance for which UI is provided.
* @param onMount A callback function triggered when the component is mounted. Receives a reference to the Vim component.
* @param settings Optional settings for configuring the Vim component's behavior.
*/
export declare function UltraComponent(props: {
container: VimComponentContainer;
viewer: ULTRA.Viewer;
onMount: (component: UltraComponentRef) => void;
}): import("react/jsx-runtime").JSX.Element;