UNPKG

@bezlepkin/nativescript-ar

Version:

NativeScript Augmented Reality plugin. ARKit on iOS and (with the help of Sceneform) ARCore on Android.

35 lines (34 loc) 1.8 kB
import { ImageSource } from "@nativescript/core"; import { AR as ARBase, ARAddBoxOptions, ARAddImageOptions, ARAddModelOptions, ARAddOptions, ARAddPlaneOptions, ARAddSphereOptions, ARAddTextOptions, ARAddTubeOptions, ARAddVideoOptions, ARCommonNode, ARDebugLevel, ARImageTrackingOptions, ARPlaneDetectionOrientation, ARPosition, ARRotation, ARUIViewOptions, ARVideoNode } from "./ar-common"; export declare class AR extends ARBase { private faceNodeMap; initNativeView(): void; disposeNativeView(): void; getCameraPosition(): ARPosition; getCameraRotation(): ARRotation; private initAR; private fireArLoadedEvent; static isSupported(): boolean; getFragment(): any; togglePlaneVisibility(to: boolean): void; setPlaneDetection(to: ARPlaneDetectionOrientation): void; toggleStatistics(on: boolean): void; setDebugLevel(to: ARDebugLevel): void; grabScreenshot(): Promise<ImageSource>; startRecordingVideo(): Promise<boolean>; stopRecordingVideo(): Promise<string>; reset(): void; addNode(options: ARAddOptions): Promise<ARCommonNode>; addVideo(options: ARAddVideoOptions): Promise<ARVideoNode>; addImage(options: ARAddImageOptions): Promise<ARCommonNode>; addModel(options: ARAddModelOptions): Promise<ARCommonNode>; addPlane(options: ARAddPlaneOptions): Promise<ARCommonNode>; addBox(options: ARAddBoxOptions): Promise<ARCommonNode>; addSphere(options: ARAddSphereOptions): Promise<ARCommonNode>; addText(options: ARAddTextOptions): Promise<ARCommonNode>; addTube(options: ARAddTubeOptions): Promise<ARCommonNode>; addUIView(options: ARUIViewOptions): Promise<ARCommonNode>; trackImage(options: ARImageTrackingOptions): void; private wasPermissionGranted; private _requestPermission; }