Class EasyARSession
- 名前空間
- easyar
scene 内の AR session を制御し、ライフサイクル全体の data flow を制御します。このコンポーネントは AR の entry point です。同時に複数の active instance は許可されません。EasyAR コンポーネントのすべての機能は Session 初期化完了後にのみ使用できます。
解説
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>;
パラメーター
idannotationID。
戻り値
{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;
パラメーター
inputModeGPS input mode。
geoLocationGPS information。
戻り値
{void}
setPlaneDetectionErrorBehavior(behavior)
WeChat Mini Program の plane detection 異常時の behavior を設定します。
setPlaneDetectionErrorBehavior(behavior: () => void): void;
パラメーター
behaviorcallback function を渡します。
戻り値
{void}
start(options)
Session を開始します。
start(options?: SessionStartOptions): Promise<void>;
パラメーター
optionsoptions startup options, optional.
戻り値
{Promise
}
stop()
Session を停止します。 At this time, all BlockController instances and Trackers used by the Session will be destroyed.
stop(): void;
戻り値
{void}