@galacean/engine-xr 2.0.0-alpha.49 → 2.0.0-alpha.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-xr",
3
- "version": "2.0.0-alpha.49",
3
+ "version": "2.0.0-alpha.50",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -27,11 +27,11 @@
27
27
  "types/**/*"
28
28
  ],
29
29
  "devDependencies": {
30
- "@galacean/engine": "2.0.0-alpha.49",
31
- "@galacean/engine-design": "2.0.0-alpha.49"
30
+ "@galacean/engine-design": "2.0.0-alpha.50",
31
+ "@galacean/engine": "2.0.0-alpha.50"
32
32
  },
33
33
  "peerDependencies": {
34
- "@galacean/engine": "2.0.0-alpha.49"
34
+ "@galacean/engine": "2.0.0-alpha.50"
35
35
  },
36
36
  "scripts": {
37
37
  "b:types": "tsc"
@@ -24,7 +24,7 @@ export declare class XRManagerExtended extends XRManager {
24
24
  set origin(value: Entity);
25
25
  isSupportedFeature<T extends XRFeature>(feature: TFeatureConstructor<T>): boolean;
26
26
  addFeature<T extends new (xrManager: XRManagerExtended, ...args: any[]) => XRFeature>(type: T, ...args: TFeatureConstructorArguments<T>): InstanceType<T> | null;
27
- getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | null;
27
+ getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | undefined;
28
28
  enterXR(sessionMode: XRSessionMode, autoRun?: boolean): Promise<void>;
29
29
  exitXR(): Promise<void>;
30
30
  _initialize(engine: Engine, xrDevice: IXRDevice): void;
@@ -90,7 +90,7 @@ declare module "@galacean/engine" {
90
90
  * @param type - The type of the feature
91
91
  * @returns The feature which match type
92
92
  */
93
- getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | null;
93
+ getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | undefined;
94
94
  /**
95
95
  * Enter XR immersive mode, when you call this method, it will initialize and display the XR virtual world.
96
96
  * @param sessionMode - The mode of the session
@@ -7,9 +7,9 @@ import { XRTrackedInputDevice } from "../../input/XRTrackedInputDevice";
7
7
  export declare class XRCameraManager {
8
8
  private _xrManager;
9
9
  /**
10
- * The fixed foveation of the camera.
10
+ * Fixed foveation, or `undefined` if unsupported by the active session.
11
11
  */
12
- get fixedFoveation(): number;
12
+ get fixedFoveation(): number | undefined;
13
13
  set fixedFoveation(value: number);
14
14
  /**
15
15
  * @internal
@@ -27,7 +27,7 @@ export declare class XRCameraManager {
27
27
  * @param type - The input type
28
28
  * @returns The camera that was detached
29
29
  */
30
- detachCamera(type: XRTrackedInputDevice.Camera | XRTrackedInputDevice.LeftCamera | XRTrackedInputDevice.RightCamera): Camera;
30
+ detachCamera(type: XRTrackedInputDevice.Camera | XRTrackedInputDevice.LeftCamera | XRTrackedInputDevice.RightCamera): Camera | null;
31
31
  /**
32
32
  * @internal
33
33
  */
@@ -13,5 +13,5 @@ export declare class XRCamera extends XRInput implements IXRCamera {
13
13
  /** The projection matrix of the camera. */
14
14
  projectionMatrix: Matrix;
15
15
  /** @internal */
16
- _camera: Camera;
16
+ _camera: Camera | null;
17
17
  }
@@ -13,7 +13,7 @@ export declare class XRSessionManager {
13
13
  /** Signal emitted when session state changes. */
14
14
  readonly onStateChanged: Signal<[XRSessionState]>;
15
15
  /** @internal */
16
- _platformSession: IXRSession;
16
+ _platformSession: IXRSession | null;
17
17
  private _mode;
18
18
  private _state;
19
19
  private _rhi;
@@ -28,13 +28,13 @@ export declare class XRSessionManager {
28
28
  */
29
29
  get state(): XRSessionState;
30
30
  /**
31
- * Return a list of supported frame rates.(only available in-session)
31
+ * Supported frame rates, or `undefined` if unsupported. Only available in-session.
32
32
  */
33
- get supportedFrameRate(): Float32Array;
33
+ get supportedFrameRate(): Float32Array | undefined;
34
34
  /**
35
- * Return the current frame rate as reported by the device.
35
+ * Current frame rate, or `undefined` if unsupported. Only available in-session.
36
36
  */
37
- get frameRate(): number;
37
+ get frameRate(): number | undefined;
38
38
  /**
39
39
  * @internal
40
40
  */