@galacean/engine-core 1.2.0-alpha.8 → 1.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +10245 -9942
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +10245 -9942
- package/dist/module.js +10245 -9942
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +36 -2
- package/types/Deprecated.d.ts +101 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +6 -31
- package/types/RenderPipeline/RenderQueue.d.ts +1 -2
- package/types/RenderPipeline/index.d.ts +0 -1
- package/types/Renderer.d.ts +4 -1
- package/types/animation/AnimatorLayerMask.d.ts +1 -1
- package/types/enums/Downsampling.d.ts +11 -0
- package/types/enums/MSAASamples.d.ts +13 -0
- package/types/index.d.ts +2 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +2 -0
- package/types/physics/HitResult.d.ts +3 -0
- package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +2 -2
- package/types/shader/state/DepthState.d.ts +2 -2
- package/types/shaderlib/ShaderFactory.d.ts +1 -0
- package/types/texture/RenderTarget.d.ts +5 -4
- package/types/texture/Texture.d.ts +1 -0
- package/types/texture/enums/PixelFormat.d.ts +73 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +11 -9
- package/types/texture/enums/TextureFormat.d.ts +30 -26
- package/types/RenderPipeline/MeshRenderData.d.ts +0 -17
- package/types/physics/PhysicsManager.d.ts +0 -78
- package/types/xr/XRPose.d.ts +0 -15
- package/types/xr/feature/XRFeature.d.ts +0 -16
- package/types/xr/feature/XRFeatureManager.d.ts +0 -65
- package/types/xr/feature/XRFeatureType.d.ts +0 -13
- package/types/xr/feature/camera/XRCameraManager.d.ts +0 -26
- package/types/xr/feature/hitTest/TrackableType.d.ts +0 -10
- package/types/xr/feature/hitTest/XRHitResult.d.ts +0 -19
- package/types/xr/feature/hitTest/XRHitTest.d.ts +0 -39
- package/types/xr/feature/hitTest/XRHitTestManager.d.ts +0 -38
- package/types/xr/feature/hitTest/XRHitTestType.d.ts +0 -16
- package/types/xr/feature/movementTracking/XRMovementTracking.d.ts +0 -18
- package/types/xr/feature/movementTracking/XRMovementTrackingManager.d.ts +0 -10
- package/types/xr/feature/movementTracking/XRMovementTrackingMode.d.ts +0 -5
- package/types/xr/feature/trackable/XRRequestTrackingState.d.ts +0 -11
- package/types/xr/feature/trackable/XRTrackableFeature.d.ts +0 -38
- package/types/xr/feature/trackable/XRTrackableManager.d.ts +0 -41
- package/types/xr/feature/trackable/anchor/XRAnchor.d.ts +0 -6
- package/types/xr/feature/trackable/anchor/XRAnchorTracking.d.ts +0 -37
- package/types/xr/feature/trackable/anchor/XRAnchorTrackingManager.d.ts +0 -20
- package/types/xr/feature/trackable/anchor/XRRequestAnchor.d.ts +0 -15
- package/types/xr/feature/trackable/image/XRImageTracking.d.ts +0 -24
- package/types/xr/feature/trackable/image/XRImageTrackingManager.d.ts +0 -31
- package/types/xr/feature/trackable/image/XRReferenceImage.d.ts +0 -11
- package/types/xr/feature/trackable/image/XRRequestImage.d.ts +0 -13
- package/types/xr/feature/trackable/image/XRTrackedImage.d.ts +0 -8
- package/types/xr/feature/trackable/plane/XRPlaneMode.d.ts +0 -13
- package/types/xr/feature/trackable/plane/XRPlaneTracking.d.ts +0 -23
- package/types/xr/feature/trackable/plane/XRPlaneTrackingManager.d.ts +0 -11
- package/types/xr/feature/trackable/plane/XRRequestPlane.d.ts +0 -12
- package/types/xr/feature/trackable/plane/XRTrackedPlane.d.ts +0 -20
- package/types/xr/index.d.ts +0 -25
- package/types/xr/input/XRCamera.d.ts +0 -15
- package/types/xr/input/XRController.d.ts +0 -38
- package/types/xr/input/XRControllerPoseMode.d.ts +0 -9
- package/types/xr/input/XRInput.d.ts +0 -8
- package/types/xr/input/XRInputButton.d.ts +0 -19
- package/types/xr/input/XRInputEvent.d.ts +0 -24
- package/types/xr/input/XRInputEventType.d.ts +0 -11
- package/types/xr/input/XRInputManager.d.ts +0 -31
- package/types/xr/input/XRInputType.d.ts +0 -23
- package/types/xr/input/XRTargetRayMode.d.ts +0 -12
- package/types/xr/input/XRTrackedInputDevice.d.ts +0 -21
- package/types/xr/input/XRTrackedUpdateFlag.d.ts +0 -11
- package/types/xr/input/XRTrackingState.d.ts +0 -11
- package/types/xr/session/XRSessionManager.d.ts +0 -45
- package/types/xr/session/XRSessionMode.d.ts +0 -8
- package/types/xr/session/XRSessionState.d.ts +0 -13
- /package/types/{xr/feature/trackable/XRRequestTracking.d.ts → BasicResources.d.ts} +0 -0
- /package/types/{xr/feature/trackable/XRTracked.d.ts → RenderPipeline/OpaqueTexturePass.d.ts} +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "../graphic/Mesh";
|
|
2
|
-
import { SubMesh } from "../graphic/SubMesh";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { Renderer } from "../Renderer";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
import { RenderData } from "./RenderData";
|
|
7
|
-
/**
|
|
8
|
-
* Render element.
|
|
9
|
-
*/
|
|
10
|
-
export declare class MeshRenderData extends RenderData implements IPoolElement {
|
|
11
|
-
/** Mesh. */
|
|
12
|
-
mesh: Mesh;
|
|
13
|
-
/** Sub mesh. */
|
|
14
|
-
subMesh: SubMesh;
|
|
15
|
-
set(component: Renderer, material: Material, mesh: Mesh, subMesh: SubMesh): void;
|
|
16
|
-
dispose(): void;
|
|
17
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Ray, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { Engine } from "../Engine";
|
|
3
|
-
import { Layer } from "../Layer";
|
|
4
|
-
import { HitResult } from "./HitResult";
|
|
5
|
-
/**
|
|
6
|
-
* A physics manager is a collection of colliders and constraints which can interact.
|
|
7
|
-
*/
|
|
8
|
-
export declare class PhysicsManager {
|
|
9
|
-
private static _collision;
|
|
10
|
-
private _engine;
|
|
11
|
-
private _restTime;
|
|
12
|
-
private _fixedTimeStep;
|
|
13
|
-
private _colliders;
|
|
14
|
-
private _gravity;
|
|
15
|
-
private _nativePhysicsManager;
|
|
16
|
-
private _physicalObjectsMap;
|
|
17
|
-
private _onContactEnter;
|
|
18
|
-
private _onContactExit;
|
|
19
|
-
private _onContactStay;
|
|
20
|
-
private _onTriggerEnter;
|
|
21
|
-
private _onTriggerExit;
|
|
22
|
-
private _onTriggerStay;
|
|
23
|
-
/**
|
|
24
|
-
* The gravity of physics scene.
|
|
25
|
-
*/
|
|
26
|
-
get gravity(): Vector3;
|
|
27
|
-
set gravity(value: Vector3);
|
|
28
|
-
/** The fixed time step in seconds at which physics are performed. */
|
|
29
|
-
get fixedTimeStep(): number;
|
|
30
|
-
set fixedTimeStep(value: number);
|
|
31
|
-
constructor(engine: Engine);
|
|
32
|
-
/**
|
|
33
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
34
|
-
* @param ray - The ray
|
|
35
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
36
|
-
*/
|
|
37
|
-
raycast(ray: Ray): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
40
|
-
* @param ray - The ray
|
|
41
|
-
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
42
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
43
|
-
*/
|
|
44
|
-
raycast(ray: Ray, outHitResult: HitResult): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
47
|
-
* @param ray - The ray
|
|
48
|
-
* @param distance - The max distance the ray should check
|
|
49
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
50
|
-
*/
|
|
51
|
-
raycast(ray: Ray, distance: number): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
54
|
-
* @param ray - The ray
|
|
55
|
-
* @param distance - The max distance the ray should check
|
|
56
|
-
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
57
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
58
|
-
*/
|
|
59
|
-
raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
62
|
-
* @param ray - The ray
|
|
63
|
-
* @param distance - The max distance the ray should check
|
|
64
|
-
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
65
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
66
|
-
*/
|
|
67
|
-
raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Casts a ray through the Scene and returns the first hit.
|
|
70
|
-
* @param ray - The ray
|
|
71
|
-
* @param distance - The max distance the ray should check
|
|
72
|
-
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
73
|
-
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
74
|
-
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
75
|
-
*/
|
|
76
|
-
raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
|
|
77
|
-
private _setGravity;
|
|
78
|
-
}
|
package/types/xr/XRPose.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IXRPose } from "@galacean/engine-design";
|
|
2
|
-
import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
|
|
3
|
-
/**
|
|
4
|
-
* Data for describing pose in the XR space.
|
|
5
|
-
*/
|
|
6
|
-
export declare class XRPose implements IXRPose {
|
|
7
|
-
/** The position of the pose in XR space. */
|
|
8
|
-
position: Vector3;
|
|
9
|
-
/** The rotation of the pose in XR space. */
|
|
10
|
-
rotation: Quaternion;
|
|
11
|
-
/** The matrix of the pose in XR space. */
|
|
12
|
-
matrix: Matrix;
|
|
13
|
-
/** The inverse matrix of the pose in XR space. */
|
|
14
|
-
inverseMatrix: Matrix;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IXRPlatformFeature } from "@galacean/engine-design";
|
|
2
|
-
import { XRManager } from "../XRManager";
|
|
3
|
-
import { XRFeatureType } from "./XRFeatureType";
|
|
4
|
-
/**
|
|
5
|
-
* The base class of XR feature manager.
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class XRFeature<T extends IXRPlatformFeature = IXRPlatformFeature> {
|
|
8
|
-
protected _xrManager: XRManager;
|
|
9
|
-
protected _type: XRFeatureType;
|
|
10
|
-
protected _enabled: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Returns whether the feature is enabled.
|
|
13
|
-
*/
|
|
14
|
-
get enabled(): boolean;
|
|
15
|
-
set enabled(value: boolean);
|
|
16
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor, IXRFeatureManager, IXRFeature, IXRSession, IXRFrame } from "@galacean/engine-design";
|
|
2
|
-
import { Engine } from "../../Engine";
|
|
3
|
-
/**
|
|
4
|
-
* The base class of XR feature manager.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class XRFeatureManager<TDescriptor extends IXRFeatureDescriptor = IXRFeatureDescriptor, TFeature extends IXRFeature = IXRFeature> implements IXRFeatureManager {
|
|
7
|
-
protected _engine: Engine;
|
|
8
|
-
_platformFeature: TFeature;
|
|
9
|
-
protected _descriptor: TDescriptor;
|
|
10
|
-
protected _enabled: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Return the descriptor of the feature.
|
|
13
|
-
*/
|
|
14
|
-
get descriptor(): TDescriptor;
|
|
15
|
-
set descriptor(value: TDescriptor);
|
|
16
|
-
/**
|
|
17
|
-
* Returns whether the feature is enabled.
|
|
18
|
-
*/
|
|
19
|
-
get enabled(): boolean;
|
|
20
|
-
set enabled(value: boolean);
|
|
21
|
-
/**
|
|
22
|
-
* Returns whether the feature is supported.
|
|
23
|
-
* @param descriptor - The descriptor of the feature
|
|
24
|
-
* @returns The promise of the feature
|
|
25
|
-
*/
|
|
26
|
-
isSupported(descriptor?: IXRFeatureDescriptor): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Initialize the feature.
|
|
29
|
-
* @returns The promise of the feature
|
|
30
|
-
*/
|
|
31
|
-
initialize(): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Called when be enabled.
|
|
34
|
-
*/
|
|
35
|
-
onEnable(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Called when be disabled.
|
|
38
|
-
*/
|
|
39
|
-
onDisable(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Called when xr frame is updated.
|
|
42
|
-
*/
|
|
43
|
-
onUpdate(session: IXRSession, frame: IXRFrame): void;
|
|
44
|
-
/**
|
|
45
|
-
* Called when the session is initialized.
|
|
46
|
-
*/
|
|
47
|
-
onSessionInit(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Called when session starts.
|
|
50
|
-
*/
|
|
51
|
-
onSessionStart(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Called when the session is stopped.
|
|
54
|
-
*/
|
|
55
|
-
onSessionStop(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Called when the session is destroyed.
|
|
58
|
-
*/
|
|
59
|
-
onSessionDestroy(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Called when the xr module is destroyed.
|
|
62
|
-
*/
|
|
63
|
-
onDestroy(): void;
|
|
64
|
-
constructor(_engine: Engine);
|
|
65
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../../Camera";
|
|
2
|
-
import { XRTrackedInputDevice } from "../../input/XRTrackedInputDevice";
|
|
3
|
-
/**
|
|
4
|
-
* The manager of XR camera.
|
|
5
|
-
*/
|
|
6
|
-
export declare class XRCameraManager {
|
|
7
|
-
private _xrManager;
|
|
8
|
-
/**
|
|
9
|
-
* The fixed foveation of the camera.
|
|
10
|
-
*/
|
|
11
|
-
get fixedFoveation(): number;
|
|
12
|
-
set fixedFoveation(value: number);
|
|
13
|
-
/**
|
|
14
|
-
* Attach the camera to the specified input type(Camera, LeftCamera or RightCamera).
|
|
15
|
-
* The camera entity need to be moved to the XROrigin entity.
|
|
16
|
-
* @param type - The input type
|
|
17
|
-
* @param camera - The camera to be attached
|
|
18
|
-
*/
|
|
19
|
-
attachCamera(type: XRTrackedInputDevice.Camera | XRTrackedInputDevice.LeftCamera | XRTrackedInputDevice.RightCamera, camera: Camera): void;
|
|
20
|
-
/**
|
|
21
|
-
* Detach the camera from the specified input type.
|
|
22
|
-
* @param type - The input type
|
|
23
|
-
* @returns The camera that was detached
|
|
24
|
-
*/
|
|
25
|
-
detachCamera(type: XRTrackedInputDevice.Camera | XRTrackedInputDevice.LeftCamera | XRTrackedInputDevice.RightCamera): Camera;
|
|
26
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IXRTracked } from "@galacean/engine-design";
|
|
2
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
-
import { TrackableType } from "./TrackableType";
|
|
4
|
-
/**
|
|
5
|
-
* XR hit result.
|
|
6
|
-
* It is the detection result returned by using XR HitTest feature.
|
|
7
|
-
*/
|
|
8
|
-
export declare class XRHitResult {
|
|
9
|
-
/** The position of the hit point. */
|
|
10
|
-
point: Vector3;
|
|
11
|
-
/** The normal of the hit point. */
|
|
12
|
-
normal: Vector3;
|
|
13
|
-
/** The distance from the origin of the ray to the hit point. */
|
|
14
|
-
distance: number;
|
|
15
|
-
/** The hit tracked object, such as IXRTrackedPlane. */
|
|
16
|
-
trackedObject: IXRTracked;
|
|
17
|
-
/** The type of tracked object detected, such as TrackableType.Plane */
|
|
18
|
-
trackableType: TrackableType;
|
|
19
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Ray } from "@galacean/engine-math";
|
|
2
|
-
import { XRManager } from "../../XRManager";
|
|
3
|
-
import { XRFeature } from "../XRFeature";
|
|
4
|
-
import { TrackableType } from "./TrackableType";
|
|
5
|
-
import { XRHitResult } from "./XRHitResult";
|
|
6
|
-
/**
|
|
7
|
-
* The manager of XR hit test.
|
|
8
|
-
*/
|
|
9
|
-
export declare class XRHitTest extends XRFeature {
|
|
10
|
-
private _tempRay;
|
|
11
|
-
private _tempVec2;
|
|
12
|
-
private _tempVec30;
|
|
13
|
-
private _tempVec31;
|
|
14
|
-
private _tempVec32;
|
|
15
|
-
private _tempVec33;
|
|
16
|
-
private _tempVec34;
|
|
17
|
-
private _tempVec35;
|
|
18
|
-
/**
|
|
19
|
-
* @param xrManager - The xr manager
|
|
20
|
-
*/
|
|
21
|
-
constructor(xrManager: XRManager);
|
|
22
|
-
/**
|
|
23
|
-
* Hit test.
|
|
24
|
-
* @param ray - The ray to test
|
|
25
|
-
* @param type - The type of hit test
|
|
26
|
-
* @returns The hit result
|
|
27
|
-
*/
|
|
28
|
-
hitTest(ray: Ray, type: TrackableType): XRHitResult[];
|
|
29
|
-
/**
|
|
30
|
-
* Screen hit test.
|
|
31
|
-
* @param x - The x coordinate of the screen point (normalized)
|
|
32
|
-
* @param y - The y coordinate of the screen point (normalized)
|
|
33
|
-
* @param type - The type of hit test
|
|
34
|
-
* @returns The hit result
|
|
35
|
-
*/
|
|
36
|
-
screenHitTest(x: number, y: number, type: TrackableType): XRHitResult[];
|
|
37
|
-
private _hitTestPlane;
|
|
38
|
-
private _checkPointerWithinPlane;
|
|
39
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor, IXRHitResult } from "@galacean/engine-design";
|
|
2
|
-
import { XRHitTestType } from "./XRHitTestType";
|
|
3
|
-
import { Ray } from "@galacean/engine-math";
|
|
4
|
-
import { XRFeatureManager } from "../XRFeatureManager";
|
|
5
|
-
export declare class XRHitTestManager extends XRFeatureManager {
|
|
6
|
-
private _tempRay;
|
|
7
|
-
private _tempVec2;
|
|
8
|
-
private _tempVec30;
|
|
9
|
-
private _tempVec31;
|
|
10
|
-
private _tempVec32;
|
|
11
|
-
private _tempVec33;
|
|
12
|
-
private _tempVec34;
|
|
13
|
-
private _tempVec35;
|
|
14
|
-
/**
|
|
15
|
-
* Returns whether the feature is supported.
|
|
16
|
-
* @param descriptor - The descriptor of the feature
|
|
17
|
-
* @returns The promise of the feature
|
|
18
|
-
*/
|
|
19
|
-
isSupported(descriptor?: IXRFeatureDescriptor): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Hit test.
|
|
22
|
-
* @param ray - The ray to test
|
|
23
|
-
* @param type - The type of hit test
|
|
24
|
-
* @returns The hit result
|
|
25
|
-
*/
|
|
26
|
-
hitTest(ray: Ray, type: XRHitTestType): IXRHitResult[];
|
|
27
|
-
/**
|
|
28
|
-
* Screen hit test.
|
|
29
|
-
* @param x - The x coordinate of the screen point (normalized)
|
|
30
|
-
* @param y - The y coordinate of the screen point (normalized)
|
|
31
|
-
* @param type - The type of hit test
|
|
32
|
-
* @returns The hit result
|
|
33
|
-
*/
|
|
34
|
-
screenHitTest(x: number, y: number, type: XRHitTestType): IXRHitResult[];
|
|
35
|
-
private _hitTest;
|
|
36
|
-
private _hitTestPlane;
|
|
37
|
-
private _checkPointerWithinPlane;
|
|
38
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum for the types of hit test that can be performed.
|
|
3
|
-
* Note: currently only supports plane.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum XRHitTestType {
|
|
6
|
-
/** None */
|
|
7
|
-
None = 0,
|
|
8
|
-
/** Tracked plane. */
|
|
9
|
-
Plane = 1,
|
|
10
|
-
/** Tracked mesh. */
|
|
11
|
-
Mesh = 2,
|
|
12
|
-
/** Tracked anchor. */
|
|
13
|
-
Anchor = 4,
|
|
14
|
-
/** All tracked objects. */
|
|
15
|
-
All = 7
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { XRManager } from "../../XRManager";
|
|
2
|
-
import { XRFeature } from "../XRFeature";
|
|
3
|
-
import { XRMovementTrackingMode } from "./XRMovementTrackingMode";
|
|
4
|
-
/**
|
|
5
|
-
* The manager of XR movement tracking.
|
|
6
|
-
*/
|
|
7
|
-
export declare class XRMovementTracking extends XRFeature {
|
|
8
|
-
private _trackingMode;
|
|
9
|
-
/**
|
|
10
|
-
* Get the tracking mode.
|
|
11
|
-
*/
|
|
12
|
-
get trackingMode(): XRMovementTrackingMode;
|
|
13
|
-
/**
|
|
14
|
-
* @param xrManager - The xr manager
|
|
15
|
-
* @param trackingMode - The tracking mode
|
|
16
|
-
*/
|
|
17
|
-
constructor(xrManager: XRManager, trackingMode?: XRMovementTrackingMode);
|
|
18
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IXRMovementTracking, IXRMovementTrackingDescriptor } from "@galacean/engine-design";
|
|
2
|
-
import { XRMovementTrackingMode } from "./XRMovementTrackingMode";
|
|
3
|
-
import { XRFeatureManager } from "../XRFeatureManager";
|
|
4
|
-
export declare class XRMovementTrackingManager extends XRFeatureManager<IXRMovementTrackingDescriptor, IXRMovementTracking> {
|
|
5
|
-
/**
|
|
6
|
-
* Get the tracking mode.
|
|
7
|
-
*/
|
|
8
|
-
get trackingMode(): XRMovementTrackingMode;
|
|
9
|
-
set trackingMode(value: XRMovementTrackingMode);
|
|
10
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IXRTrackablePlatformFeature } from "@galacean/engine-design";
|
|
2
|
-
import { XRTrackingState } from "../../input/XRTrackingState";
|
|
3
|
-
import { XRFeature } from "../XRFeature";
|
|
4
|
-
import { XRRequestTracking } from "./XRRequestTracking";
|
|
5
|
-
import { XRTracked } from "./XRTracked";
|
|
6
|
-
/**
|
|
7
|
-
* The base class of XR trackable manager.
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class XRTrackableFeature<T extends XRTracked, K extends XRRequestTracking<T>> extends XRFeature<IXRTrackablePlatformFeature<T, K>> {
|
|
10
|
-
protected _requestTrackings: K[];
|
|
11
|
-
protected _tracked: T[];
|
|
12
|
-
protected _added: T[];
|
|
13
|
-
protected _updated: T[];
|
|
14
|
-
protected _removed: T[];
|
|
15
|
-
protected _statusSnapshot: Record<number, XRTrackingState>;
|
|
16
|
-
private _listeners;
|
|
17
|
-
/**
|
|
18
|
-
* Returns the tracked objects.
|
|
19
|
-
*/
|
|
20
|
-
get tracked(): readonly T[];
|
|
21
|
-
/**
|
|
22
|
-
* Add a listening function for tracked object changes.
|
|
23
|
-
* @param listener - The listening function
|
|
24
|
-
*/
|
|
25
|
-
addChangedListener(listener: (added: readonly T[], updated: readonly T[], removed: readonly T[]) => void): void;
|
|
26
|
-
/**
|
|
27
|
-
* Remove a listening function of tracked object changes.
|
|
28
|
-
* @param listener - The listening function
|
|
29
|
-
*/
|
|
30
|
-
removeChangedListener(listener: (added: readonly T[], updated: readonly T[], removed: readonly T[]) => void): void;
|
|
31
|
-
_onUpdate(): void;
|
|
32
|
-
_onSessionStop(): void;
|
|
33
|
-
_onSessionExit(): void;
|
|
34
|
-
_onDestroy(): void;
|
|
35
|
-
protected _addRequestTracking(requestTracking: K): void;
|
|
36
|
-
protected _removeRequestTracking(requestTracking: K): void;
|
|
37
|
-
protected _removeAllRequestTrackings(): void;
|
|
38
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor, IXRFrame, IXRRequestTracking, IXRSession, IXRTrackableFeature, IXRTracked } from "@galacean/engine-design";
|
|
2
|
-
import { XRTrackedUpdateFlag } from "../../input/XRTrackedUpdateFlag";
|
|
3
|
-
import { XRFeatureManager } from "../XRFeatureManager";
|
|
4
|
-
import { XRTrackingState } from "../../input/XRTrackingState";
|
|
5
|
-
/**
|
|
6
|
-
* The base class of XR trackable manager.
|
|
7
|
-
*/
|
|
8
|
-
export declare abstract class XRTrackableManager<TDescriptor extends IXRFeatureDescriptor, TXRTracked extends IXRTracked, TXRRequestTracking extends IXRRequestTracking<TXRTracked>, TTrackableFeature extends IXRTrackableFeature<TXRTracked, TXRRequestTracking>> extends XRFeatureManager<TDescriptor, TTrackableFeature> {
|
|
9
|
-
protected _requestTrackings: TXRRequestTracking[];
|
|
10
|
-
protected _trackedObjects: TXRTracked[];
|
|
11
|
-
protected _added: TXRTracked[];
|
|
12
|
-
protected _updated: TXRTracked[];
|
|
13
|
-
protected _removed: TXRTracked[];
|
|
14
|
-
protected _statusSnapshot: Record<number, XRTrackingState>;
|
|
15
|
-
private _trackedUpdateFlag;
|
|
16
|
-
/**
|
|
17
|
-
* Return Request tracking requirements.
|
|
18
|
-
*/
|
|
19
|
-
get requestTrackings(): readonly TXRRequestTracking[];
|
|
20
|
-
/**
|
|
21
|
-
* Returns the tracked objects.
|
|
22
|
-
*/
|
|
23
|
-
get trackedObjects(): readonly TXRTracked[];
|
|
24
|
-
addRequestTracking(requestTracking: TXRRequestTracking): void;
|
|
25
|
-
removeRequestTracking(remove: TXRRequestTracking): void;
|
|
26
|
-
removeAllRequestTrackings(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Add a listening function to track changes.
|
|
29
|
-
* @param listener - The listening function
|
|
30
|
-
*/
|
|
31
|
-
addListener(listener: (type: XRTrackedUpdateFlag, param: readonly TXRTracked[]) => any): void;
|
|
32
|
-
/**
|
|
33
|
-
* Remove a listening function to track changes.
|
|
34
|
-
* @param listener - The listening function
|
|
35
|
-
*/
|
|
36
|
-
removeListener(listener: (type: XRTrackedUpdateFlag, param: readonly TXRTracked[]) => any): void;
|
|
37
|
-
onUpdate(session: IXRSession, frame: IXRFrame): void;
|
|
38
|
-
onSessionStop(): void;
|
|
39
|
-
onSessionDestroy(): void;
|
|
40
|
-
onDestroy(): void;
|
|
41
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { XRManager } from "../../../XRManager";
|
|
3
|
-
import { XRTrackableFeature } from "../XRTrackableFeature";
|
|
4
|
-
import { XRAnchor } from "./XRAnchor";
|
|
5
|
-
import { XRRequestAnchor } from "./XRRequestAnchor";
|
|
6
|
-
/**
|
|
7
|
-
* The manager of XR anchor tracking.
|
|
8
|
-
*/
|
|
9
|
-
export declare class XRAnchorTracking extends XRTrackableFeature<XRAnchor, XRRequestAnchor> {
|
|
10
|
-
private _anchors;
|
|
11
|
-
/**
|
|
12
|
-
* The anchors to tracking.
|
|
13
|
-
*/
|
|
14
|
-
get trackingAnchors(): readonly XRAnchor[];
|
|
15
|
-
/**
|
|
16
|
-
* The tracked anchors.
|
|
17
|
-
*/
|
|
18
|
-
get trackedAnchors(): readonly XRAnchor[];
|
|
19
|
-
/**
|
|
20
|
-
* @param xrManager - The xr manager
|
|
21
|
-
*/
|
|
22
|
-
constructor(xrManager: XRManager);
|
|
23
|
-
/**
|
|
24
|
-
* Add a anchor in XR space.
|
|
25
|
-
* @param anchor - The anchor to be added
|
|
26
|
-
*/
|
|
27
|
-
addAnchor(position: Vector3, rotation: Quaternion): XRAnchor;
|
|
28
|
-
/**
|
|
29
|
-
* Remove a anchor in XR space.
|
|
30
|
-
* @param anchor - The anchor to be removed
|
|
31
|
-
*/
|
|
32
|
-
removeAnchor(anchor: XRAnchor): void;
|
|
33
|
-
/**
|
|
34
|
-
* Remove all tracking anchors.
|
|
35
|
-
*/
|
|
36
|
-
clearAnchors(): void;
|
|
37
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IXRPose, IXRTracked, IXRAnchorTracking, IXRRequestAnchorTracking, IXRAnchorTrackingDescriptor } from "@galacean/engine-design";
|
|
2
|
-
import { XRTrackableManager } from "../XRTrackableManager";
|
|
3
|
-
export declare class XRAnchorTrackingManager extends XRTrackableManager<IXRAnchorTrackingDescriptor, IXRTracked, IXRRequestAnchorTracking, IXRAnchorTracking> {
|
|
4
|
-
/**
|
|
5
|
-
* Add a tracking anchor.
|
|
6
|
-
* @param pose - The pose of anchor to be added
|
|
7
|
-
*/
|
|
8
|
-
addAnchor(pose: IXRPose): IXRRequestAnchorTracking;
|
|
9
|
-
/**
|
|
10
|
-
* Remove a tracking anchor.
|
|
11
|
-
* @param anchor - The anchor to be removed
|
|
12
|
-
*/
|
|
13
|
-
removeAnchor(anchor: IXRRequestAnchorTracking): void;
|
|
14
|
-
/**
|
|
15
|
-
* Remove all tracking anchors.
|
|
16
|
-
*/
|
|
17
|
-
removeAllAnchors(): void;
|
|
18
|
-
initialize(): Promise<void>;
|
|
19
|
-
private _createRequestTracking;
|
|
20
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { XRRequestTracking } from "../XRRequestTracking";
|
|
3
|
-
import { XRAnchor } from "./XRAnchor";
|
|
4
|
-
/**
|
|
5
|
-
* The request anchor in XR space.
|
|
6
|
-
*/
|
|
7
|
-
export declare class XRRequestAnchor extends XRRequestTracking<XRAnchor> {
|
|
8
|
-
position: Vector3;
|
|
9
|
-
rotation: Quaternion;
|
|
10
|
-
/**
|
|
11
|
-
* @param position - Requests the position of the anchor to be added
|
|
12
|
-
* @param rotation - Requests the rotation of the anchor to be added
|
|
13
|
-
*/
|
|
14
|
-
constructor(position: Vector3, rotation: Quaternion);
|
|
15
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { XRManager } from "../../../XRManager";
|
|
2
|
-
import { XRTrackableFeature } from "../XRTrackableFeature";
|
|
3
|
-
import { XRReferenceImage } from "./XRReferenceImage";
|
|
4
|
-
import { XRRequestImage } from "./XRRequestImage";
|
|
5
|
-
import { XRTrackedImage } from "./XRTrackedImage";
|
|
6
|
-
/**
|
|
7
|
-
* The manager of XR image tracking.
|
|
8
|
-
*/
|
|
9
|
-
export declare class XRImageTracking extends XRTrackableFeature<XRTrackedImage, XRRequestImage> {
|
|
10
|
-
private _images;
|
|
11
|
-
/**
|
|
12
|
-
* The image to tracking.
|
|
13
|
-
*/
|
|
14
|
-
get images(): readonly XRReferenceImage[];
|
|
15
|
-
/**
|
|
16
|
-
* The tracked images.
|
|
17
|
-
*/
|
|
18
|
-
get trackedImages(): readonly XRTrackedImage[];
|
|
19
|
-
/**
|
|
20
|
-
* @param xrManager - The xr manager
|
|
21
|
-
* @param images - The images to be tracked
|
|
22
|
-
*/
|
|
23
|
-
constructor(xrManager: XRManager, images: XRReferenceImage[]);
|
|
24
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IXRImageTracking, IXRRequestImageTracking, IXRTrackedImage, IXRImageTrackingDescriptor } from "@galacean/engine-design";
|
|
2
|
-
import { XRTrackableManager } from "../XRTrackableManager";
|
|
3
|
-
import { XRReferenceImage } from "./XRReferenceImage";
|
|
4
|
-
export declare class XRImageTrackingManager extends XRTrackableManager<IXRImageTrackingDescriptor, IXRTrackedImage, IXRRequestImageTracking, IXRImageTracking> {
|
|
5
|
-
/**
|
|
6
|
-
* Add a tracking image
|
|
7
|
-
* @param image - xr reference image
|
|
8
|
-
*/
|
|
9
|
-
addImage(image: XRReferenceImage): void;
|
|
10
|
-
/**
|
|
11
|
-
* Add tracking images
|
|
12
|
-
* @param images - xr reference images
|
|
13
|
-
*/
|
|
14
|
-
addImage(images: XRReferenceImage[]): void;
|
|
15
|
-
/**
|
|
16
|
-
* Remove a tracking image
|
|
17
|
-
* @param image - xr reference image
|
|
18
|
-
*/
|
|
19
|
-
removeImage(image: XRReferenceImage): void;
|
|
20
|
-
/**
|
|
21
|
-
* Remove tracking images
|
|
22
|
-
* @param images - xr reference images
|
|
23
|
-
*/
|
|
24
|
-
removeImage(images: XRReferenceImage[]): void;
|
|
25
|
-
/**
|
|
26
|
-
* Remove all tracking images
|
|
27
|
-
*/
|
|
28
|
-
removeAllImages(): void;
|
|
29
|
-
initialize(): Promise<void>;
|
|
30
|
-
private _createRequestTracking;
|
|
31
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IXRReferenceImage } from "@galacean/engine-design";
|
|
2
|
-
/**
|
|
3
|
-
* A reference image is an image to look for in the physical environment.
|
|
4
|
-
*/
|
|
5
|
-
export declare class XRReferenceImage implements IXRReferenceImage {
|
|
6
|
-
name: string;
|
|
7
|
-
src: string | HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | Blob | ImageData | ImageBitmap | OffscreenCanvas;
|
|
8
|
-
physicalWidth: number;
|
|
9
|
-
physicalHeight: number;
|
|
10
|
-
constructor(name: string, src: string | HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | Blob | ImageData | ImageBitmap | OffscreenCanvas, physicalWidth?: number, physicalHeight?: number);
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { XRRequestTracking } from "../XRRequestTracking";
|
|
2
|
-
import { XRReferenceImage } from "./XRReferenceImage";
|
|
3
|
-
import { XRTrackedImage } from "./XRTrackedImage";
|
|
4
|
-
/**
|
|
5
|
-
* The request image in XR space.
|
|
6
|
-
*/
|
|
7
|
-
export declare class XRRequestImage extends XRRequestTracking<XRTrackedImage> {
|
|
8
|
-
image: XRReferenceImage;
|
|
9
|
-
/**
|
|
10
|
-
* @param image - The image to be tracked
|
|
11
|
-
*/
|
|
12
|
-
constructor(image: XRReferenceImage);
|
|
13
|
-
}
|