@galacean/engine-design 1.2.0-beta.5 → 1.2.0-beta.7
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/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/feature/IXRFeature.d.ts +0 -39
- 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/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 -40
- 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 -8
- 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/IXRRequestImageTracking.d.ts +0 -6
- 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/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/input/IXRPose.d.ts +0 -14
- 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.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.7",
|
|
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.2.0-beta.
|
|
17
|
+
"@galacean/engine-math": "1.2.0-beta.7"
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { IXRPlatformFeature } from "./IXRPlatformFeature";
|
|
2
|
-
export interface IXRFeature {
|
|
3
|
-
/** @internal */
|
|
4
|
-
_platformFeature: IXRPlatformFeature;
|
|
5
|
-
/** Whether this feature enabled. */
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
_onEnable(): void;
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
_onDisable(): void;
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
_onUpdate(): void;
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
_onDestroy(): void;
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
_onSessionInit(): void;
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
_onSessionStart(): void;
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
_onSessionStop(): void;
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
_onSessionExit(): void;
|
|
39
|
-
}
|
|
@@ -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,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,40 +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 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,5 +0,0 @@
|
|
|
1
|
-
import { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
2
|
-
import { IXRTracked } from "../IXRTracked";
|
|
3
|
-
import { IXRRequestAnchorTracking } from "./IXRRequestAnchorTracking";
|
|
4
|
-
export interface IXRAnchorTracking extends IXRTrackableFeature<IXRTracked, IXRRequestAnchorTracking> {
|
|
5
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../../IXRPose";
|
|
2
|
-
import { IXRFeatureConfig } from "../../IXRFeatureConfig";
|
|
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,8 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "../../../IXRPose";
|
|
2
|
-
import { IXRRequestTracking } from "../IXRRequestTracking";
|
|
3
|
-
import { IXRTracked } from "../IXRTracked";
|
|
4
|
-
export interface IXRRequestAnchorTracking extends IXRRequestTracking<IXRTracked> {
|
|
5
|
-
anchor: {
|
|
6
|
-
pose: IXRPose;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
2
|
-
import { IXRRequestImageTracking } from "./IXRRequestImageTracking";
|
|
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,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 { IXRTrackableFeature } from "../IXRTrackableFeature";
|
|
2
|
-
import { IXRRequestPlaneTracking } from "./IXRRequestPlaneTracking";
|
|
3
|
-
import { IXRTrackedPlane } from "./IXRTrackedPlane";
|
|
4
|
-
export interface IXRPlaneTracking extends IXRTrackableFeature<IXRTrackedPlane, IXRRequestPlaneTracking> {
|
|
5
|
-
get detectionMode(): number;
|
|
6
|
-
set detectionMode(mode: number);
|
|
7
|
-
}
|
|
@@ -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,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
|
-
}
|
|
@@ -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
|
-
}
|