import React from 'react'; import { Object3DNode } from '@react-three/fiber'; import * as ZapparThree from '@zappar/zappar-threejs'; import { ForwardRefComponent } from '../util/utils.js'; declare module '@react-three/fiber' { interface ThreeElements { faceAnchorGroup: Object3DNode; } } export type AnchorVisibilityEvent = (anchor: T) => void; export interface FaceAnchorGroupProps extends Omit { /** A reference to a Zappar camera. */ camera?: React.MutableRefObject; /** * A callback to get the tracker * @returns a callback containing the tracker. */ useFaceTracker?: (faceTracker: ZapparThree.FaceTracker) => void; /** Sets and loads the face tracking model data. */ model?: string | ArrayBuffer; /** The pipeline that this component will operate within. */ pipeline?: ZapparThree.Pipeline; /** Disables tracking if set to `false`. Default is `true`. */ enabled?: boolean; /** * Emitted when the anchor becomes visible in a camera frame. */ onVisible?: AnchorVisibilityEvent; /** * Emitted when the anchor goes from being visible in the previous camera frame, to not being visible in the current frame. */ onNotVisible?: AnchorVisibilityEvent; /** * Emitted when a new anchor is created by the tracker. */ onNewAnchor?: AnchorVisibilityEvent; } /** * A THREE.Group which attaches content to a face as it moves around in the camera view. * @see https://docs.zap.works/universal-ar/web-libraries/react-threejs/face-tracking/ */ declare const FaceAnchorGroup: ForwardRefComponent; export default FaceAnchorGroup;