@galacean/engine-core 1.1.0-beta.19 → 1.1.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +174 -91
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +174 -91
- package/dist/module.js +174 -91
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/types.d.ts +3 -0
- package/types/asset/AssetPromise.d.ts +1 -0
- package/types/mesh/SubModelMesh.d.ts +260 -0
- package/types/particle/modules/MainModule.d.ts +0 -1
- package/types/xr/IXRDevice.d.ts +26 -0
- package/types/xr/XRManager.d.ts +89 -24
- package/types/xr/XRModule.d.ts +126 -0
- package/types/xr/component/XRPoseDriver.d.ts +5 -5
- package/types/xr/component/XRTrackingMode.d.ts +15 -0
- package/types/xr/component/trackable/XRAnchor.d.ts +4 -0
- package/types/xr/component/trackable/XRImage.d.ts +6 -0
- package/types/xr/component/trackable/XRPlane.d.ts +7 -0
- package/types/xr/component/trackable/XRTracked.d.ts +13 -0
- package/types/xr/feature/XRFeatureManager.d.ts +65 -0
- package/types/xr/feature/XRFeatureType.d.ts +17 -0
- package/types/xr/feature/XRPlatformFeature.d.ts +17 -0
- package/types/xr/feature/camera/IXRCameraDescriptor.d.ts +7 -0
- package/types/xr/feature/camera/XRCameraManager.d.ts +35 -0
- package/types/xr/feature/camera/XRPlatformCamera.d.ts +5 -0
- package/types/xr/feature/hitTest/XRHItTestType.d.ts +16 -0
- package/types/xr/feature/hitTest/XRHitTestManager.d.ts +38 -0
- package/types/xr/feature/movementTracking/IXRMovementTrackingDescriptor.d.ts +9 -0
- package/types/xr/feature/movementTracking/XRMovementTrackingManager.d.ts +8 -0
- package/types/xr/feature/movementTracking/XRMovementTrackingMode.d.ts +5 -0
- package/types/xr/feature/movementTracking/XRPlatformMovementTracking.d.ts +10 -0
- package/types/xr/feature/trackable/XRRequestTrackingState.d.ts +11 -0
- package/types/xr/feature/trackable/XRTrackableManager.d.ts +41 -0
- package/types/xr/feature/trackable/XRTrackablePlatformFeature.d.ts +29 -0
- package/types/xr/feature/trackable/XRTracked.d.ts +9 -0
- package/types/xr/feature/trackable/XRTrackedUpdateFlag.d.ts +11 -0
- package/types/xr/feature/trackable/XRTrackingState.d.ts +11 -0
- package/types/xr/feature/trackable/anchor/IXRAnchorTrackingDescriptor.d.ts +8 -0
- package/types/xr/feature/trackable/anchor/XRAnchorTrackingManager.d.ts +22 -0
- package/types/xr/feature/trackable/anchor/XRAnchorTrackingMode.d.ts +4 -0
- package/types/xr/feature/trackable/anchor/XRPlatformAnchorTracking.d.ts +12 -0
- package/types/xr/feature/trackable/anchor/XRRequestTrackingAnchor.d.ts +10 -0
- package/types/xr/feature/trackable/image/IXRImageTrackingDescriptor.d.ts +5 -0
- package/types/xr/feature/trackable/image/XRImageTrackingManager.d.ts +33 -0
- package/types/xr/feature/trackable/image/XRPlatformImageTracking.d.ts +14 -0
- package/types/xr/feature/trackable/image/XRReferenceImage.d.ts +14 -0
- package/types/xr/feature/trackable/image/XRRequestTrackingImage.d.ts +11 -0
- package/types/xr/feature/trackable/image/XRTrackedImage.d.ts +5 -0
- package/types/xr/feature/trackable/plane/IXRPlaneTrackingDescriptor.d.ts +9 -0
- package/types/xr/feature/trackable/plane/XRPlaneDetectionMode.d.ts +13 -0
- package/types/xr/feature/trackable/plane/XRPlaneMode.d.ts +13 -0
- package/types/xr/feature/trackable/plane/XRPlaneTrackingManager.d.ts +14 -0
- package/types/xr/feature/trackable/plane/XRPlatformPlaneTracking.d.ts +11 -0
- package/types/xr/feature/trackable/plane/XRRequestTrackingPlane.d.ts +11 -0
- package/types/xr/feature/trackable/plane/XRTrackedPlane.d.ts +11 -0
- package/types/xr/index.d.ts +39 -18
- package/types/xr/input/XRCamera.d.ts +28 -0
- package/types/xr/input/XRController.d.ts +38 -0
- package/types/xr/input/XRControllerPoseMode.d.ts +9 -0
- package/types/xr/input/XRInput.d.ts +14 -0
- package/types/xr/input/XRInputButton.d.ts +19 -0
- package/types/xr/input/XRInputEvent.d.ts +24 -0
- package/types/xr/input/XRInputEventType.d.ts +11 -0
- package/types/xr/input/XRInputManager.d.ts +58 -0
- package/types/xr/input/XRInputType.d.ts +23 -0
- package/types/xr/input/XRTargetRayMode.d.ts +12 -0
- package/types/xr/input/XRTrackedUpdateFlag.d.ts +11 -0
- package/types/xr/input/XRTrackingState.d.ts +11 -0
- package/types/xr/session/XRSessionManager.d.ts +76 -0
- package/types/xr/session/XRSessionState.d.ts +13 -0
- package/types/xr/session/XRSessionType.d.ts +7 -0
package/types/xr/index.d.ts
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
export { XRManager,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
1
|
+
export { XRManager, registerXRFeatureManager } from "./XRManager";
|
|
2
|
+
export type { IXRDevice } from "@galacean/engine-design/src/xr/IXRDevice";
|
|
3
|
+
export { XRFeatureType } from "./feature/XRFeatureType";
|
|
4
|
+
export { XRFeatureManager } from "./feature/XRFeatureManager";
|
|
5
|
+
export type { IXRCameraDescriptor } from "./feature/camera/IXRCameraDescriptor";
|
|
6
|
+
export { XRCameraManager } from "./feature/camera/XRCameraManager";
|
|
7
|
+
export { XRHitTestManager } from "./feature/hitTest/XRHitTestManager";
|
|
8
|
+
export { XRHitTestType } from "./feature/hitTest/XRHitTestType";
|
|
9
|
+
export { XRRequestTrackingState } from "./feature/trackable/XRRequestTrackingState";
|
|
10
|
+
export { XRTracked } from "./feature/trackable/XRTracked";
|
|
11
|
+
export type { IXRMovementTrackingDescriptor } from "./feature/movementTracking/IXRMovementTrackingDescriptor";
|
|
12
|
+
export { XRMovementTrackingManager } from "./feature/movementTracking/XRMovementTrackingManager";
|
|
13
|
+
export { XRMovementTrackingMode } from "./feature/movementTracking/XRMovementTrackingMode";
|
|
14
|
+
export type { IXRAnchorTrackingDescriptor } from "./feature/trackable/anchor/IXRAnchorTrackingDescriptor";
|
|
15
|
+
export { XRAnchorTrackingManager } from "./feature/trackable/anchor/XRAnchorTrackingManager";
|
|
16
|
+
export { XRRequestTrackingAnchor } from "./feature/trackable/anchor/XRRequestTrackingAnchor";
|
|
17
|
+
export type { IXRImageTrackingDescriptor } from "./feature/trackable/image/IXRImageTrackingDescriptor";
|
|
18
|
+
export { XRImageTrackingManager } from "./feature/trackable/image/XRImageTrackingManager";
|
|
19
|
+
export { XRReferenceImage } from "./feature/trackable/image/XRReferenceImage";
|
|
20
|
+
export { XRRequestTrackingImage } from "./feature/trackable/image/XRRequestTrackingImage";
|
|
21
|
+
export { XRTrackedImage } from "./feature/trackable/image/XRTrackedImage";
|
|
22
|
+
export type { IXRPlaneTrackingDescriptor } from "./feature/trackable/plane/IXRPlaneTrackingDescriptor";
|
|
23
|
+
export { XRPlaneTrackingManager } from "./feature/trackable/plane/XRPlaneTrackingManager";
|
|
24
|
+
export { XRPlaneMode } from "./feature/trackable/plane/XRPlaneMode";
|
|
25
|
+
export { XRRequestTrackingPlane } from "./feature/trackable/plane/XRRequestTrackingPlane";
|
|
26
|
+
export { XRTrackedPlane } from "./feature/trackable/plane/XRTrackedPlane";
|
|
27
|
+
export { XRTrackingState } from "./input/XRTrackingState";
|
|
28
|
+
export { XRInputManager } from "./input/XRInputManager";
|
|
29
|
+
export { XRInputButton } from "./input/XRInputButton";
|
|
30
|
+
export { XRInputEvent } from "./input/XRInputEvent";
|
|
31
|
+
export { XRController } from "./input/XRController";
|
|
32
|
+
export { XRInputType } from "./input/XRInputType";
|
|
33
|
+
export { XRCamera } from "./input/XRCamera";
|
|
34
|
+
export { XRTargetRayMode } from "./input/XRTargetRayMode";
|
|
35
|
+
export { XRInputEventType } from "./input/XRInputEventType";
|
|
36
|
+
export { XRTrackedUpdateFlag } from "./input/XRTrackedUpdateFlag";
|
|
37
|
+
export { XRSessionManager } from "./session/XRSessionManager";
|
|
38
|
+
export { XRSessionType } from "./session/XRSessionType";
|
|
39
|
+
export { XRSessionState } from "./session/XRSessionState";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Matrix, Rect } from "@galacean/engine-math";
|
|
2
|
+
import { Camera } from "../../Camera";
|
|
3
|
+
import { IXRInput, IXRPose } from "@galacean/engine-design";
|
|
4
|
+
import { XRInputType } from "./XRInputType";
|
|
5
|
+
import { XRTrackingState } from "./XRTrackingState";
|
|
6
|
+
/**
|
|
7
|
+
* The XR camera.
|
|
8
|
+
*/
|
|
9
|
+
export declare class XRCamera implements IXRInput {
|
|
10
|
+
type: XRInputType;
|
|
11
|
+
/** The update frame count of xr input. */
|
|
12
|
+
frameCount: number;
|
|
13
|
+
/** The tracking state of xr input. */
|
|
14
|
+
trackingState: XRTrackingState;
|
|
15
|
+
/** The viewport of the camera. */
|
|
16
|
+
viewport: Rect;
|
|
17
|
+
/** The projection matrix of the camera. */
|
|
18
|
+
projectionMatrix: Matrix;
|
|
19
|
+
/** The associated virtual camera. */
|
|
20
|
+
camera: Camera;
|
|
21
|
+
/** The pose of the input. */
|
|
22
|
+
protected _pose: IXRPose;
|
|
23
|
+
/**
|
|
24
|
+
* Return the pose of the input.
|
|
25
|
+
*/
|
|
26
|
+
get pose(): IXRPose;
|
|
27
|
+
constructor(type: XRInputType);
|
|
28
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { XRControllerPoseMode } from "./XRControllerPoseMode";
|
|
2
|
+
import { DisorderedArray } from "../../DisorderedArray";
|
|
3
|
+
import { IXRInput, IXRPose } from "@galacean/engine-design";
|
|
4
|
+
import { XRInputButton } from "./XRInputButton";
|
|
5
|
+
import { XRInputType } from "./XRInputType";
|
|
6
|
+
import { XRTrackingState } from "./XRTrackingState";
|
|
7
|
+
/**
|
|
8
|
+
* The XR controller.
|
|
9
|
+
*/
|
|
10
|
+
export declare class XRController implements IXRInput {
|
|
11
|
+
type: XRInputType;
|
|
12
|
+
/** The update frame count of xr input. */
|
|
13
|
+
frameCount: number;
|
|
14
|
+
/** The tracking state of xr input. */
|
|
15
|
+
trackingState: XRTrackingState;
|
|
16
|
+
/** The currently pressed buttons of this controller. */
|
|
17
|
+
pressedButtons: XRInputButton;
|
|
18
|
+
/** Record button lifted. */
|
|
19
|
+
upMap: number[];
|
|
20
|
+
/** Record button pressed. */
|
|
21
|
+
downMap: number[];
|
|
22
|
+
/** Record button lifted in the current frame. */
|
|
23
|
+
upList: DisorderedArray<XRInputButton>;
|
|
24
|
+
/** Record button pressed in the current frame. */
|
|
25
|
+
downList: DisorderedArray<XRInputButton>;
|
|
26
|
+
/** the pose mode of the controller. (Default is Grip) */
|
|
27
|
+
poseMode: XRControllerPoseMode;
|
|
28
|
+
/** The grip space pose of the controller. */
|
|
29
|
+
gripPose: IXRPose;
|
|
30
|
+
/** The target ray space pose of the controller. */
|
|
31
|
+
targetRayPose: IXRPose;
|
|
32
|
+
protected _pose: IXRPose;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the pose of the controller.
|
|
35
|
+
*/
|
|
36
|
+
get pose(): IXRPose;
|
|
37
|
+
constructor(type: XRInputType);
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IXRInput, IXRPose } from "@galacean/engine-design";
|
|
2
|
+
import { XRTrackingState } from "../feature/trackable/XRTrackingState";
|
|
3
|
+
export declare abstract class XRInput implements IXRInput {
|
|
4
|
+
/**
|
|
5
|
+
* The tracking state of xr input.
|
|
6
|
+
*/
|
|
7
|
+
trackingState: XRTrackingState;
|
|
8
|
+
protected _pose: IXRPose;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the pose of the input.
|
|
11
|
+
*/
|
|
12
|
+
get pose(): IXRPose;
|
|
13
|
+
set pose(value: IXRPose);
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for XR input button.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum XRInputButton {
|
|
5
|
+
/** None */
|
|
6
|
+
None = 0,
|
|
7
|
+
/** Select */
|
|
8
|
+
Select = 1,
|
|
9
|
+
/** Select */
|
|
10
|
+
Trigger = 1,
|
|
11
|
+
/** Squeeze */
|
|
12
|
+
Squeeze = 2,
|
|
13
|
+
/** TouchPad */
|
|
14
|
+
TouchPad = 4,
|
|
15
|
+
/** A */
|
|
16
|
+
AButton = 8,
|
|
17
|
+
/** B */
|
|
18
|
+
BButton = 16
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IXRInputEvent } from "@galacean/engine-design";
|
|
2
|
+
import { XRInputEventType } from "./XRInputEventType";
|
|
3
|
+
import { XRTargetRayMode } from "./XRTargetRayMode";
|
|
4
|
+
import { XRInputType } from "./XRInputType";
|
|
5
|
+
/**
|
|
6
|
+
* XR interaction events.
|
|
7
|
+
*/
|
|
8
|
+
export declare class XRInputEvent implements IXRInputEvent {
|
|
9
|
+
/**
|
|
10
|
+
* TargetRayMode indicates the method by which the target ray for
|
|
11
|
+
* the input source should be generated and how it should be presented to the user.
|
|
12
|
+
*/
|
|
13
|
+
targetRayMode: XRTargetRayMode;
|
|
14
|
+
/** The type of input event. */
|
|
15
|
+
type: XRInputEventType;
|
|
16
|
+
/** The type of input. */
|
|
17
|
+
input: XRInputType;
|
|
18
|
+
/** The unique ID of the touch point. (Appears only when targetRayMode is screen.)*/
|
|
19
|
+
id?: number;
|
|
20
|
+
/** The coordinate x on the screen. (Appears only when targetRayMode is screen.)*/
|
|
21
|
+
x?: number;
|
|
22
|
+
/** The coordinate y on the screen. (Appears only when targetRayMode is screen.) */
|
|
23
|
+
y?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IXRInput, IXRSession } from "@galacean/engine-design";
|
|
2
|
+
import { Engine } from "../../Engine";
|
|
3
|
+
import { XRController } from "./XRController";
|
|
4
|
+
import { XRInputType } from "./XRInputType";
|
|
5
|
+
import { UpdateFlagManager } from "../../UpdateFlagManager";
|
|
6
|
+
import { XRTrackingState } from "./XRTrackingState";
|
|
7
|
+
import { XRTrackedUpdateFlag } from "./XRTrackedUpdateFlag";
|
|
8
|
+
/**
|
|
9
|
+
* The manager of XR input.
|
|
10
|
+
*/
|
|
11
|
+
export declare class XRInputManager {
|
|
12
|
+
protected _engine: Engine;
|
|
13
|
+
protected _session: IXRSession;
|
|
14
|
+
protected _inputs: IXRInput[];
|
|
15
|
+
protected _controllers: XRController[];
|
|
16
|
+
protected _added: IXRInput[];
|
|
17
|
+
protected _updated: IXRInput[];
|
|
18
|
+
protected _removed: IXRInput[];
|
|
19
|
+
protected _statusSnapshot: XRTrackingState[];
|
|
20
|
+
protected _trackingUpdate: UpdateFlagManager;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the input instance.
|
|
23
|
+
* @param type - The input type
|
|
24
|
+
* @returns The input instance
|
|
25
|
+
*/
|
|
26
|
+
getInput<T extends IXRInput>(type: XRInputType): T;
|
|
27
|
+
/**
|
|
28
|
+
* Add a listener to the input update event.
|
|
29
|
+
* @param listener - The listener to add
|
|
30
|
+
*/
|
|
31
|
+
addListener(listener: (type: XRTrackedUpdateFlag, param: readonly IXRInput[]) => any): void;
|
|
32
|
+
/**
|
|
33
|
+
* Remove a listener from the input update event.
|
|
34
|
+
* @param listener - The listener to remove
|
|
35
|
+
*/
|
|
36
|
+
removeListener(listener: (type: XRTrackedUpdateFlag, param: readonly IXRInput[]) => any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Returns whether the button is pressed.
|
|
39
|
+
* @param button - The button to check
|
|
40
|
+
* @returns Whether the button is pressed
|
|
41
|
+
*/
|
|
42
|
+
isButtonDown(button: number, out: XRController[]): XRController[];
|
|
43
|
+
/**
|
|
44
|
+
* Returns whether the button is lifted.
|
|
45
|
+
* @param button - The button to check
|
|
46
|
+
* @returns Whether the button is lifted
|
|
47
|
+
*/
|
|
48
|
+
isButtonUp(button: number, out: XRController[]): XRController[];
|
|
49
|
+
/**
|
|
50
|
+
* Returns whether the button is held down.
|
|
51
|
+
* @param button - The button to check
|
|
52
|
+
* @returns Whether the button is held down
|
|
53
|
+
*/
|
|
54
|
+
isButtonHeldDown(button: number, out: XRController[]): XRController[];
|
|
55
|
+
constructor(engine: Engine);
|
|
56
|
+
private _handleEvent;
|
|
57
|
+
private _makeUpPointerEvent;
|
|
58
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for XR input type.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum XRInputType {
|
|
5
|
+
/** Controller */
|
|
6
|
+
Controller = 0,
|
|
7
|
+
/** Left controller */
|
|
8
|
+
LeftController = 1,
|
|
9
|
+
/** Right controller */
|
|
10
|
+
RightController = 2,
|
|
11
|
+
/** Camera */
|
|
12
|
+
Camera = 3,
|
|
13
|
+
/** Left camera */
|
|
14
|
+
LeftCamera = 4,
|
|
15
|
+
/** Right camera */
|
|
16
|
+
RightCamera = 5,
|
|
17
|
+
/** Head */
|
|
18
|
+
LeftHand = 6,
|
|
19
|
+
/** Right hand */
|
|
20
|
+
RightHand = 7,
|
|
21
|
+
/** Length of input type */
|
|
22
|
+
Length = 8
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TargetRayMode indicates the method by which the target ray for
|
|
3
|
+
* the input source should be generated and how it should be presented to the user.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum XRTargetRayMode {
|
|
6
|
+
/** Eye */
|
|
7
|
+
Gaze = 0,
|
|
8
|
+
/** Controller */
|
|
9
|
+
TrackedPointer = 1,
|
|
10
|
+
/** Game pad */
|
|
11
|
+
Screen = 2
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for XR tracked update flag.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum XRTrackedUpdateFlag {
|
|
5
|
+
/** The object that was not tracked in the previous frame was tracked in this frame. */
|
|
6
|
+
Added = 0,
|
|
7
|
+
/** Both the previous frame and this frame are tracked */
|
|
8
|
+
Updated = 1,
|
|
9
|
+
/** The object that was tracked in the previous frame is not tracked in this frame. */
|
|
10
|
+
Removed = 2
|
|
11
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { IXRFrame, IXRSession, IXRFeatureDescriptor } from "@galacean/engine-design";
|
|
2
|
+
import { Engine } from "../../Engine";
|
|
3
|
+
import { XRSessionType } from "./XRSessionType";
|
|
4
|
+
import { XRSessionState } from "./XRSessionState";
|
|
5
|
+
type TXRSessionStateChangeListener = (from: XRSessionState, to: XRSessionState) => void;
|
|
6
|
+
export declare class XRSessionManager {
|
|
7
|
+
protected _engine: Engine;
|
|
8
|
+
protected _session: IXRSession;
|
|
9
|
+
protected _frame: IXRFrame;
|
|
10
|
+
protected _state: XRSessionState;
|
|
11
|
+
private _rhi;
|
|
12
|
+
private _listeners;
|
|
13
|
+
/**
|
|
14
|
+
* Return the current session state.
|
|
15
|
+
*/
|
|
16
|
+
get state(): XRSessionState;
|
|
17
|
+
/**
|
|
18
|
+
* Return the current session.
|
|
19
|
+
*/
|
|
20
|
+
get session(): IXRSession;
|
|
21
|
+
/**
|
|
22
|
+
* Return a list of supported frame rates.(only available in-session)
|
|
23
|
+
*/
|
|
24
|
+
get supportedFrameRate(): Float32Array;
|
|
25
|
+
/**
|
|
26
|
+
* Return the current frame rate as reported by the device.
|
|
27
|
+
*/
|
|
28
|
+
get frameRate(): number;
|
|
29
|
+
/**
|
|
30
|
+
* Returns requestAnimationFrame in XR.
|
|
31
|
+
*/
|
|
32
|
+
get requestAnimationFrame(): (callback: FrameRequestCallback) => number;
|
|
33
|
+
/**
|
|
34
|
+
* Returns cancelAnimationFrame in XR.
|
|
35
|
+
*/
|
|
36
|
+
get cancelAnimationFrame(): (id: number) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Initialize the session.
|
|
39
|
+
* @param mode - The mode of the session
|
|
40
|
+
* @param requestFeatures - The requested features
|
|
41
|
+
* @returns The promise of the session
|
|
42
|
+
*/
|
|
43
|
+
initialize(mode: XRSessionType, requestFeatures: IXRFeatureDescriptor[]): Promise<IXRSession>;
|
|
44
|
+
/**
|
|
45
|
+
* Start the session.
|
|
46
|
+
* @returns The promise of the session
|
|
47
|
+
*/
|
|
48
|
+
start(): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Stop the session.
|
|
51
|
+
* @returns The promise of the session
|
|
52
|
+
*/
|
|
53
|
+
stop(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Destroy the session.
|
|
56
|
+
* @returns The promise of the session
|
|
57
|
+
*/
|
|
58
|
+
destroy(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Add a session state change listener.
|
|
61
|
+
* @param listener - The listener to add
|
|
62
|
+
*/
|
|
63
|
+
addSessionStateChangeListener(listener: TXRSessionStateChangeListener): void;
|
|
64
|
+
/**
|
|
65
|
+
* Remove a session state change listener.
|
|
66
|
+
* @param listener - The listener to remove
|
|
67
|
+
*/
|
|
68
|
+
removeSessionStateChangeListener(listener: TXRSessionStateChangeListener): void;
|
|
69
|
+
/**
|
|
70
|
+
* Remove all session state change listeners.
|
|
71
|
+
*/
|
|
72
|
+
removeAllSessionStateChangeListener(): void;
|
|
73
|
+
constructor(_engine: Engine);
|
|
74
|
+
private _dispatchSessionStateChange;
|
|
75
|
+
}
|
|
76
|
+
export {};
|