import { ReactNode } from 'react'; import { VuerProps } from '../../vuer'; /** * WebXR mesh detection component props */ export type WebXRMeshProps = VuerProps<{ /** * @dial appearance * @dial-cols 2 * @dial-dtype color */ color?: string; /** * @dial appearance * @dial-dtype number * @dial-default 0.15 * @dial-min 0 * @dial-max 1 * @dial-step 0.01 */ opacity?: number; /** * @dial behavior * @dial-dtype boolean * @dial-default true */ autoUpdate?: boolean; }>; /** * Mesh data sent to server */ export type WebXRMeshData = { meshes: Array<{ vertices: Float32Array | number[]; indices: Uint32Array | number[]; semanticLabel?: string; matrix: number[]; }>; }; /** * Global mesh state for streaming */ export declare const webXRMeshState: WebXRMeshData; /** * WebXRMesh component * * This component enables real-world mesh detection in WebXR AR sessions. * It detects and renders environmental geometry like walls, floors, and furniture. * * **Data Upload Modes:** * 1. **Auto-Update Mode** (when `autoUpdate: true`, default): * - Automatically detects mesh changes (new/updated/removed) * - Pushes updates to server only when changes occur * - Event type: 'WEBXR_MESH_UPDATE' * - Set `autoUpdate: false` to disable * * 2. **RPC Mode** (always active): * - Server sends 'GET_WEBXR_MESH' request with matching key * - Component responds with latest mesh data * - Response event type: rtype from request or 'GET_WEBXR_MESH_RESPONSE' * * **Requirements:** * - WebXR session must be initialized with 'mesh-detection' feature * - Only works in immersive-ar mode * - Device must support mesh detection API * */ export declare function WebXRMesh({ _key, color, opacity, autoUpdate, }: WebXRMeshProps): ReactNode;