@galacean/engine-xr-webxr 2.0.0-alpha.44 → 2.0.0-alpha.45
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/browser.js +1 -8
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js.map +1 -1
- package/package.json +5 -4
- package/types/WebXRDevice.d.ts +2 -0
- package/types/WebXRFrame.d.ts +2 -0
- package/types/WebXRSession.d.ts +8 -0
- package/types/feature/WebXRAnchorTracking.d.ts +4 -0
- package/types/feature/WebXRFeature.d.ts +8 -1
- package/types/feature/WebXRImageTracking.d.ts +4 -0
- package/types/feature/WebXRPlaneTracking.d.ts +4 -0
- package/types/feature/WebXRTrackableFeature.d.ts +14 -1
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-xr-webxr",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.45",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"types/**/*"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
30
|
+
"@types/webxr": "^0.5.24",
|
|
31
|
+
"@galacean/engine-xr": "2.0.0-alpha.45"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@galacean/engine-
|
|
34
|
-
"@galacean/engine-
|
|
34
|
+
"@galacean/engine-design": "2.0.0-alpha.45",
|
|
35
|
+
"@galacean/engine-math": "2.0.0-alpha.45"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {},
|
|
37
38
|
"scripts": {
|
package/types/WebXRDevice.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { XRFeatureType, XRSessionMode } from "@galacean/engine-xr";
|
|
|
3
3
|
import { WebXRSession } from "./WebXRSession";
|
|
4
4
|
import { WebXRFeature } from "./feature/WebXRFeature";
|
|
5
5
|
export declare class WebXRDevice implements IXRDevice {
|
|
6
|
+
/** @internal */
|
|
7
|
+
static _platformFeatureMap: PlatformFeatureConstructor[];
|
|
6
8
|
isSupportedSessionMode(mode: XRSessionMode): Promise<void>;
|
|
7
9
|
isSupportedFeature(type: XRFeatureType): boolean;
|
|
8
10
|
createPlatformFeature(type: XRFeatureType, ...args: any[]): WebXRFeature;
|
package/types/WebXRFrame.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IXRFrame, IXRInput } from "@galacean/engine-design";
|
|
2
2
|
import { WebXRSession } from "./WebXRSession";
|
|
3
3
|
export declare class WebXRFrame implements IXRFrame {
|
|
4
|
+
/** @internal */
|
|
5
|
+
_platformFrame: XRFrame;
|
|
4
6
|
private _session;
|
|
5
7
|
updateInputs(inputs: IXRInput[]): void;
|
|
6
8
|
private _updateController;
|
package/types/WebXRSession.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ import { WebXRFrame } from "./WebXRFrame";
|
|
|
3
3
|
export declare class WebXRSession implements IXRSession {
|
|
4
4
|
requestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
5
5
|
cancelAnimationFrame: (id: number) => void;
|
|
6
|
+
/** @internal */
|
|
7
|
+
_onSessionExitCallBack: () => void;
|
|
8
|
+
/** @internal */
|
|
9
|
+
_platformSession: XRSession;
|
|
10
|
+
/** @internal */
|
|
11
|
+
_platformLayer: XRWebGLLayer;
|
|
12
|
+
/** @internal */
|
|
13
|
+
_platformReferenceSpace: XRReferenceSpace;
|
|
6
14
|
private _frame;
|
|
7
15
|
private _events;
|
|
8
16
|
private _screenPointers;
|
|
@@ -10,6 +10,10 @@ export declare class WebXRAnchorTracking extends WebXRTrackableFeature<IXRTracke
|
|
|
10
10
|
getTrackedResult(session: WebXRSession, frame: WebXRFrame, requestTrackings: IWebXRRequestTrackingAnchor[]): void;
|
|
11
11
|
get canModifyRequestTrackingAfterInit(): boolean;
|
|
12
12
|
onDelRequestTracking(requestTracking: IWebXRRequestTrackingAnchor): void;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
_assembleOptions(options: XRSessionInit): void;
|
|
13
17
|
private _addAnchor;
|
|
14
18
|
private _updateTrackedAnchor;
|
|
15
19
|
}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { IXRPlatformFeature } from "@galacean/engine-design";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class WebXRFeature implements IXRPlatformFeature {
|
|
6
|
+
/** @internal */
|
|
7
|
+
abstract _assembleOptions(options: XRSessionInit): Promise<void> | void;
|
|
8
|
+
}
|
|
@@ -18,6 +18,10 @@ export declare class WebXRImageTracking extends WebXRTrackableFeature<IXRTracked
|
|
|
18
18
|
checkAvailable(session: WebXRSession, frame: WebXRFrame, requestTrackings: IXRRequestImage[]): boolean;
|
|
19
19
|
getTrackedResult(session: WebXRSession, frame: WebXRFrame, requestTrackings: IXRRequestImage[], generateTracked: () => IXRTrackedImage): void;
|
|
20
20
|
onAddRequestTracking(requestTracking: IXRRequestImage): void;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_assembleOptions(options: XRSessionInit): Promise<void> | void;
|
|
21
25
|
private _requestTrackingScore;
|
|
22
26
|
private _updateTrackedImage;
|
|
23
27
|
}
|
|
@@ -11,6 +11,10 @@ export declare class WebXRPlaneTracking extends WebXRTrackableFeature<IWebXRTrac
|
|
|
11
11
|
checkAvailable(session: WebXRSession, frame: WebXRFrame, requestTrackings: IXRRequestPlane[]): boolean;
|
|
12
12
|
getTrackedResult(session: WebXRSession, frame: WebXRFrame, requestTrackings: IXRRequestPlane[], generateTracked: () => IWebXRTrackedPlane): void;
|
|
13
13
|
onAddRequestTracking(requestTracking: IXRRequestPlane): void;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
_assembleOptions(options: XRSessionInit): void;
|
|
14
18
|
private _updatePlane;
|
|
15
19
|
}
|
|
16
20
|
interface IWebXRTrackedPlane extends IXRTrackedPlane {
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { IXRRequestTracking, IXRTrackablePlatformFeature, IXRTracked } from "@galacean/engine-design";
|
|
2
|
+
import { WebXRFrame } from "../WebXRFrame";
|
|
3
|
+
import { WebXRSession } from "../WebXRSession";
|
|
4
|
+
import { WebXRFeature } from "./WebXRFeature";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class WebXRTrackableFeature<T extends IXRTracked, K extends IXRRequestTracking<T>> extends WebXRFeature implements IXRTrackablePlatformFeature<T, K> {
|
|
9
|
+
get canModifyRequestTrackingAfterInit(): boolean;
|
|
10
|
+
abstract getTrackedResult(session: WebXRSession, frame: WebXRFrame, requestTrackings: K[], generateTracked: () => T): void;
|
|
11
|
+
abstract checkAvailable(session: WebXRSession, frame: WebXRFrame, requestTrackings: K[]): boolean;
|
|
12
|
+
onAddRequestTracking(requestTracking: K): void;
|
|
13
|
+
onDelRequestTracking(requestTracking: K): void;
|
|
14
|
+
}
|
package/types/index.d.ts
CHANGED