@galacean/engine-design 1.1.0-beta.20 → 1.1.0-beta.21
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/shaderLab/index.d.ts +2 -0
- package/types/shaderLab/interface.d.ts +54 -0
- package/types/xr/IXRFrame.d.ts +0 -9
- package/types/xr/IXRInputEvent.d.ts +5 -12
- package/types/xr/IXRSession.d.ts +0 -37
- package/types/xr/feature/IXRFeatureManager.d.ts +3 -5
- package/types/xr/feature/IXRPlatformFeature.d.ts +30 -0
- package/types/xr/index.d.ts +1 -12
- package/types/xr/session/IXRSessionDescriptor.d.ts +0 -5
- 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/feature/IXRFeature.d.ts +0 -12
- package/types/xr/feature/IXRMovementTracking.d.ts +0 -5
- package/types/xr/feature/trackable/IXRReferenceImage.d.ts +0 -13
- 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 -16
- 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/IXRRequestAnchorTracking.d.ts +0 -6
- package/types/xr/feature/trackable/image/IXRImageTracking.d.ts +0 -5
- package/types/xr/feature/trackable/image/IXRRequestImageTracking.d.ts +0 -5
- 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/IXRRequestPlaneTracking.d.ts +0 -4
- 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/input/IXRInputManager.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.21",
|
|
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.21"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"b:types": "tsc"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AstNode } from "./astNode";
|
|
2
|
+
import { IAstInfo, IPositionRange, IShaderAstContent } from "./astNode/types";
|
|
3
|
+
export type DiagnosticSeverity = number;
|
|
4
|
+
/**
|
|
5
|
+
* Shader lab interface
|
|
6
|
+
*/
|
|
7
|
+
export interface IShaderLab {
|
|
8
|
+
/** */
|
|
9
|
+
initialize(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* parse galacean shader
|
|
12
|
+
*/
|
|
13
|
+
parseShader(shaderCode: string): IShaderInfo;
|
|
14
|
+
}
|
|
15
|
+
export interface IDiagnostic {
|
|
16
|
+
severity: DiagnosticSeverity;
|
|
17
|
+
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* The token which caused the parser error.
|
|
20
|
+
*/
|
|
21
|
+
token: IPositionRange;
|
|
22
|
+
}
|
|
23
|
+
export interface IShaderMainFunction {
|
|
24
|
+
type: "vert" | "frag";
|
|
25
|
+
functionAst: IAstInfo;
|
|
26
|
+
}
|
|
27
|
+
interface IReference {
|
|
28
|
+
referenced: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IGlobal extends IReference {
|
|
31
|
+
ast: AstNode;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IShaderInfo {
|
|
35
|
+
ast: AstNode<IShaderAstContent>;
|
|
36
|
+
name: string;
|
|
37
|
+
subShaders: Array<ISubShader>;
|
|
38
|
+
editorProperties: Record<string, any>;
|
|
39
|
+
diagnostics: Array<IDiagnostic>;
|
|
40
|
+
}
|
|
41
|
+
export interface ISubShader {
|
|
42
|
+
name: string;
|
|
43
|
+
passes: Array<IShaderPass>;
|
|
44
|
+
tags?: Record<string, any>;
|
|
45
|
+
}
|
|
46
|
+
export interface IShaderPass {
|
|
47
|
+
name: string;
|
|
48
|
+
vert: string;
|
|
49
|
+
frag: string;
|
|
50
|
+
tags?: Record<string, any>;
|
|
51
|
+
renderStates: IRenderState;
|
|
52
|
+
}
|
|
53
|
+
export declare type IRenderState = Record<string, any>;
|
|
54
|
+
export {};
|
package/types/xr/IXRFrame.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
export interface IXRFrame {
|
|
8
|
-
/**
|
|
9
|
-
* Update xr input information.
|
|
10
|
-
* @param inputs - xr input
|
|
11
|
-
*/
|
|
12
3
|
updateInputs(inputs: IXRInput[]): void;
|
|
13
4
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface IXRInputEvent {
|
|
5
|
-
/** Interaction type. */
|
|
6
|
-
targetRayMode: number;
|
|
7
|
-
/** Specific interactions. */
|
|
8
|
-
type: number;
|
|
9
|
-
/** Type of interactive input. */
|
|
1
|
+
export declare class IXRInputEvent {
|
|
2
|
+
targetRayMode: "gaze" | "tracked-pointer" | "screen";
|
|
3
|
+
type: "select" | "selectend" | "selectstart" | "squeeze" | "squeezeend" | "squeezestart";
|
|
10
4
|
input: number;
|
|
11
|
-
/** Touch id. (Meaningful when and only when targetRayMode is screen) */
|
|
12
5
|
id?: number;
|
|
13
|
-
/**
|
|
6
|
+
/** normalized */
|
|
14
7
|
x?: number;
|
|
15
|
-
/**
|
|
8
|
+
/** normalized */
|
|
16
9
|
y?: number;
|
|
17
10
|
}
|
package/types/xr/IXRSession.d.ts
CHANGED
|
@@ -1,53 +1,16 @@
|
|
|
1
1
|
import { IXRFrame } from "./IXRFrame";
|
|
2
2
|
import { IXRInputEvent } from "./IXRInputEvent";
|
|
3
|
-
/**
|
|
4
|
-
* The base interface of XR session.
|
|
5
|
-
* Can be understood as an XR context.
|
|
6
|
-
*/
|
|
7
3
|
export interface IXRSession {
|
|
8
|
-
/**
|
|
9
|
-
* Fixed foveation for XR.
|
|
10
|
-
*/
|
|
11
4
|
fixedFoveation: number;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the XR information of this frame.
|
|
14
|
-
*/
|
|
15
5
|
get frame(): IXRFrame;
|
|
16
|
-
/**
|
|
17
|
-
* Return the event received in this frame.
|
|
18
|
-
*/
|
|
19
6
|
get events(): IXRInputEvent[];
|
|
20
|
-
/**
|
|
21
|
-
* Returns the current frame rate.
|
|
22
|
-
*/
|
|
23
7
|
get frameRate(): number;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the frame rate supported by the device.
|
|
26
|
-
*/
|
|
27
8
|
get supportedFrameRates(): Float32Array;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the device's default main framebuffer.
|
|
30
|
-
*/
|
|
31
9
|
get framebuffer(): WebGLFramebuffer;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the width of the device's default main framebuffer.
|
|
34
|
-
*/
|
|
35
10
|
get framebufferWidth(): number;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the height of the device's default main framebuffer.
|
|
38
|
-
*/
|
|
39
11
|
get framebufferHeight(): number;
|
|
40
|
-
/**
|
|
41
|
-
* Add event listener for XR session.
|
|
42
|
-
*/
|
|
43
12
|
addEventListener(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Remove event listener for XR session.
|
|
46
|
-
*/
|
|
47
13
|
removeEventListener(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Reset event flow.
|
|
50
|
-
*/
|
|
51
14
|
resetEvents(): void;
|
|
52
15
|
/**
|
|
53
16
|
* Ends the xr session. Returns a promise which resolves when the
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IXRFeatureDescriptor } from "./IXRFeatureDescriptor";
|
|
2
|
-
import {
|
|
3
|
-
import { IXRSession } from "../IXRSession";
|
|
4
|
-
import { IXRFrame } from "../IXRFrame";
|
|
2
|
+
import { IXRPlatformFeature } from "./IXRPlatformFeature";
|
|
5
3
|
export interface IXRFeatureManager {
|
|
6
|
-
|
|
4
|
+
_platformFeature: IXRPlatformFeature;
|
|
7
5
|
/** The descriptor of the feature. */
|
|
8
6
|
descriptor: IXRFeatureDescriptor;
|
|
9
7
|
/** Whether this feature enabled. */
|
|
@@ -28,7 +26,7 @@ export interface IXRFeatureManager {
|
|
|
28
26
|
/**
|
|
29
27
|
* Update an instance of a feature.
|
|
30
28
|
*/
|
|
31
|
-
onUpdate(
|
|
29
|
+
onUpdate(): void;
|
|
32
30
|
/**
|
|
33
31
|
* Destroy an instance of a feature.
|
|
34
32
|
*/
|
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
import { IXRFeatureDescriptor } from "./IXRFeatureDescriptor";
|
|
2
|
+
/**
|
|
3
|
+
* The base interface of the platform feature.
|
|
4
|
+
* Responsible for the implementation of specific features of different XR backends.
|
|
5
|
+
*/
|
|
2
6
|
export interface IXRPlatformFeature {
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the feature is supported.
|
|
9
|
+
* @param descriptor - The descriptor of the feature
|
|
10
|
+
*/
|
|
3
11
|
_isSupported(descriptor: IXRFeatureDescriptor): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Initialize the feature.
|
|
14
|
+
* @param descriptor - The descriptor of the feature
|
|
15
|
+
*/
|
|
4
16
|
_initialize(descriptor: IXRFeatureDescriptor): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Called when the XR frame is updated.
|
|
19
|
+
*/
|
|
5
20
|
_onUpdate(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Called when the XR module is destroyed.
|
|
23
|
+
*/
|
|
6
24
|
_onDestroy(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Called when the session is initialized.
|
|
27
|
+
*/
|
|
7
28
|
_onSessionInit(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Called when session starts.
|
|
31
|
+
*/
|
|
8
32
|
_onSessionStart(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Called when the session is stopped.
|
|
35
|
+
*/
|
|
9
36
|
_onSessionStop(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Called when the session is destroyed.
|
|
39
|
+
*/
|
|
10
40
|
_onSessionDestroy(): void;
|
|
11
41
|
}
|
package/types/xr/index.d.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { IXRPlatformFeature } from "./feature/IXRPlatformFeature";
|
|
2
2
|
export type { IXRFeatureManager } from "./feature/IXRFeatureManager";
|
|
3
3
|
export type { IXRFeatureDescriptor } from "./feature/IXRFeatureDescriptor";
|
|
4
|
-
export type { IXRMovementTracking } from "./feature/IXRMovementTracking";
|
|
5
4
|
export type { IXRHitResult } from "./feature/IXRHitResult";
|
|
6
|
-
export type { IXRTrackableFeature } from "./feature/trackable/IXRTrackableFeature";
|
|
7
|
-
export type { IXRDevice } from "./IXRDevice";
|
|
8
5
|
export type { IXRInput } from "./input/IXRInput";
|
|
9
6
|
export type { IXRPose } from "./input/IXRPose";
|
|
10
7
|
export type { IXRRequestTracking } from "./feature/trackable/IXRRequestTracking";
|
|
11
8
|
export type { IXRTracked } from "./feature/trackable/IXRTracked";
|
|
12
|
-
export type { IXRTrackedImage } from "./feature/trackable/image/IXRTrackedImage";
|
|
13
|
-
export type { IXRImageTracking } from "./feature/trackable/image/IXRImageTracking";
|
|
14
|
-
export type { IXRRequestImageTracking } from "./feature/trackable/image/IXRRequestImageTracking";
|
|
15
|
-
export type { IXRTrackedPlane } from "./feature/trackable/plane/IXRTrackedPlane";
|
|
16
|
-
export type { IXRPlaneTracking } from "./feature/trackable/plane/IXRPlaneTracking";
|
|
17
|
-
export type { IXRRequestPlaneTracking } from "./feature/trackable/plane/IXRRequestPlaneTracking";
|
|
18
|
-
export type { IXRAnchorTracking } from "./feature/trackable/anchor/IXRAnchorTracking";
|
|
19
|
-
export type { IXRRequestAnchorTracking } from "./feature/trackable/anchor/IXRRequestAnchorTracking";
|
|
20
9
|
export type { IXRFrame } from "./IXRFrame";
|
|
21
10
|
export type { IXRSession } from "./IXRSession";
|
|
22
11
|
export type { IXRInputEvent } from "./IXRInputEvent";
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { IXRFeatureDescriptor } from "../feature/IXRFeatureDescriptor";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for XR session descriptors
|
|
4
|
-
*/
|
|
5
2
|
export interface IXRSessionDescriptor {
|
|
6
|
-
/** The type of XR session. */
|
|
7
3
|
mode: number;
|
|
8
|
-
/** Requested features. */
|
|
9
4
|
requestFeatures: IXRFeatureDescriptor[];
|
|
10
5
|
}
|
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 { IXRFeatureDescriptor } from "./feature/IXRFeatureDescriptor";
|
|
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
|
-
isSupported(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): IXRFeature;
|
|
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: IXRFeatureDescriptor[]): Promise<IXRSession>;
|
|
27
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor } from "./IXRFeatureDescriptor";
|
|
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 IXRFeature {
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether the feature is supported.
|
|
9
|
-
* @param descriptor - The descriptor of the feature
|
|
10
|
-
*/
|
|
11
|
-
isSupported(descriptor: IXRFeatureDescriptor): 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,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,16 +0,0 @@
|
|
|
1
|
-
import { IXRFeature } from "../IXRFeature";
|
|
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 IXRFeature {
|
|
7
|
-
/**
|
|
8
|
-
* Initialize the feature.
|
|
9
|
-
* @param descriptor - The descriptor of the feature
|
|
10
|
-
*/
|
|
11
|
-
initialize(requestTrackings: TXRRequestTracking[]): Promise<void>;
|
|
12
|
-
getTrackedResult(session: IXRSession, frame: IXRFrame, requestTrackings: TXRRequestTracking[]): void;
|
|
13
|
-
checkAvailable(session: IXRSession, frame: IXRFrame, requestTrackings: TXRRequestTracking[]): boolean;
|
|
14
|
-
addRequestTracking?(requestTracking: TXRRequestTracking): void;
|
|
15
|
-
delRequestTracking?(requestTracking: TXRRequestTracking): void;
|
|
16
|
-
}
|
|
@@ -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,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,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
|
-
orientation: 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
|
-
}
|
|
@@ -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,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
|
-
}
|