import React from 'react'; import { Object3DNode, ReactThreeFiber } from '@react-three/fiber'; import { Camera, InstantWorldAnchorGroup, InstantWorldTracker, Pipeline } from '@zappar/zappar-threejs'; import { ForwardRefComponent } from '../util/utils.js'; declare module '@react-three/fiber' { interface ThreeElements { instantWorldAnchorGroup: Object3DNode; } } export type PlacementUIType = 'toggle' | 'placement-only'; export interface InstantTrackerProps extends Omit { /** A reference to a Zappar camera. */ camera?: React.MutableRefObject; /** Confirm if the object is placed, anchoring it in place. */ placementMode?: boolean; /** * Sets the point in the user's environment that the anchor tracks from. * * The vector assigned to this property correspond to the X, Y and Z coordinates (in camera space) of the point to track. * Choosing a position with X and Y coordinates of zero, and a negative Z coordinate, * will select a point on a surface directly in front of the center of the screen. */ placementCameraOffset?: ReactThreeFiber.Vector3; /** * A callback to get the tracker * @returns a callback containing the tracker. */ useInstantTracker?: (instantTracker: InstantWorldTracker) => void; /** The pipeline that this component will operate within. */ pipeline?: Pipeline; /** Renders a button which toggles the current placementMode. */ placementUI?: PlacementUIType; /** Disables tracking if set to `false`. Default is `true`. */ enabled?: boolean; } /** * A THREE.Group which attaches content to a point on a surface in front of the user as it moves around in the camera view. * @see https://docs.zap.works/universal-ar/web-libraries/react-threejs/instant-world-tracking/ */ declare const InstantTracker: ForwardRefComponent; export default InstantTracker;