@galacean/engine-design 0.0.0-experimental-1.4-small-language.4 → 0.0.0-experimental-backup.3
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/IClone.d.ts +0 -15
- package/types/index.d.ts +0 -6
- package/types/input/IInputOptions.d.ts +0 -21
- package/types/input/index.d.ts +0 -1
- package/types/physics/ICharacterController.d.ts +0 -44
- package/types/physics/ICollider.d.ts +0 -20
- package/types/physics/ICollision.d.ts +0 -36
- package/types/physics/IDynamicCollider.d.ts +0 -148
- package/types/physics/IPhysics.d.ts +0 -108
- package/types/physics/IPhysicsManager.d.ts +0 -5
- package/types/physics/IPhysicsMaterial.d.ts +0 -34
- package/types/physics/IPhysicsScene.d.ts +0 -51
- package/types/physics/IStaticCollider.d.ts +0 -19
- package/types/physics/index.d.ts +0 -11
- package/types/physics/joints/IFixedJoint.d.ts +0 -3
- package/types/physics/joints/IHingeJoint.d.ts +0 -55
- package/types/physics/joints/IJoint.d.ts +0 -53
- package/types/physics/joints/ISpringJoint.d.ts +0 -31
- package/types/physics/joints/index.d.ts +0 -4
- package/types/physics/shape/IBoxColliderShape.d.ts +0 -12
- package/types/physics/shape/ICapsuleColliderShape.d.ts +0 -21
- package/types/physics/shape/IColliderShape.d.ts +0 -48
- package/types/physics/shape/IPlaneColliderShape.d.ts +0 -6
- package/types/physics/shape/ISphereColliderShape.d.ts +0 -11
- package/types/physics/shape/index.d.ts +0 -5
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
- package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +0 -4
- package/types/renderingHardwareInterface/index.d.ts +0 -2
- package/types/shader-lab/IShaderLab.d.ts +0 -18
- package/types/shader-lab/IShaderProgramSource.d.ts +0 -4
- package/types/shader-lab/index.d.ts +0 -8
- package/types/shader-lab/shaderContent/IRenderStates.d.ts +0 -4
- package/types/shader-lab/shaderContent/IShaderContent.d.ts +0 -9
- package/types/shader-lab/shaderContent/IShaderPassContent.d.ts +0 -11
- package/types/shader-lab/shaderContent/IShaderPosition.d.ts +0 -3
- package/types/shader-lab/shaderContent/IStatement.d.ts +0 -8
- package/types/shader-lab/shaderContent/ISubShaderContent.d.ts +0 -10
- package/types/xr/IXRDevice.d.ts +0 -31
- package/types/xr/IXRFrame.d.ts +0 -13
- package/types/xr/IXRInputEvent.d.ts +0 -17
- package/types/xr/IXRPose.d.ts +0 -14
- package/types/xr/IXRSession.d.ts +0 -91
- package/types/xr/feature/IXRPlatformFeature.d.ts +0 -6
- package/types/xr/feature/trackable/IXRRequestTracking.d.ts +0 -10
- package/types/xr/feature/trackable/IXRTrackablePlatformFeature.d.ts +0 -35
- package/types/xr/feature/trackable/IXRTracked.d.ts +0 -12
- package/types/xr/feature/trackable/anchor/IXRRequestAnchor.d.ts +0 -7
- package/types/xr/feature/trackable/image/IXRReferenceImage.d.ts +0 -8
- package/types/xr/feature/trackable/image/IXRRequestImage.d.ts +0 -6
- package/types/xr/feature/trackable/image/IXRTrackedImage.d.ts +0 -8
- package/types/xr/feature/trackable/plane/IXRRequestPlane.d.ts +0 -5
- package/types/xr/feature/trackable/plane/IXRTrackedPlane.d.ts +0 -16
- package/types/xr/index.d.ts +0 -18
- package/types/xr/input/IXRCamera.d.ts +0 -11
- package/types/xr/input/IXRController.d.ts +0 -8
- package/types/xr/input/IXRInput.d.ts +0 -6
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IJoint } from "./IJoint";
|
|
2
|
-
/**
|
|
3
|
-
* a joint that maintains an upper or lower bound (or both) on the distance between two points on different objects
|
|
4
|
-
*/
|
|
5
|
-
export interface ISpringJoint extends IJoint {
|
|
6
|
-
/**
|
|
7
|
-
* Set the allowed minimum distance for the joint.
|
|
8
|
-
* @param distance the minimum distance
|
|
9
|
-
*/
|
|
10
|
-
setMinDistance(distance: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Set the allowed maximum distance for the joint.
|
|
13
|
-
* @param distance the maximum distance
|
|
14
|
-
*/
|
|
15
|
-
setMaxDistance(distance: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set the error tolerance of the joint.
|
|
18
|
-
* @param tolerance the distance beyond the allowed range at which the joint becomes active
|
|
19
|
-
*/
|
|
20
|
-
setTolerance(tolerance: number): void;
|
|
21
|
-
/**
|
|
22
|
-
* Set the strength of the joint spring.
|
|
23
|
-
* @param stiffness the spring strength of the joint
|
|
24
|
-
*/
|
|
25
|
-
setStiffness(stiffness: number): void;
|
|
26
|
-
/**
|
|
27
|
-
* Set the damping of the joint spring.
|
|
28
|
-
* @param damping the degree of damping of the joint spring of the joint
|
|
29
|
-
*/
|
|
30
|
-
setDamping(damping: number): void;
|
|
31
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IColliderShape } from "./IColliderShape";
|
|
2
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
-
/**
|
|
4
|
-
* Interface of physics box collider shape.
|
|
5
|
-
*/
|
|
6
|
-
export interface IBoxColliderShape extends IColliderShape {
|
|
7
|
-
/**
|
|
8
|
-
* Set size of Box Shape.
|
|
9
|
-
* @param size - The size
|
|
10
|
-
*/
|
|
11
|
-
setSize(size: Vector3): void;
|
|
12
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { IColliderShape } from "./IColliderShape";
|
|
2
|
-
/**
|
|
3
|
-
* Interface of physics capsule collider shape.
|
|
4
|
-
*/
|
|
5
|
-
export interface ICapsuleColliderShape extends IColliderShape {
|
|
6
|
-
/**
|
|
7
|
-
* Set radius of capsule.
|
|
8
|
-
* @param radius - The radius
|
|
9
|
-
*/
|
|
10
|
-
setRadius(radius: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Set height of capsule.
|
|
13
|
-
* @param height - The height
|
|
14
|
-
*/
|
|
15
|
-
setHeight(height: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set up axis of capsule.
|
|
18
|
-
* @param upAxis - The up axis
|
|
19
|
-
*/
|
|
20
|
-
setUpAxis(upAxis: number): void;
|
|
21
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
-
import { IPhysicsMaterial } from "../IPhysicsMaterial";
|
|
3
|
-
/**
|
|
4
|
-
* Interface for physics collider shape.
|
|
5
|
-
*/
|
|
6
|
-
export interface IColliderShape {
|
|
7
|
-
/**
|
|
8
|
-
* Set local rotation.
|
|
9
|
-
* @param rotation - The local rotation
|
|
10
|
-
*/
|
|
11
|
-
setRotation(rotation: Vector3): void;
|
|
12
|
-
/**
|
|
13
|
-
* Set local position.
|
|
14
|
-
* @param position - The local position
|
|
15
|
-
*/
|
|
16
|
-
setPosition(position: Vector3): void;
|
|
17
|
-
/**
|
|
18
|
-
* Set world scale of shape.
|
|
19
|
-
* @param scale - The scale
|
|
20
|
-
*/
|
|
21
|
-
setWorldScale(scale: Vector3): void;
|
|
22
|
-
/**
|
|
23
|
-
* Sets the contact offset.
|
|
24
|
-
* @param offset - contact offset
|
|
25
|
-
*/
|
|
26
|
-
setContactOffset(offset: number): void;
|
|
27
|
-
/**
|
|
28
|
-
* Set physics material on shape.
|
|
29
|
-
* @param material - The physics material
|
|
30
|
-
*/
|
|
31
|
-
setMaterial(material: IPhysicsMaterial): void;
|
|
32
|
-
/**
|
|
33
|
-
* Set trigger or not.
|
|
34
|
-
* @param value - True for TriggerShape, false for SimulationShape
|
|
35
|
-
*/
|
|
36
|
-
setIsTrigger(value: boolean): void;
|
|
37
|
-
/**
|
|
38
|
-
* Get the distance between a point and the shape.
|
|
39
|
-
* @param point - Location in world space you want to find the closest point to
|
|
40
|
-
* @returns The x, y, and z components of the Vector4 represent the closest point on the shape in world space,
|
|
41
|
-
* and the w component represents the distance between the point and the shape
|
|
42
|
-
*/
|
|
43
|
-
pointDistance(point: Vector3): Vector4;
|
|
44
|
-
/**
|
|
45
|
-
* Decrements the reference count of a shape and releases it if the new reference count is zero.
|
|
46
|
-
*/
|
|
47
|
-
destroy(): void;
|
|
48
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IColliderShape } from "./IColliderShape";
|
|
2
|
-
/**
|
|
3
|
-
* Interface of physics sphere collider shape.
|
|
4
|
-
*/
|
|
5
|
-
export interface ISphereColliderShape extends IColliderShape {
|
|
6
|
-
/**
|
|
7
|
-
* Set radius of sphere.
|
|
8
|
-
* @param radius - The radius
|
|
9
|
-
*/
|
|
10
|
-
setRadius(radius: number): void;
|
|
11
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type { IColliderShape } from "./IColliderShape";
|
|
2
|
-
export type { IBoxColliderShape } from "./IBoxColliderShape";
|
|
3
|
-
export type { ICapsuleColliderShape } from "./ICapsuleColliderShape";
|
|
4
|
-
export type { ISphereColliderShape } from "./ISphereColliderShape";
|
|
5
|
-
export type { IPlaneColliderShape } from "./IPlaneColliderShape";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IShaderProgramSource } from "./IShaderProgramSource";
|
|
2
|
-
import { IShaderContent } from "./shaderContent/IShaderContent";
|
|
3
|
-
/**
|
|
4
|
-
* Shader lab interface.
|
|
5
|
-
*/
|
|
6
|
-
export interface IShaderLab {
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
* Parse shader source to get the structure of shader.
|
|
10
|
-
*/
|
|
11
|
-
_parseShaderContent(shaderSource: string): IShaderContent;
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
* Parse shader pass source code.
|
|
15
|
-
* @param basePathForIncludeKey the base path to resolve the relative path of `#include` directive. Must follow the specifications of [URL.origin](https://developer.mozilla.org/en-US/docs/Web/API/URL/origin), like: `shaders://root/`
|
|
16
|
-
*/
|
|
17
|
-
_parseShaderPass(shaderPassSource: string, vertexEntry: string, fragmentEntry: string, macros: any[], backend: number, platformMacros: string[], basePathForIncludeKey: string): IShaderProgramSource;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type { IShaderProgramSource as IShaderInfo } from "./IShaderProgramSource";
|
|
2
|
-
export type { IShaderLab } from "./IShaderLab";
|
|
3
|
-
export type { IShaderContent } from "./shaderContent/IShaderContent";
|
|
4
|
-
export { IStatement } from "./shaderContent/IStatement";
|
|
5
|
-
export { ISubShaderContent } from "./shaderContent/ISubShaderContent";
|
|
6
|
-
export { IShaderPassContent } from "./shaderContent/IShaderPassContent";
|
|
7
|
-
export { IShaderPosition } from "./shaderContent/IShaderPosition";
|
|
8
|
-
export { IRenderStates } from "./shaderContent/IRenderStates";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IRenderStates } from "./IRenderStates";
|
|
2
|
-
import { IStatement } from "./IStatement";
|
|
3
|
-
import { ISubShaderContent } from "./ISubShaderContent";
|
|
4
|
-
export interface IShaderContent {
|
|
5
|
-
name: string;
|
|
6
|
-
subShaders: ISubShaderContent[];
|
|
7
|
-
globalContents: IStatement[];
|
|
8
|
-
renderStates: IRenderStates;
|
|
9
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IRenderStates } from "./IRenderStates";
|
|
2
|
-
export interface IShaderPassContent {
|
|
3
|
-
name: string;
|
|
4
|
-
isUsePass: boolean;
|
|
5
|
-
tags?: Record<string, number | string | boolean>;
|
|
6
|
-
renderStates: IRenderStates;
|
|
7
|
-
/** ShaderLab code source. */
|
|
8
|
-
contents: string;
|
|
9
|
-
vertexEntry: string;
|
|
10
|
-
fragmentEntry: string;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IShaderPassContent } from "./IShaderPassContent";
|
|
2
|
-
import { IRenderStates } from "./IRenderStates";
|
|
3
|
-
import { IStatement } from "./IStatement";
|
|
4
|
-
export interface ISubShaderContent {
|
|
5
|
-
name: string;
|
|
6
|
-
passes: IShaderPassContent[];
|
|
7
|
-
globalContents: IStatement[];
|
|
8
|
-
tags?: Record<string, number | string | boolean>;
|
|
9
|
-
renderStates: IRenderStates;
|
|
10
|
-
}
|
package/types/xr/IXRDevice.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IHardwareRenderer } from "../renderingHardwareInterface";
|
|
2
|
-
import { IXRSession } from "./IXRSession";
|
|
3
|
-
import { IXRPlatformFeature } from "./feature/IXRPlatformFeature";
|
|
4
|
-
/**
|
|
5
|
-
* The interface of XR device.
|
|
6
|
-
*/
|
|
7
|
-
export interface IXRDevice {
|
|
8
|
-
/**
|
|
9
|
-
* Check if the specified session mode is supported.
|
|
10
|
-
* @param mode - The mode of the session.
|
|
11
|
-
*/
|
|
12
|
-
isSupportedSessionMode(mode: number): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Check if the specified feature is supported.
|
|
15
|
-
* @param mode - The type of the feature.
|
|
16
|
-
*/
|
|
17
|
-
isSupportedFeature(type: number): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Get the platform feature instance of this device
|
|
20
|
-
* @param engine - The engine.
|
|
21
|
-
* @param type - The type of the feature.
|
|
22
|
-
*/
|
|
23
|
-
createPlatformFeature(type: number, ...args: any[]): IXRPlatformFeature;
|
|
24
|
-
/**
|
|
25
|
-
* Request a session.
|
|
26
|
-
* @param engine - The engine
|
|
27
|
-
* @param mode - The mode of the session
|
|
28
|
-
* @param platformFeatures - The requested platform features
|
|
29
|
-
*/
|
|
30
|
-
requestSession(rhi: IHardwareRenderer, mode: number, platformFeatures: IXRPlatformFeature[]): Promise<IXRSession>;
|
|
31
|
-
}
|
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/IXRPose.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
/**
|
|
3
|
-
* Data interface for describing gestures in the XR space.
|
|
4
|
-
*/
|
|
5
|
-
export interface IXRPose {
|
|
6
|
-
/** The position of the pose in XR space. */
|
|
7
|
-
position: Vector3;
|
|
8
|
-
/** The rotation of the pose in XR space. */
|
|
9
|
-
rotation: Quaternion;
|
|
10
|
-
/** The matrix of the pose in XR space. */
|
|
11
|
-
matrix?: Matrix;
|
|
12
|
-
/** The inverse matrix of the pose in XR space. */
|
|
13
|
-
inverseMatrix?: Matrix;
|
|
14
|
-
}
|
package/types/xr/IXRSession.d.ts
DELETED
|
@@ -1,91 +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
|
-
* Returns the XR information of this frame.
|
|
10
|
-
*/
|
|
11
|
-
get frame(): IXRFrame;
|
|
12
|
-
/**
|
|
13
|
-
* Return the event received in this frame.
|
|
14
|
-
*/
|
|
15
|
-
get events(): IXRInputEvent[];
|
|
16
|
-
/**
|
|
17
|
-
* Returns the current frame rate.
|
|
18
|
-
*/
|
|
19
|
-
get frameRate(): number;
|
|
20
|
-
/**
|
|
21
|
-
* Returns the frame rate supported by the device.
|
|
22
|
-
*/
|
|
23
|
-
get supportedFrameRates(): Float32Array;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the device's default main framebuffer.
|
|
26
|
-
*/
|
|
27
|
-
get framebuffer(): WebGLFramebuffer;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the width of the device's default main framebuffer.
|
|
30
|
-
*/
|
|
31
|
-
get framebufferWidth(): number;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the height of the device's default main framebuffer.
|
|
34
|
-
*/
|
|
35
|
-
get framebufferHeight(): number;
|
|
36
|
-
/**
|
|
37
|
-
* Set fixed foveation for camera.
|
|
38
|
-
* @param value - The fixed foveation value
|
|
39
|
-
*/
|
|
40
|
-
setFixedFoveation(value: number): any;
|
|
41
|
-
/**
|
|
42
|
-
* Return fixed foveation of camera.
|
|
43
|
-
*/
|
|
44
|
-
getFixedFoveation(): number;
|
|
45
|
-
/**
|
|
46
|
-
* Add event listener for XR session.
|
|
47
|
-
*/
|
|
48
|
-
addEventListener(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Remove event listener for XR session.
|
|
51
|
-
*/
|
|
52
|
-
removeEventListener(): void;
|
|
53
|
-
/**
|
|
54
|
-
* Add exit listener for XR session.
|
|
55
|
-
* @param sessionExitCallBack - The exit listener
|
|
56
|
-
*/
|
|
57
|
-
setSessionExitCallBack(sessionExitCallBack: () => void): void;
|
|
58
|
-
/**
|
|
59
|
-
* Reset event flow.
|
|
60
|
-
*/
|
|
61
|
-
resetEvents(): void;
|
|
62
|
-
/**
|
|
63
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
64
|
-
* session has been start.
|
|
65
|
-
*/
|
|
66
|
-
start(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
69
|
-
* session has been start.
|
|
70
|
-
*/
|
|
71
|
-
stop(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Ends the xr session. Returns a promise which resolves when the
|
|
74
|
-
* session has been shut down.
|
|
75
|
-
*/
|
|
76
|
-
end(): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Schedules the specified method to be called the next time the user agent
|
|
79
|
-
* is working on rendering an animation frame for the WebXR device. Returns an
|
|
80
|
-
* integer value which can be used to identify the request for the purposes of
|
|
81
|
-
* canceling the callback using cancelAnimationFrame(). This method is comparable
|
|
82
|
-
* to the Window.requestAnimationFrame() method.
|
|
83
|
-
*/
|
|
84
|
-
requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
85
|
-
/**
|
|
86
|
-
* Removes a callback from the animation frame painting callback from
|
|
87
|
-
* XRSession's set of animation frame rendering callbacks, given the
|
|
88
|
-
* identifying handle returned by a previous call to requestAnimationFrame().
|
|
89
|
-
*/
|
|
90
|
-
cancelAnimationFrame(id: number): void;
|
|
91
|
-
}
|
|
@@ -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,35 +0,0 @@
|
|
|
1
|
-
import { IXRFrame } from "../../IXRFrame";
|
|
2
|
-
import { IXRSession } from "../../IXRSession";
|
|
3
|
-
import { IXRPlatformFeature } from "../IXRPlatformFeature";
|
|
4
|
-
import { IXRRequestTracking } from "./IXRRequestTracking";
|
|
5
|
-
import { IXRTracked } from "./IXRTracked";
|
|
6
|
-
export interface IXRTrackablePlatformFeature<T extends IXRTracked, K extends IXRRequestTracking<T>> extends IXRPlatformFeature {
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether request tracking can be modified after initialization.
|
|
9
|
-
*/
|
|
10
|
-
get canModifyRequestTrackingAfterInit(): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Get the tracked result.
|
|
13
|
-
* @param session - The XR session
|
|
14
|
-
* @param frame - The XR frame
|
|
15
|
-
* @param requestTrackings - The request trackings
|
|
16
|
-
*/
|
|
17
|
-
getTrackedResult(session: IXRSession, frame: IXRFrame, requestTrackings: K[], generateTracked: () => T): void;
|
|
18
|
-
/**
|
|
19
|
-
* Check if the feature is available.
|
|
20
|
-
* @param session - The XR session
|
|
21
|
-
* @param frame - The XR frame
|
|
22
|
-
* @param requestTrackings - The request trackings
|
|
23
|
-
*/
|
|
24
|
-
checkAvailable(session: IXRSession, frame: IXRFrame, requestTrackings: K[]): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Called when request tracking is added.
|
|
27
|
-
* @param requestTracking - The request tracking
|
|
28
|
-
*/
|
|
29
|
-
onAddRequestTracking(requestTracking: K): void;
|
|
30
|
-
/**
|
|
31
|
-
* Called when request tracking is removed.
|
|
32
|
-
* @param requestTracking - The request tracking
|
|
33
|
-
*/
|
|
34
|
-
onDelRequestTracking(requestTracking: K): void;
|
|
35
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../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 in XR space. */
|
|
9
|
-
pose: IXRPose;
|
|
10
|
-
/** The tracking state of the trackable. */
|
|
11
|
-
state: number;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { IXRRequestTracking } from "../IXRRequestTracking";
|
|
3
|
-
import { IXRTracked } from "../IXRTracked";
|
|
4
|
-
export interface IXRRequestAnchor extends IXRRequestTracking<IXRTracked> {
|
|
5
|
-
position: Vector3;
|
|
6
|
-
rotation: Quaternion;
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IXRRequestTracking } from "../IXRRequestTracking";
|
|
2
|
-
import { IXRReferenceImage } from "./IXRReferenceImage";
|
|
3
|
-
import { IXRTrackedImage } from "./IXRTrackedImage";
|
|
4
|
-
export interface IXRRequestImage extends IXRRequestTracking<IXRTrackedImage> {
|
|
5
|
-
image: IXRReferenceImage;
|
|
6
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IXRTracked } from "../IXRTracked";
|
|
2
|
-
import { IXRReferenceImage } from "./IXRReferenceImage";
|
|
3
|
-
export interface IXRTrackedImage extends IXRTracked {
|
|
4
|
-
/** The reference image which was used to detect this image in the environment. */
|
|
5
|
-
referenceImage: IXRReferenceImage;
|
|
6
|
-
/** The width of the image in meters in the physical world. */
|
|
7
|
-
measuredPhysicalWidth: number;
|
|
8
|
-
}
|
|
@@ -1,16 +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
|
-
/**
|
|
12
|
-
* Whether this frame changes the attributes of the plane.
|
|
13
|
-
* Note: Includes `polygon` but no `pose`.
|
|
14
|
-
*/
|
|
15
|
-
attributesDirty: boolean;
|
|
16
|
-
}
|
package/types/xr/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type { IXRPlatformFeature } from "./feature/IXRPlatformFeature";
|
|
2
|
-
export type { IXRTrackablePlatformFeature } from "./feature/trackable/IXRTrackablePlatformFeature";
|
|
3
|
-
export type { IXRInputEvent } from "./IXRInputEvent";
|
|
4
|
-
export type { IXRPose } from "./IXRPose";
|
|
5
|
-
export type { IXRCamera } from "./input/IXRCamera";
|
|
6
|
-
export type { IXRController } from "./input/IXRController";
|
|
7
|
-
export type { IXRInput } from "./input/IXRInput";
|
|
8
|
-
export type { IXRRequestTracking } from "./feature/trackable/IXRRequestTracking";
|
|
9
|
-
export type { IXRTracked } from "./feature/trackable/IXRTracked";
|
|
10
|
-
export type { IXRRequestAnchor } from "./feature/trackable/anchor/IXRRequestAnchor";
|
|
11
|
-
export type { IXRReferenceImage } from "./feature/trackable/image/IXRReferenceImage";
|
|
12
|
-
export type { IXRRequestImage } from "./feature/trackable/image/IXRRequestImage";
|
|
13
|
-
export type { IXRTrackedImage } from "./feature/trackable/image/IXRTrackedImage";
|
|
14
|
-
export type { IXRRequestPlane } from "./feature/trackable/plane/IXRRequestPlane";
|
|
15
|
-
export type { IXRTrackedPlane } from "./feature/trackable/plane/IXRTrackedPlane";
|
|
16
|
-
export type { IXRDevice } from "./IXRDevice";
|
|
17
|
-
export type { IXRFrame } from "./IXRFrame";
|
|
18
|
-
export type { IXRSession } from "./IXRSession";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Matrix, Rect } from "@galacean/engine-math";
|
|
2
|
-
import { IXRInput } from "./IXRInput";
|
|
3
|
-
import { IXRPose } from "../IXRPose";
|
|
4
|
-
export interface IXRCamera extends IXRInput {
|
|
5
|
-
/** The pose of the camera in XR space. */
|
|
6
|
-
pose: IXRPose;
|
|
7
|
-
/** The viewport of the camera. */
|
|
8
|
-
viewport: Rect;
|
|
9
|
-
/** The projection matrix of the camera. */
|
|
10
|
-
projectionMatrix: Matrix;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IXRInput } from "./IXRInput";
|
|
2
|
-
import { IXRPose } from "../IXRPose";
|
|
3
|
-
export interface IXRController extends IXRInput {
|
|
4
|
-
/** The grip space pose of the controller in XR space. */
|
|
5
|
-
gripPose: IXRPose;
|
|
6
|
-
/** The target ray space pose of the controller in XR space. */
|
|
7
|
-
targetRayPose: IXRPose;
|
|
8
|
-
}
|