Table of Contents

Class EasyARSession

네임스페이스
easyar

scene에서 AR session을 제어하고 전체 lifecycle의 data flow를 제어합니다. 이 컴포넌트는 AR의 entry point입니다. 동시에 여러 active instance는 허용되지 않습니다. EasyAR 컴포넌트의 모든 기능은 Session 초기화가 완료된 후에만 사용할 수 있습니다.

EasyARSession

주의 사항

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the EasyARSession class.

속성

blockHolder

가져옵니다 BlockHolder

get blockHolder(): BlockHolder;

megaTracker

가져옵니다 MegaTracker

get megaTracker(): easyar.MegaTracker;

state

가져옵니다 current Session status

get state(): SessionState;

메서드

xrCamera

가져옵니다 XRCamera in the scene used by the Session

get xrCamera(): xrfs.XRCamera;

반환 값

dumpLog(signal)

시작 및 중지합니다 log recording. Can be called at any time.

dumpLog(signal: boolean): string;

매개 변수

signal

시작하려면 true, 중지하려면 false를 전달합니다.

반환 값

{string} returns the file path; when starting, it returns a string with length 0.

dumpSession(signal)

시작 및 중지합니다 Session data recording. Can be called at any time.

dumpSession(signal: boolean): string;

매개 변수

signal

시작하려면 true, 중지하려면 false를 전달합니다.

반환 값

{string} returns the file path; when starting, it returns a string with length 0.

loadAnnotation(id)

annotations를 로드합니다. Can only be called after Session.start succeeds.

loadAnnotation(id: string): Promise<easyar.ema.IEma>;

매개 변수

id

annotationID。

반환 값

{easyar.ema.IEma}

pause()

일시 중지합니다 ARSession; updates of Tracker and camera will stop (note that they will not be controlled again by xrframe at this time).

pause(): void;

반환 값

{void}

resume()

재개합니다 ARSession; updates of Tracker and camera will resume.

resume(): void;

반환 값

{void}

setDeviceOrientation(deviceOrientation)

설정합니다 current device orientation. Can be called at any time and takes effect immediately.

setDeviceOrientation(deviceOrientation: DeviceOrientation): void;

매개 변수

deviceOrientation

현재 device orientation.

반환 값

{void}

setGeoLocationInput(inputMode, geoLocation)

설정합니다 current GPS input mode. Can only be called before Session.start and takes effect after start.

setGeoLocationInput(inputMode: easyar.GeoLocationInputMode, geoLocation?: easyar.GeoLocation): void;

매개 변수

inputMode

GPS input mode.

geoLocation

GPS information.

반환 값

{void}

setPlaneDetectionErrorBehavior(behavior)

WeChat Mini Program plane detection 이상 시 behavior를 설정합니다.

setPlaneDetectionErrorBehavior(behavior: () => void): void;

매개 변수

behavior

callback function을 전달합니다.

반환 값

{void}

start(options)

Session을 시작합니다.

start(options?: SessionStartOptions): Promise<void>;

매개 변수

options

options startup options, optional.

반환 값

{Promise}

stop()

Session을 중지합니다. At this time, all BlockController instances and Trackers used by the Session will be destroyed.

stop(): void;

반환 값

{void}