@galacean/engine-xr 0.0.0-experimental-stateMachine.0 → 0.0.0-experimental-1.2-xr.0

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": "0.0.0-experimental-stateMachine.0",
3
+ "version": "0.0.0-experimental-1.2-xr.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -23,11 +23,11 @@
23
23
  "types/**/*"
24
24
  ],
25
25
  "devDependencies": {
26
- "@galacean/engine": "0.0.0-experimental-stateMachine.0",
27
- "@galacean/engine-design": "0.0.0-experimental-stateMachine.0"
26
+ "@galacean/engine-design": "0.0.0-experimental-1.2-xr.0",
27
+ "@galacean/engine": "0.0.0-experimental-1.2-xr.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@galacean/engine": "0.0.0-experimental-stateMachine.0"
30
+ "@galacean/engine": "0.0.0-experimental-1.2-xr.0"
31
31
  },
32
32
  "scripts": {
33
33
  "b:types": "tsc"
@@ -34,14 +34,14 @@ export declare class XRManagerExtended extends XRManager {
34
34
  * @param args - The constructor params of the feature
35
35
  * @returns The feature which has been added
36
36
  */
37
- addFeature<T extends new (xrManager: XRManagerExtended, ...args: any[]) => XRFeature>(type: T, ...args: TFeatureConstructorArguments<T>): XRFeature | null;
37
+ addFeature<T extends new (xrManager: XRManagerExtended, ...args: any[]) => XRFeature>(type: T, ...args: TFeatureConstructorArguments<T>): InstanceType<T> | null;
38
38
  /**
39
39
  * Get feature which match the type.
40
40
  * @param type - The type of the feature
41
41
  * @returns The feature which match type
42
42
  */
43
43
  getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | null;
44
- getFeatures<T extends XRFeature>(type: TFeatureConstructor<T>, out?: T[]): T[];
44
+ getFeatures(out?: XRFeature[]): XRFeature[];
45
45
  /**
46
46
  * Enter XR immersive mode, when you call this method, it will initialize and display the XR virtual world.
47
47
  * @param sessionMode - The mode of the session
@@ -73,15 +73,13 @@ declare module "@galacean/engine" {
73
73
  set origin(value: Entity);
74
74
  /**
75
75
  * Get all initialized features at this moment.
76
- * @param type - The type of the feature
77
76
  */
78
- getFeatures<T extends XRFeature>(type: TFeatureConstructor<T>): T[];
77
+ getFeatures(): XRFeature[];
79
78
  /**
80
79
  * Get all initialized features at this moment.
81
- * @param type - The type of the feature
82
80
  * @param out - Save all features in `out`
83
81
  */
84
- getFeatures<T extends XRFeature>(type: TFeatureConstructor<T>, out: T[]): T[];
82
+ getFeatures(out: XRFeature[]): XRFeature[];
85
83
  /**
86
84
  * Check if the specified feature is supported.
87
85
  * @param type - The type of the feature
@@ -101,7 +99,7 @@ declare module "@galacean/engine" {
101
99
  * @returns The feature which match type
102
100
  */
103
101
  getFeature<T extends XRFeature>(type: TFeatureConstructor<T>): T | null;
104
- getFeatures<T extends XRFeature>(type: TFeatureConstructor<T>, out?: T[]): T[];
102
+ getFeatures(out?: XRFeature[]): XRFeature[];
105
103
  /**
106
104
  * Enter XR immersive mode, when you call this method, it will initialize and display the XR virtual world.
107
105
  * @param sessionMode - The mode of the session
@@ -6,7 +6,7 @@ import { XRTracked } from "./XRTracked";
6
6
  /**
7
7
  * The base class of XR trackable manager.
8
8
  */
9
- export declare abstract class XRTrackableFeature<T extends XRTracked, K extends XRRequestTracking<T>> extends XRFeature<IXRTrackablePlatformFeature<T, K>> {
9
+ export declare abstract class XRTrackableFeature<T extends XRTracked = XRTracked, K extends XRRequestTracking<T> = XRRequestTracking<T>> extends XRFeature<IXRTrackablePlatformFeature<T, K>> {
10
10
  protected static _uuid: number;
11
11
  protected _requestTrackings: K[];
12
12
  protected _tracked: T[];
package/types/index.d.ts CHANGED
@@ -2,6 +2,8 @@ import "./XRManagerExtended";
2
2
  export { XRPose } from "./XRPose";
3
3
  export { XRFeature } from "./feature/XRFeature";
4
4
  export { XRCameraManager } from "./feature/camera/XRCameraManager";
5
+ export { XRTracked } from "./feature/trackable/XRTracked";
6
+ export { XRTrackableFeature } from "./feature/trackable/XRTrackableFeature";
5
7
  export { TrackableType } from "./feature/hitTest/TrackableType";
6
8
  export { XRHitResult } from "./feature/hitTest/XRHitResult";
7
9
  export { XRHitTest } from "./feature/hitTest/XRHitTest";