@galacean/engine-design 1.1.0-beta.22 → 1.1.0-beta.24
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 +2 -2
- package/types/IProgress.d.ts +0 -15
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
- package/types/renderingHardwareInterface/IPlatformPrimitiveVertexBinding.d.ts +0 -4
- package/types/shader-lab/IRenderStateInfo.d.ts +0 -10
- package/types/shader-lab/interface.d.ts +0 -21
- package/types/xr/IXRDevice.d.ts +0 -27
- package/types/xr/IXRFrame.d.ts +0 -13
- package/types/xr/IXRInputEvent.d.ts +0 -17
- package/types/xr/IXRSession.d.ts +0 -81
- package/types/xr/feature/IXRFeature.d.ts +0 -54
- package/types/xr/feature/IXRFeatureConfig.d.ts +0 -7
- package/types/xr/feature/IXRFeatureDescriptor.d.ts +0 -7
- package/types/xr/feature/IXRFeatureManager.d.ts +0 -52
- package/types/xr/feature/IXRHitResult.d.ts +0 -17
- package/types/xr/feature/IXRMovementTracking.d.ts +0 -5
- package/types/xr/feature/IXRMovementTrackingConfig.d.ts +0 -8
- package/types/xr/feature/IXRMovementTrackingDescriptor.d.ts +0 -8
- package/types/xr/feature/IXRPlatformFeature.d.ts +0 -12
- package/types/xr/feature/trackable/IXRReferenceImage.d.ts +0 -13
- package/types/xr/feature/trackable/IXRRequestTracking.d.ts +0 -10
- package/types/xr/feature/trackable/IXRRequestTrackingAnchor.d.ts +0 -7
- package/types/xr/feature/trackable/IXRRequestTrackingImage.d.ts +0 -7
- package/types/xr/feature/trackable/IXRTrackable.d.ts +0 -14
- package/types/xr/feature/trackable/IXRTrackableFeature.d.ts +0 -40
- package/types/xr/feature/trackable/IXRTracked.d.ts +0 -12
- package/types/xr/feature/trackable/IXRTrackedAnchor.d.ts +0 -5
- package/types/xr/feature/trackable/IXRTrackedImage.d.ts +0 -6
- package/types/xr/feature/trackable/IXRTrackedPlane.d.ts +0 -6
- package/types/xr/feature/trackable/anchor/IXRAnchorTracking.d.ts +0 -5
- package/types/xr/feature/trackable/anchor/IXRAnchorTrackingConfig.d.ts +0 -9
- package/types/xr/feature/trackable/anchor/IXRAnchorTrackingDescriptor.d.ts +0 -9
- package/types/xr/feature/trackable/anchor/IXRRequestAnchorTracking.d.ts +0 -6
- package/types/xr/feature/trackable/image/IXRImageTracking.d.ts +0 -5
- package/types/xr/feature/trackable/image/IXRImageTrackingConfig.d.ts +0 -8
- package/types/xr/feature/trackable/image/IXRImageTrackingDescriptor.d.ts +0 -5
- package/types/xr/feature/trackable/image/IXRReferenceImage.d.ts +0 -9
- package/types/xr/feature/trackable/image/IXRRequestImageTracking.d.ts +0 -6
- package/types/xr/feature/trackable/image/IXRTrackedImage.d.ts +0 -5
- package/types/xr/feature/trackable/plane/IXRPlaneTracking.d.ts +0 -7
- package/types/xr/feature/trackable/plane/IXRPlaneTrackingConfig.d.ts +0 -8
- package/types/xr/feature/trackable/plane/IXRPlaneTrackingDescriptor.d.ts +0 -8
- package/types/xr/feature/trackable/plane/IXRRequestPlaneTracking.d.ts +0 -5
- package/types/xr/feature/trackable/plane/IXRTrackedPlane.d.ts +0 -11
- package/types/xr/feature/trackable/request/IXRRequestTracking.d.ts +0 -5
- package/types/xr/feature/trackable/request/IXRRequestTrackingAnchor.d.ts +0 -6
- package/types/xr/feature/trackable/request/IXRRequestTrackingImage.d.ts +0 -6
- package/types/xr/feature/trackable/request/IXRRequestTrackingPlane.d.ts +0 -5
- package/types/xr/feature/trackable/tracked/IXRTracked.d.ts +0 -14
- package/types/xr/feature/trackable/tracked/IXRTrackedAnchor.d.ts +0 -3
- package/types/xr/feature/trackable/tracked/IXRTrackedImage.d.ts +0 -4
- package/types/xr/feature/trackable/tracked/IXRTrackedPlane.d.ts +0 -6
- package/types/xr/index.d.ts +0 -29
- package/types/xr/input/IXRCamera.d.ts +0 -8
- package/types/xr/input/IXRController.d.ts +0 -10
- package/types/xr/input/IXRInput.d.ts +0 -9
- package/types/xr/input/IXRInputManager.d.ts +0 -10
- package/types/xr/input/IXRPose.d.ts +0 -10
- package/types/xr/session/IXRSessionDescriptor.d.ts +0 -10
- package/types/xr/session/IXRSessionManager.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-design",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.24",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"types": "types/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@galacean/engine-math": "1.1.0-beta.
|
|
17
|
+
"@galacean/engine-math": "1.1.0-beta.24"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"b:types": "tsc"
|
package/types/IProgress.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface IRenderStatePropertyItemInfo {
|
|
2
|
-
property: string;
|
|
3
|
-
value: any;
|
|
4
|
-
index?: number;
|
|
5
|
-
}
|
|
6
|
-
export interface IRenderStateInfo {
|
|
7
|
-
renderStateType: "BlendState" | "DepthState" | "StencilState" | "RasterState";
|
|
8
|
-
properties: Array<IRenderStatePropertyItemInfo>;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shader lab interface.
|
|
3
|
-
*/
|
|
4
|
-
export interface IShaderLab {
|
|
5
|
-
parseShader(shaderSource: string): IShaderInfo;
|
|
6
|
-
}
|
|
7
|
-
export interface IShaderInfo {
|
|
8
|
-
name: string;
|
|
9
|
-
subShaders: ISubShaderInfo[];
|
|
10
|
-
}
|
|
11
|
-
export interface ISubShaderInfo {
|
|
12
|
-
passes: IShaderPassInfo[];
|
|
13
|
-
tags?: Record<string, number | string | boolean>;
|
|
14
|
-
}
|
|
15
|
-
export interface IShaderPassInfo {
|
|
16
|
-
name: string;
|
|
17
|
-
vert: string;
|
|
18
|
-
frag: string;
|
|
19
|
-
tags?: Record<string, number | string | boolean>;
|
|
20
|
-
renderStates: Record<string, any>;
|
|
21
|
-
}
|
package/types/xr/IXRDevice.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { IHardwareRenderer } from "../renderingHardwareInterface";
|
|
2
|
-
import { IXRSession } from "./IXRSession";
|
|
3
|
-
import { IXRFeature } from "./feature/IXRFeature";
|
|
4
|
-
import { IXRPlatformFeature } from "./feature/IXRPlatformFeature";
|
|
5
|
-
/**
|
|
6
|
-
* The interface of XR device.
|
|
7
|
-
*/
|
|
8
|
-
export interface IXRDevice {
|
|
9
|
-
/**
|
|
10
|
-
* Whether the device is supported.
|
|
11
|
-
* @param mode - The mode of the session.
|
|
12
|
-
*/
|
|
13
|
-
isSupportedSessionMode(mode: number): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Get the platform feature instance of this device
|
|
16
|
-
* @param engine - The engine.
|
|
17
|
-
* @param type - The type of the feature.
|
|
18
|
-
*/
|
|
19
|
-
createFeature(type: number): IXRPlatformFeature;
|
|
20
|
-
/**
|
|
21
|
-
* Request a session.
|
|
22
|
-
* @param engine - The engine
|
|
23
|
-
* @param mode - The mode of the session
|
|
24
|
-
* @param requestFeatures - The requested features
|
|
25
|
-
*/
|
|
26
|
-
requestSession(rhi: IHardwareRenderer, mode: number, requestFeatures: IXRFeature[]): Promise<IXRSession>;
|
|
27
|
-
}
|
package/types/xr/IXRFrame.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IXRInput } from "./input/IXRInput";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface of XR frame.
|
|
4
|
-
* It can be understood as a snapshot of
|
|
5
|
-
* the information of each input in this frame.
|
|
6
|
-
*/
|
|
7
|
-
export interface IXRFrame {
|
|
8
|
-
/**
|
|
9
|
-
* Update xr input information.
|
|
10
|
-
* @param inputs - xr input
|
|
11
|
-
*/
|
|
12
|
-
updateInputs(inputs: IXRInput[]): void;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified XR input events.
|
|
3
|
-
*/
|
|
4
|
-
export interface IXRInputEvent {
|
|
5
|
-
/** Interaction type. */
|
|
6
|
-
targetRayMode: number;
|
|
7
|
-
/** Specific interactions. */
|
|
8
|
-
type: number;
|
|
9
|
-
/** Type of interactive input. */
|
|
10
|
-
input: number;
|
|
11
|
-
/** Touch id. (Meaningful when and only when targetRayMode is screen) */
|
|
12
|
-
id?: number;
|
|
13
|
-
/** X coordinate on screen. (Meaningful when and only when targetRayMode is screen) */
|
|
14
|
-
x?: number;
|
|
15
|
-
/** Y coordinate on screen. (Meaningful when and only when targetRayMode is screen) */
|
|
16
|
-
y?: number;
|
|
17
|
-
}
|
package/types/xr/IXRSession.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { IXRFrame } from "./IXRFrame";
|
|
2
|
-
import { IXRInputEvent } from "./IXRInputEvent";
|
|
3
|
-
/**
|
|
4
|
-
* The base interface of XR session.
|
|
5
|
-
* Can be understood as an XR context.
|
|
6
|
-
*/
|
|
7
|
-
export interface IXRSession {
|
|
8
|
-
/**
|
|
9
|
-
* Fixed foveation for XR.
|
|
10
|
-
*/
|
|
11
|
-
fixedFoveation: number;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the XR information of this frame.
|
|
14
|
-
*/
|
|
15
|
-
get frame(): IXRFrame;
|
|
16
|
-
/**
|
|
17
|
-
* Return the event received in this frame.
|
|
18
|
-
*/
|
|
19
|
-
get events(): IXRInputEvent[];
|
|
20
|
-
/**
|
|
21
|
-
* Returns the current frame rate.
|
|
22
|
-
*/
|
|
23
|
-
get frameRate(): number;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the frame rate supported by the device.
|
|
26
|
-
*/
|
|
27
|
-
get supportedFrameRates(): Float32Array;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the device's default main framebuffer.
|
|
30
|
-
*/
|
|
31
|
-
get framebuffer(): WebGLFramebuffer;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the width of the device's default main framebuffer.
|
|
34
|
-
*/
|
|
35
|
-
get framebufferWidth(): number;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the height of the device's default main framebuffer.
|
|
38
|
-
*/
|
|
39
|
-
get framebufferHeight(): number;
|
|
40
|
-
/**
|
|
41
|
-
* Add event listener for XR session.
|
|
42
|
-
*/
|
|
43
|
-
addEventListener(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Remove event listener for XR session.
|
|
46
|
-
*/
|
|
47
|
-
removeEventListener(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Reset event flow.
|
|
50
|
-
*/
|
|
51
|
-
resetEvents(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
54
|
-
* session has been start.
|
|
55
|
-
*/
|
|
56
|
-
start(): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
59
|
-
* session has been start.
|
|
60
|
-
*/
|
|
61
|
-
stop(): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
64
|
-
* session has been shut down.
|
|
65
|
-
*/
|
|
66
|
-
end(): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Schedules the specified method to be called the next time the user agent
|
|
69
|
-
* is working on rendering an animation frame for the WebXR device. Returns an
|
|
70
|
-
* integer value which can be used to identify the request for the purposes of
|
|
71
|
-
* canceling the callback using cancelAnimationFrame(). This method is comparable
|
|
72
|
-
* to the Window.requestAnimationFrame() method.
|
|
73
|
-
*/
|
|
74
|
-
requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
75
|
-
/**
|
|
76
|
-
* Removes a callback from the animation frame painting callback from
|
|
77
|
-
* XRSession's set of animation frame rendering callbacks, given the
|
|
78
|
-
* identifying handle returned by a previous call to requestAnimationFrame().
|
|
79
|
-
*/
|
|
80
|
-
cancelAnimationFrame(id: number): void;
|
|
81
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureConfig } from "./IXRFeatureConfig";
|
|
2
|
-
import { IXRPlatformFeature } from "./IXRPlatformFeature";
|
|
3
|
-
import { IXRSession } from "../IXRSession";
|
|
4
|
-
import { IXRFrame } from "../IXRFrame";
|
|
5
|
-
export interface IXRFeature {
|
|
6
|
-
/** @internal */
|
|
7
|
-
_platformFeature: IXRPlatformFeature;
|
|
8
|
-
/** Whether this feature enabled. */
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Returns whether the feature is supported.
|
|
12
|
-
*/
|
|
13
|
-
isSupported(): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Initialize the feature.
|
|
16
|
-
*/
|
|
17
|
-
initialize(): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Enable an instance of a feature.
|
|
20
|
-
*/
|
|
21
|
-
onEnable(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Disable an instance of a feature.
|
|
24
|
-
*/
|
|
25
|
-
onDisable(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Update an instance of a feature.
|
|
28
|
-
*/
|
|
29
|
-
onUpdate(session: IXRSession, frame: IXRFrame): void;
|
|
30
|
-
/**
|
|
31
|
-
* Destroy an instance of a feature.
|
|
32
|
-
*/
|
|
33
|
-
onDestroy(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Called when the session is initialized.
|
|
36
|
-
*/
|
|
37
|
-
onSessionInit(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Called when session starts.
|
|
40
|
-
*/
|
|
41
|
-
onSessionStart(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Called when the session is stopped.
|
|
44
|
-
*/
|
|
45
|
-
onSessionStop(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Called when the session is destroyed.
|
|
48
|
-
*/
|
|
49
|
-
onSessionDestroy(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Generate the config of the feature.
|
|
52
|
-
*/
|
|
53
|
-
_generateConfig(): IXRFeatureConfig;
|
|
54
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor } from "./IXRFeatureDescriptor";
|
|
2
|
-
import { IXRFeature } from "./IXRFeature";
|
|
3
|
-
import { IXRSession } from "../IXRSession";
|
|
4
|
-
import { IXRFrame } from "../IXRFrame";
|
|
5
|
-
export interface IXRFeatureManager {
|
|
6
|
-
_platformFeature: IXRFeature;
|
|
7
|
-
/** The descriptor of the feature. */
|
|
8
|
-
descriptor: IXRFeatureDescriptor;
|
|
9
|
-
/** Whether this feature enabled. */
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Returns whether the feature is supported.
|
|
13
|
-
* @param descriptor - The descriptor of the feature
|
|
14
|
-
*/
|
|
15
|
-
isSupported(descriptor?: IXRFeatureDescriptor): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Initialize the feature.
|
|
18
|
-
*/
|
|
19
|
-
initialize(): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Enable an instance of a feature.
|
|
22
|
-
*/
|
|
23
|
-
onEnable(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Disable an instance of a feature.
|
|
26
|
-
*/
|
|
27
|
-
onDisable(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Update an instance of a feature.
|
|
30
|
-
*/
|
|
31
|
-
onUpdate(session: IXRSession, frame: IXRFrame): void;
|
|
32
|
-
/**
|
|
33
|
-
* Destroy an instance of a feature.
|
|
34
|
-
*/
|
|
35
|
-
onDestroy(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Called when the session is initialized.
|
|
38
|
-
*/
|
|
39
|
-
onSessionInit(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Called when session starts.
|
|
42
|
-
*/
|
|
43
|
-
onSessionStart(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Called when the session is stopped.
|
|
46
|
-
*/
|
|
47
|
-
onSessionStop(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Called when the session is destroyed.
|
|
50
|
-
*/
|
|
51
|
-
onSessionDestroy(): void;
|
|
52
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
-
/**
|
|
3
|
-
* XR hit result.
|
|
4
|
-
* It is the detection result returned by using XR HitTest feature.
|
|
5
|
-
*/
|
|
6
|
-
export interface IXRHitResult {
|
|
7
|
-
/** The position of the hit point. */
|
|
8
|
-
point: Vector3;
|
|
9
|
-
/** The normal of the hit point. */
|
|
10
|
-
normal: Vector3;
|
|
11
|
-
/** The distance from the origin of the ray to the hit point. */
|
|
12
|
-
distance: number;
|
|
13
|
-
/** The id of the hit tracked object, such as the id of IXRTrackedPlane. */
|
|
14
|
-
trackableId: number;
|
|
15
|
-
/** The type of tracked object detected, such as TrackableType.Plane */
|
|
16
|
-
trackableType: number;
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureConfig } from "./IXRFeatureConfig";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface of the platform feature.
|
|
4
|
-
* Responsible for the implementation of specific features of different XR backends.
|
|
5
|
-
*/
|
|
6
|
-
export interface IXRPlatformFeature {
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether the feature is supported.
|
|
9
|
-
* @param descriptor - The descriptor of the feature
|
|
10
|
-
*/
|
|
11
|
-
isSupported(descriptor: IXRFeatureConfig): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An interface that defines a reference image.
|
|
3
|
-
*/
|
|
4
|
-
export interface IXRReferenceImage {
|
|
5
|
-
/** The name of the image. */
|
|
6
|
-
name: string;
|
|
7
|
-
/** The src of the image. */
|
|
8
|
-
src: string | HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | Blob | ImageData | ImageBitmap | OffscreenCanvas;
|
|
9
|
-
/** The width of the image in meters. */
|
|
10
|
-
physicalWidth: number;
|
|
11
|
-
/** The height of the image in meters. */
|
|
12
|
-
physicalHeight: number;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IXRTracked } from "./IXRTracked";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface for request tracking in XR.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRRequestTracking<T extends IXRTracked> {
|
|
6
|
-
/** The status of the current request tracking. */
|
|
7
|
-
state: number;
|
|
8
|
-
/** Tracked instances, make up from the tracking data returned by Session. */
|
|
9
|
-
tracked: T[];
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../input/IXRPose";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface of XR trackable.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRTrackable {
|
|
6
|
-
/** Id of the trackable. */
|
|
7
|
-
id: number;
|
|
8
|
-
/** The pose of the trackable. */
|
|
9
|
-
pose: IXRPose;
|
|
10
|
-
/** The tracking state of the trackable. */
|
|
11
|
-
state: number;
|
|
12
|
-
/** The modified frame count of the trackable. */
|
|
13
|
-
frameCount: number;
|
|
14
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { IXRPlatformFeature } from "../IXRPlatformFeature";
|
|
2
|
-
import { IXRTracked } from "./IXRTracked";
|
|
3
|
-
import { IXRSession } from "../../IXRSession";
|
|
4
|
-
import { IXRFrame } from "../../IXRFrame";
|
|
5
|
-
import { IXRRequestTracking } from "./IXRRequestTracking";
|
|
6
|
-
export interface IXRTrackableFeature<TXRTracked extends IXRTracked, TXRRequestTracking extends IXRRequestTracking<TXRTracked>> extends IXRPlatformFeature {
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether request tracking can be modified after initialization.
|
|
9
|
-
*/
|
|
10
|
-
get canModifyRequestTrackingAfterInit(): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Initialize the feature.
|
|
13
|
-
* @param descriptor - The descriptor of the feature
|
|
14
|
-
*/
|
|
15
|
-
initialize(requestTrackings: TXRRequestTracking[]): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Get the tracked result.
|
|
18
|
-
* @param session - The XR session
|
|
19
|
-
* @param frame - The XR frame
|
|
20
|
-
* @param requestTrackings - The request trackings
|
|
21
|
-
*/
|
|
22
|
-
getTrackedResult(session: IXRSession, frame: IXRFrame, requestTrackings: TXRRequestTracking[]): void;
|
|
23
|
-
/**
|
|
24
|
-
* Check if the feature is available.
|
|
25
|
-
* @param session - The XR session
|
|
26
|
-
* @param frame - The XR frame
|
|
27
|
-
* @param requestTrackings - The request trackings
|
|
28
|
-
*/
|
|
29
|
-
checkAvailable(session: IXRSession, frame: IXRFrame, requestTrackings: TXRRequestTracking[]): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Called when request tracking is added.
|
|
32
|
-
* @param requestTracking - The request tracking
|
|
33
|
-
*/
|
|
34
|
-
onAddRequestTracking?(requestTracking: TXRRequestTracking): void;
|
|
35
|
-
/**
|
|
36
|
-
* Called when request tracking is removed.
|
|
37
|
-
* @param requestTracking - The request tracking
|
|
38
|
-
*/
|
|
39
|
-
onDeleteRequestTracking?(requestTracking: TXRRequestTracking): void;
|
|
40
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../input/IXRPose";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface of XR trackable.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRTracked {
|
|
6
|
-
/** The unique id of the trackable. */
|
|
7
|
-
id: number;
|
|
8
|
-
/** The pose of the trackable. */
|
|
9
|
-
pose: IXRPose;
|
|
10
|
-
/** The tracking state of the trackable. */
|
|
11
|
-
state: number;
|
|
12
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IXRRequestAnchorTracking } from "./IXRRequestAnchorTracking";
|
|
2
|
-
import { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
3
|
-
import { IXRTracked } from "../IXRTracked";
|
|
4
|
-
export interface IXRAnchorTracking extends IXRTrackableFeature<IXRTracked, IXRRequestAnchorTracking> {
|
|
5
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureConfig } from "../../IXRFeatureConfig";
|
|
2
|
-
import { IXRPose } from "../../../input/IXRPose";
|
|
3
|
-
/**
|
|
4
|
-
* The config of XR anchor tracking.
|
|
5
|
-
*/
|
|
6
|
-
export interface IXRAnchorTrackingConfig extends IXRFeatureConfig {
|
|
7
|
-
/** Request tracking anchor. */
|
|
8
|
-
anchors: IXRPose[];
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor } from "../../IXRFeatureDescriptor";
|
|
2
|
-
import { IXRPose } from "../../../input/IXRPose";
|
|
3
|
-
/**
|
|
4
|
-
* The descriptor of XR anchor tracking.
|
|
5
|
-
*/
|
|
6
|
-
export interface IXRAnchorTrackingDescriptor extends IXRFeatureDescriptor {
|
|
7
|
-
/** Request tracking anchor. */
|
|
8
|
-
anchors?: IXRPose[];
|
|
9
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IXRRequestImageTracking } from "./IXRRequestImageTracking";
|
|
2
|
-
import { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
3
|
-
import { IXRTrackedImage } from "./IXRTrackedImage";
|
|
4
|
-
export interface IXRImageTracking extends IXRTrackableFeature<IXRTrackedImage, IXRRequestImageTracking> {
|
|
5
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureConfig } from "../../IXRFeatureConfig";
|
|
2
|
-
import { IXRReferenceImage } from "./IXRReferenceImage";
|
|
3
|
-
/**
|
|
4
|
-
* The config of XR image tracking.
|
|
5
|
-
*/
|
|
6
|
-
export interface IXRImageTrackingConfig extends IXRFeatureConfig {
|
|
7
|
-
images: IXRReferenceImage[];
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A reference image is an image to look for in the physical environment.
|
|
3
|
-
*/
|
|
4
|
-
export interface IXRReferenceImage {
|
|
5
|
-
name: string;
|
|
6
|
-
src: string | HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | Blob | ImageData | ImageBitmap | OffscreenCanvas;
|
|
7
|
-
physicalWidth: number;
|
|
8
|
-
physicalHeight: number;
|
|
9
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IXRRequestTracking } from "../IXRRequestTracking";
|
|
2
|
-
import { IXRReferenceImage } from "./IXRReferenceImage";
|
|
3
|
-
import { IXRTrackedImage } from "./IXRTrackedImage";
|
|
4
|
-
export interface IXRRequestImageTracking extends IXRRequestTracking<IXRTrackedImage> {
|
|
5
|
-
image: IXRReferenceImage;
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IXRRequestPlaneTracking } from "./IXRRequestPlaneTracking";
|
|
2
|
-
import { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
3
|
-
import { IXRTrackedPlane } from "./IXRTrackedPlane";
|
|
4
|
-
export interface IXRPlaneTracking extends IXRTrackableFeature<IXRTrackedPlane, IXRRequestPlaneTracking> {
|
|
5
|
-
get detectionMode(): number;
|
|
6
|
-
set detectionMode(mode: number);
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { IXRTracked } from "../IXRTracked";
|
|
3
|
-
export interface IXRTrackedPlane extends IXRTracked {
|
|
4
|
-
/** Whether the detected plane is horizontal or vertical. */
|
|
5
|
-
planeMode: number;
|
|
6
|
-
/** The points that make up this plane.
|
|
7
|
-
* Note: These points are in the plane coordinate system,
|
|
8
|
-
* and their Y coordinates are all zero.
|
|
9
|
-
*/
|
|
10
|
-
polygon: Vector3[];
|
|
11
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../../input/IXRPose";
|
|
2
|
-
import { IXRTrackedAnchor } from "../tracked/IXRTrackedAnchor";
|
|
3
|
-
import { IXRRequestTracking } from "./IXRRequestTracking";
|
|
4
|
-
export interface IXRRequestTrackingAnchor extends IXRRequestTracking<IXRTrackedAnchor> {
|
|
5
|
-
pose: IXRPose;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IXRReferenceImage } from "../IXRReferenceImage";
|
|
2
|
-
import { IXRTrackedImage } from "../tracked/IXRTrackedImage";
|
|
3
|
-
import { IXRRequestTracking } from "./IXRRequestTracking";
|
|
4
|
-
export interface IXRRequestTrackingImage extends IXRRequestTracking<IXRTrackedImage> {
|
|
5
|
-
image: IXRReferenceImage;
|
|
6
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../../input/IXRPose";
|
|
2
|
-
/**
|
|
3
|
-
* The base interface of XR trackable.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRTracked {
|
|
6
|
-
/** Id of the trackable. */
|
|
7
|
-
id: number;
|
|
8
|
-
/** The pose of the trackable. */
|
|
9
|
-
pose: IXRPose;
|
|
10
|
-
/** The tracking state of the trackable. */
|
|
11
|
-
state: number;
|
|
12
|
-
/** The modified frame count of the trackable. */
|
|
13
|
-
frameCount: number;
|
|
14
|
-
}
|
package/types/xr/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type { IXRPlatformFeature } from "./feature/IXRPlatformFeature";
|
|
2
|
-
export type { IXRFeature } from "./feature/IXRFeature";
|
|
3
|
-
export type { IXRFeatureConfig } from "./feature/IXRFeatureConfig";
|
|
4
|
-
export type { IXRMovementTracking } from "./feature/IXRMovementTracking";
|
|
5
|
-
export type { IXRHitResult } from "./feature/IXRHitResult";
|
|
6
|
-
export type { IXRTrackableFeature } from "./feature/trackable/IXRTrackableFeature";
|
|
7
|
-
export type { IXRInputEvent } from "./IXRInputEvent";
|
|
8
|
-
export type { IXRInput } from "./input/IXRInput";
|
|
9
|
-
export type { IXRPose } from "./input/IXRPose";
|
|
10
|
-
export type { IXRController } from "./input/IXRController";
|
|
11
|
-
export type { IXRCamera } from "./input/IXRCamera";
|
|
12
|
-
export type { IXRRequestTracking } from "./feature/trackable/IXRRequestTracking";
|
|
13
|
-
export type { IXRTracked } from "./feature/trackable/IXRTracked";
|
|
14
|
-
export type { IXRImageTrackingConfig } from "./feature/trackable/image/IXRImageTrackingConfig";
|
|
15
|
-
export type { IXRTrackedImage } from "./feature/trackable/image/IXRTrackedImage";
|
|
16
|
-
export type { IXRImageTracking } from "./feature/trackable/image/IXRImageTracking";
|
|
17
|
-
export type { IXRRequestImageTracking } from "./feature/trackable/image/IXRRequestImageTracking";
|
|
18
|
-
export type { IXRReferenceImage } from "./feature/trackable/image/IXRReferenceImage";
|
|
19
|
-
export type { IXRPlaneTrackingConfig } from "./feature/trackable/plane/IXRPlaneTrackingConfig";
|
|
20
|
-
export type { IXRTrackedPlane } from "./feature/trackable/plane/IXRTrackedPlane";
|
|
21
|
-
export type { IXRPlaneTracking } from "./feature/trackable/plane/IXRPlaneTracking";
|
|
22
|
-
export type { IXRRequestPlaneTracking } from "./feature/trackable/plane/IXRRequestPlaneTracking";
|
|
23
|
-
export type { IXRAnchorTrackingConfig } from "./feature/trackable/anchor/IXRAnchorTrackingConfig";
|
|
24
|
-
export type { IXRAnchorTracking } from "./feature/trackable/anchor/IXRAnchorTracking";
|
|
25
|
-
export type { IXRRequestAnchorTracking } from "./feature/trackable/anchor/IXRRequestAnchorTracking";
|
|
26
|
-
export type { IXRMovementTrackingConfig } from "./feature/IXRMovementTrackingConfig";
|
|
27
|
-
export type { IXRDevice } from "./IXRDevice";
|
|
28
|
-
export type { IXRFrame } from "./IXRFrame";
|
|
29
|
-
export type { IXRSession } from "./IXRSession";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Matrix, Rect } from "@galacean/engine-math";
|
|
2
|
-
import { IXRInput } from "./IXRInput";
|
|
3
|
-
export interface IXRCamera extends IXRInput {
|
|
4
|
-
/** The viewport of the camera. */
|
|
5
|
-
viewport: Rect;
|
|
6
|
-
/** The projection matrix of the camera. */
|
|
7
|
-
projectionMatrix: Matrix;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IXRInput } from "./IXRInput";
|
|
2
|
-
import { IXRPose } from "./IXRPose";
|
|
3
|
-
export interface IXRController extends IXRInput {
|
|
4
|
-
/** the pose mode of the controller. (Default is Grip) */
|
|
5
|
-
poseMode: number;
|
|
6
|
-
/** The grip space pose of the controller. */
|
|
7
|
-
gripPose: IXRPose;
|
|
8
|
-
/** The target ray space pose of the controller. */
|
|
9
|
-
targetRayPose: IXRPose;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IXRInput } from "./IXRInput";
|
|
2
|
-
export interface IXRInputManager {
|
|
3
|
-
getInput(inputSource: number): IXRInput;
|
|
4
|
-
_onSessionInit(): void;
|
|
5
|
-
_onSessionStart(): void;
|
|
6
|
-
_onSessionStop(): void;
|
|
7
|
-
_onSessionDestroy(): void;
|
|
8
|
-
_onUpdate(): void;
|
|
9
|
-
_onDestroy(): void;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
/**
|
|
3
|
-
* Data interface for describing gestures in the XR world.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRPose {
|
|
6
|
-
position: Vector3;
|
|
7
|
-
rotation: Quaternion;
|
|
8
|
-
matrix?: Matrix;
|
|
9
|
-
inverseMatrix?: Matrix;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureConfig } from "../feature/IXRFeatureConfig";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for XR session descriptors
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRSessionDescriptor {
|
|
6
|
-
/** The type of XR session. */
|
|
7
|
-
mode: number;
|
|
8
|
-
/** Requested features. */
|
|
9
|
-
requestFeatures: IXRFeatureConfig[];
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor } from "../feature/IXRFeatureDescriptor";
|
|
2
|
-
export interface IXRSessionManager {
|
|
3
|
-
initialize(mode: number, requestFeatures: IXRFeatureDescriptor[]): Promise<void>;
|
|
4
|
-
start(): Promise<void>;
|
|
5
|
-
stop(): Promise<void>;
|
|
6
|
-
destroy(): Promise<void>;
|
|
7
|
-
}
|