UNPKG

@react-three/xr

Version:

VR/AR for react-three-fiber

35 lines (34 loc) 1.29 kB
import { XRAnchorOptions } from '@pmndrs/xr'; export { requestXRAnchor, type XRAnchorOptions, } from '@pmndrs/xr'; /** * Hook that returns a function that allows to request a xr anchor */ export declare function useRequestXRAnchor(): (options: XRAnchorOptions) => Promise<XRAnchor | undefined>; /** * hook that returns a function that allows to request a xr persistent anchor * export function useRequestXRPersistentAnchor() { const store = useXRStore() return useMemo(() => requestXRPersistentAnchor.bind(null, store), [store]) }*/ /** * hook that returns a function that allows to load a xr persistent anchor * export function useLoadXRPersistentAnchor() { const session = useXR((xr) => xr.session) return useMemo(() => (session != null ? loadXRPersistentAnchor.bind(null, session) : undefined), [session]) }*/ /** * hook that returns a function that allows to delete a xr persistent anchor * export function useDeleteXRPersistentAnchor() { const store = useXRStore() return useMemo(() => deleteXRPersistentAnchor.bind(null, store), [store]) }*/ /** * hook for requesting and storing a single xr anchor */ export declare function useXRAnchor(): [ anchor: XRAnchor | undefined, createAnchor: (options: XRAnchorOptions) => Promise<XRAnchor | undefined> ];