@galacean/engine-core 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/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +2 -2
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/enums/DepthMode.d.ts +8 -0
- package/types/particle/enum/ParticleShapeType.d.ts +1 -1
- package/types/particle/module/shape/BaseShape.d.ts +4 -7
- package/types/particle/module/shape/BoxShape.d.ts +3 -11
- package/types/particle/module/shape/CircleShape.d.ts +1 -9
- package/types/particle/module/shape/ConeShape.d.ts +1 -9
- package/types/particle/module/shape/HemisphereShape.d.ts +1 -9
- package/types/particle/module/shape/SphereShape.d.ts +1 -9
- package/types/particle/moudules/Burst.d.ts +12 -4
- package/types/particle/moudules/Emission.d.ts +27 -11
- package/types/particle/moudules/ParticleCurve.d.ts +1 -17
- package/types/physics/PhysicsManager.d.ts +2 -4
- package/types/xr/XRManager.d.ts +5 -3
- package/types/xr/feature/XRFeatureManager.d.ts +4 -4
- package/types/xr/index.d.ts +2 -25
- package/types/xr/input/XRInputEvent.d.ts +3 -6
- package/types/RenderPipeline/RenderElementX.d.ts +0 -12
- package/types/Ticker.d.ts +0 -30
- package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +0 -1
- package/types/graphic/PrimitiveVertexBinding.d.ts +0 -1
- package/types/mesh/SubModelMesh.d.ts +0 -260
- package/types/particle/ParticleShaderMacro.d.ts +0 -1
- package/types/particle/ParticleShaderProperty.d.ts +0 -1
- package/types/particle/ParticleSystem.d.ts +0 -41
- package/types/particle/ParticleVertexElements.d.ts +0 -1
- package/types/particle/ParticleVertexUtils.d.ts +0 -1
- package/types/particle/modules/ShapeModule.d.ts +0 -9
- package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/EmissionModule.d.ts +0 -49
- package/types/particle/moudules/MainModule.d.ts +0 -59
- package/types/particle/moudules/ParticleGradient.d.ts +0 -28
- package/types/particle/moudules/ShapeModule.d.ts +0 -7
- package/types/particle/moudules/shape/BaseShape.d.ts +0 -28
- package/types/particle/moudules/shape/BoxShape.d.ts +0 -20
- package/types/particle/moudules/shape/CircleShape.d.ts +0 -27
- package/types/particle/moudules/shape/ConeShape.d.ts +0 -35
- package/types/particle/moudules/shape/HemisphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/ShapeUtils.d.ts +0 -1
- package/types/particle/moudules/shape/SphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +0 -15
- package/types/particle/moudules/shape/index.d.ts +0 -5
- package/types/utils/BoolUpdateFlag.d.ts +0 -12
- package/types/utils/DisorderedArray.d.ts +0 -18
- package/types/utils/UpdateFlag.d.ts +0 -20
- package/types/utils/UpdateFlagManager.d.ts +0 -1
- package/types/utils/Utils.d.ts +0 -31
- package/types/xr/XRModule.d.ts +0 -126
- package/types/xr/component/XRPoseDriver.d.ts +0 -10
- package/types/xr/component/XRTrackingMode.d.ts +0 -15
- package/types/xr/component/trackable/XRAnchor.d.ts +0 -4
- package/types/xr/component/trackable/XRImage.d.ts +0 -6
- package/types/xr/component/trackable/XRPlane.d.ts +0 -7
- package/types/xr/component/trackable/XRTracked.d.ts +0 -13
- package/types/xr/data/XRCamera.d.ts +0 -6
- package/types/xr/data/XRDevice.d.ts +0 -9
- package/types/xr/data/XRHandle.d.ts +0 -10
- package/types/xr/enum/EnumXRButton.d.ts +0 -5
- package/types/xr/enum/EnumXRDevicePhase.d.ts +0 -4
- package/types/xr/enum/EnumXRFeature.d.ts +0 -9
- package/types/xr/enum/EnumXRInputSource.d.ts +0 -8
- package/types/xr/enum/EnumXRMode.d.ts +0 -7
- package/types/xr/enum/EnumXRSubsystem.d.ts +0 -4
- package/types/xr/enum/EnumXRTrackingMode.d.ts +0 -7
- package/types/xr/feature/XRCameraManager.d.ts +0 -21
- package/types/xr/feature/XRFeature.d.ts +0 -29
- package/types/xr/feature/XRImageTrackManager.d.ts +0 -10
- package/types/xr/feature/XRInputManager.d.ts +0 -16
- package/types/xr/feature/camera/IXRCameraDescriptor.d.ts +0 -7
- package/types/xr/feature/camera/XRCameraManager.d.ts +0 -35
- package/types/xr/feature/camera/XRPlatformCamera.d.ts +0 -5
- package/types/xr/feature/hitTest/XRHItTestType.d.ts +0 -16
- package/types/xr/feature/hitTest/XRHitTestManager.d.ts +0 -38
- package/types/xr/feature/movementTracking/IXRMovementTrackingDescriptor.d.ts +0 -9
- package/types/xr/feature/movementTracking/XRMovementTrackingManager.d.ts +0 -8
- package/types/xr/feature/movementTracking/XRMovementTrackingMode.d.ts +0 -5
- package/types/xr/feature/movementTracking/XRPlatformMovementTracking.d.ts +0 -10
- package/types/xr/feature/trackable/XRRequestTrackingState.d.ts +0 -11
- package/types/xr/feature/trackable/XRTrackableManager.d.ts +0 -41
- package/types/xr/feature/trackable/XRTrackablePlatformFeature.d.ts +0 -29
- package/types/xr/feature/trackable/XRTracked.d.ts +0 -9
- package/types/xr/feature/trackable/XRTrackedUpdateFlag.d.ts +0 -11
- package/types/xr/feature/trackable/XRTrackingState.d.ts +0 -11
- package/types/xr/feature/trackable/anchor/IXRAnchorTrackingDescriptor.d.ts +0 -8
- package/types/xr/feature/trackable/anchor/XRAnchorTrackingManager.d.ts +0 -22
- package/types/xr/feature/trackable/anchor/XRAnchorTrackingMode.d.ts +0 -4
- package/types/xr/feature/trackable/anchor/XRPlatformAnchorTracking.d.ts +0 -12
- package/types/xr/feature/trackable/anchor/XRRequestTrackingAnchor.d.ts +0 -10
- package/types/xr/feature/trackable/image/IXRImageTrackingDescriptor.d.ts +0 -5
- package/types/xr/feature/trackable/image/XRImageTrackingManager.d.ts +0 -33
- package/types/xr/feature/trackable/image/XRPlatformImageTracking.d.ts +0 -14
- package/types/xr/feature/trackable/image/XRReferenceImage.d.ts +0 -14
- package/types/xr/feature/trackable/image/XRRequestTrackingImage.d.ts +0 -11
- package/types/xr/feature/trackable/image/XRTrackedImage.d.ts +0 -5
- package/types/xr/feature/trackable/plane/IXRPlaneTrackingDescriptor.d.ts +0 -9
- package/types/xr/feature/trackable/plane/XRPlaneDetectionMode.d.ts +0 -13
- package/types/xr/feature/trackable/plane/XRPlaneMode.d.ts +0 -13
- package/types/xr/feature/trackable/plane/XRPlaneTrackingManager.d.ts +0 -14
- package/types/xr/feature/trackable/plane/XRPlatformPlaneTracking.d.ts +0 -11
- package/types/xr/feature/trackable/plane/XRRequestTrackingPlane.d.ts +0 -11
- package/types/xr/feature/trackable/plane/XRTrackedPlane.d.ts +0 -11
- package/types/xr/input/XRInput.d.ts +0 -14
- package/types/xr/input/XRInputEventType.d.ts +0 -11
- package/types/xr/input/XRTargetRayMode.d.ts +0 -12
- package/types/xr/provider/XRProvider.d.ts +0 -19
- package/types/xr/subsystem/XRInputSubsystem.d.ts +0 -5
- package/types/xr/subsystem/XRSubsystem.d.ts +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
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"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.1.0-beta.
|
|
18
|
+
"@galacean/engine-math": "1.1.0-beta.21"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.1.0-beta.21"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { IClone } from "@galacean/engine-design";
|
|
2
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
3
2
|
import { ParticleShapeType } from "../../enum/ParticleShapeType";
|
|
4
3
|
/**
|
|
5
4
|
* Configures the initial positions and directions of particles.
|
|
6
5
|
*/
|
|
7
|
-
export declare class BaseShape implements IClone {
|
|
8
|
-
/** The type of shape to emit particles from. */
|
|
9
|
-
shapeType: ParticleShapeType;
|
|
6
|
+
export declare abstract class BaseShape implements IClone {
|
|
10
7
|
/** Specifies whether the ShapeModule is enabled or disabled. */
|
|
11
8
|
enable: boolean;
|
|
9
|
+
/** The type of shape to emit particles from. */
|
|
10
|
+
shapeType: ParticleShapeType;
|
|
12
11
|
/** Randomizes the starting direction of particles. */
|
|
13
12
|
randomDirectionAmount: number;
|
|
14
13
|
/**
|
|
@@ -20,7 +19,5 @@ export declare class BaseShape implements IClone {
|
|
|
20
19
|
* @override
|
|
21
20
|
* @inheritDoc
|
|
22
21
|
*/
|
|
23
|
-
clone(): BaseShape;
|
|
24
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
25
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
22
|
+
abstract clone(): BaseShape;
|
|
26
23
|
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import { BoundingBox, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
|
-
* Box emitter shape
|
|
4
|
+
* Box emitter shape.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BoxShape extends BaseShape {
|
|
7
7
|
/** Thickness of the box to emit particles from. */
|
|
8
|
-
|
|
8
|
+
size: Vector3;
|
|
9
9
|
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* @inheritDoc
|
|
12
|
-
*/
|
|
13
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
18
10
|
cloneTo(destShape: BoxShape): void;
|
|
19
11
|
clone(): BoxShape;
|
|
20
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
import { ParticleShapeMultiModeValue } from "../../enum";
|
|
4
4
|
/**
|
|
5
5
|
* Circle Particle Emitter
|
|
@@ -13,14 +13,6 @@ export declare class CircleShape extends BaseShape {
|
|
|
13
13
|
/** The mode to generate particles around the arc. */
|
|
14
14
|
arcMode: ParticleShapeMultiModeValue;
|
|
15
15
|
constructor();
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
24
16
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
25
17
|
cloneTo(destShape: CircleShape): void;
|
|
26
18
|
clone(): CircleShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
export declare enum ConeEmitType {
|
|
4
4
|
Base = 0,
|
|
5
5
|
BaseShell = 1,
|
|
@@ -21,14 +21,6 @@ export declare class ConeShape extends BaseShape {
|
|
|
21
21
|
/** Cone emitter subtype */
|
|
22
22
|
emitType: ConeEmitType;
|
|
23
23
|
constructor();
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
32
24
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
33
25
|
cloneTo(destShape: ConeShape): void;
|
|
34
26
|
clone(): ConeShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
4
|
* Hemisphere emitter
|
|
5
5
|
*/
|
|
@@ -9,14 +9,6 @@ export declare class HemisphereShape extends BaseShape {
|
|
|
9
9
|
/** Whether emit from shell */
|
|
10
10
|
emitFromShell: boolean;
|
|
11
11
|
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
20
12
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
21
13
|
cloneTo(destShape: HemisphereShape): void;
|
|
22
14
|
clone(): HemisphereShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
4
|
* Sphere emitter
|
|
5
5
|
*/
|
|
@@ -9,14 +9,6 @@ export declare class SphereShape extends BaseShape {
|
|
|
9
9
|
/** Whether emit from shell */
|
|
10
10
|
emitFromShell: boolean;
|
|
11
11
|
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
20
12
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
21
13
|
cloneTo(destShape: SphereShape): void;
|
|
22
14
|
clone(): SphereShape;
|
|
@@ -4,12 +4,20 @@ import { ParticleCurve } from "./ParticleCurve";
|
|
|
4
4
|
* A burst is a particle emission event, where a number of particles are all emitted at the same time
|
|
5
5
|
*/
|
|
6
6
|
export declare class Burst implements IClone {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
private _time;
|
|
8
|
+
private _count;
|
|
9
|
+
/**
|
|
10
|
+
* The time that each burst occurs.
|
|
11
|
+
*/
|
|
12
|
+
get time(): number;
|
|
13
|
+
/**
|
|
14
|
+
* The number of particles to emit.
|
|
15
|
+
*/
|
|
16
|
+
get count(): ParticleCurve;
|
|
9
17
|
/**
|
|
10
18
|
* Create burst object.
|
|
11
|
-
* @param time - Time to emit the burst
|
|
12
|
-
* @param count -
|
|
19
|
+
* @param time - Time to emit the burst.
|
|
20
|
+
* @param count - Minimum number of particles to emit.
|
|
13
21
|
*/
|
|
14
22
|
constructor(time: number, count: ParticleCurve);
|
|
15
23
|
/**
|
|
@@ -1,25 +1,41 @@
|
|
|
1
|
-
import { IClone } from "@galacean/engine-design";
|
|
2
1
|
import { Burst } from "./Burst";
|
|
3
|
-
import {
|
|
2
|
+
import { IClone } from "@galacean/engine-design";
|
|
4
3
|
/**
|
|
5
4
|
* The EmissionModule of a Particle System.
|
|
6
5
|
*/
|
|
7
6
|
export declare class EmissionModule implements IClone {
|
|
7
|
+
private _emissionRate;
|
|
8
|
+
private _emissionRateOverDistance;
|
|
9
|
+
private _bursts;
|
|
8
10
|
/** Specifies whether the EmissionModule is enabled or disabled. */
|
|
9
11
|
enable: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The rate of particle emission.
|
|
14
|
+
*/
|
|
15
|
+
get emissionRate(): number;
|
|
16
|
+
set emissionRate(value: number);
|
|
17
|
+
/**
|
|
18
|
+
* The rate at which the emitter spawns new particles over distance.
|
|
19
|
+
*/
|
|
20
|
+
get emissionRateOverDistance(): number;
|
|
21
|
+
set emissionRateOverDistance(value: number);
|
|
15
22
|
/**
|
|
16
23
|
* Gets the burst array.
|
|
17
24
|
*/
|
|
18
|
-
get bursts():
|
|
19
|
-
|
|
25
|
+
get bursts(): Burst[];
|
|
26
|
+
/**
|
|
27
|
+
* The current number of bursts.
|
|
28
|
+
*/
|
|
29
|
+
get burstCount(): number;
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
31
|
+
* Gets a single burst from the array of bursts.
|
|
32
|
+
* @param index - The index of the burst to retrieve.
|
|
33
|
+
* @return The burst data at the given index.
|
|
34
|
+
*/
|
|
35
|
+
getBurstByIndex(index: number): Burst;
|
|
36
|
+
/**
|
|
37
|
+
* Add a single burst from the array of bursts.
|
|
38
|
+
* @param burst - The burst data
|
|
23
39
|
*/
|
|
24
40
|
addBurst(burst: Burst): void;
|
|
25
41
|
/**
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import { IClone } from "@galacean/engine-design";
|
|
2
1
|
import { ParticleCurveMode } from "../enums/ParticleCurveMode";
|
|
3
2
|
/**
|
|
4
3
|
* Particle curve.
|
|
5
4
|
*/
|
|
6
|
-
export declare class ParticleCurve
|
|
5
|
+
export declare class ParticleCurve {
|
|
7
6
|
/** The curve mode. */
|
|
8
7
|
mode: ParticleCurveMode;
|
|
9
8
|
constant: number;
|
|
10
9
|
constantMin: number;
|
|
11
10
|
constantMax: number;
|
|
12
|
-
/**
|
|
13
|
-
* Query the curve value at the specified time.
|
|
14
|
-
* @param time - Normalized time at which to evaluate the curve, Valid when `mode` is set to `Curve` or `TwoCurves`
|
|
15
|
-
* @param lerpFactor - Lerp factor between two constants or curves, Valid when `mode` is set to `TwoConstants` or `TwoCurves`
|
|
16
|
-
* @returns - The result curve value
|
|
17
|
-
*/
|
|
18
|
-
evaluate(time: number, lerpFactor: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
cloneTo(destEmission: ParticleCurve): void;
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
clone(): ParticleCurve;
|
|
27
11
|
}
|
|
@@ -9,7 +9,6 @@ export declare class PhysicsManager {
|
|
|
9
9
|
private static _collision;
|
|
10
10
|
private _engine;
|
|
11
11
|
private _restTime;
|
|
12
|
-
private _fixedTimeStep;
|
|
13
12
|
private _colliders;
|
|
14
13
|
private _gravity;
|
|
15
14
|
private _nativePhysicsManager;
|
|
@@ -20,14 +19,13 @@ export declare class PhysicsManager {
|
|
|
20
19
|
private _onTriggerEnter;
|
|
21
20
|
private _onTriggerExit;
|
|
22
21
|
private _onTriggerStay;
|
|
22
|
+
/** The fixed time step in seconds at which physics are performed. */
|
|
23
|
+
fixedTimeStep: number;
|
|
23
24
|
/**
|
|
24
25
|
* The gravity of physics scene.
|
|
25
26
|
*/
|
|
26
27
|
get gravity(): Vector3;
|
|
27
28
|
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
29
|
constructor(engine: Engine);
|
|
32
30
|
/**
|
|
33
31
|
* Casts a ray through the Scene and returns the first hit.
|
package/types/xr/XRManager.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor,
|
|
1
|
+
import { IXRFeatureDescriptor, IXRPlatformFeature } from "@galacean/engine-design";
|
|
2
2
|
import { XRInputManager } from "./input/XRInputManager";
|
|
3
3
|
import { XRFeatureType } from "./feature/XRFeatureType";
|
|
4
4
|
import { XRSessionManager } from "./session/XRSessionManager";
|
|
5
5
|
import { XRSessionType } from "./session/XRSessionType";
|
|
6
6
|
import { XRFeatureManager } from "./feature/XRFeatureManager";
|
|
7
|
-
import { IXRDevice } from "
|
|
7
|
+
import { IXRDevice } from "./IXRDevice";
|
|
8
8
|
import { Engine } from "../Engine";
|
|
9
9
|
import { Scene } from "../Scene";
|
|
10
10
|
import { Entity } from "../Entity";
|
|
11
|
-
type TXRFeatureManager = XRFeatureManager<IXRFeatureDescriptor,
|
|
11
|
+
type TXRFeatureManager = XRFeatureManager<IXRFeatureDescriptor, IXRPlatformFeature>;
|
|
12
12
|
type TXRFeatureManagerConstructor = new (engine: Engine) => TXRFeatureManager;
|
|
13
13
|
/**
|
|
14
14
|
* XRManager is the entry point of the XR system.
|
|
15
15
|
*/
|
|
16
16
|
export declare class XRManager {
|
|
17
|
+
/** Hardware adaptation for XR. */
|
|
18
|
+
xrDevice: IXRDevice;
|
|
17
19
|
/** Input manager for XR. */
|
|
18
20
|
inputManager: XRInputManager;
|
|
19
21
|
/** Session manager for XR. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IXRFeatureDescriptor, IXRFeatureManager,
|
|
1
|
+
import { IXRFeatureDescriptor, IXRFeatureManager, IXRPlatformFeature } from "@galacean/engine-design";
|
|
2
2
|
import { Engine } from "../../Engine";
|
|
3
3
|
/**
|
|
4
4
|
* The base class of XR feature manager.
|
|
5
5
|
*/
|
|
6
|
-
export declare abstract class XRFeatureManager<TDescriptor extends IXRFeatureDescriptor = IXRFeatureDescriptor,
|
|
6
|
+
export declare abstract class XRFeatureManager<TDescriptor extends IXRFeatureDescriptor = IXRFeatureDescriptor, TPlatformFeature extends IXRPlatformFeature = IXRPlatformFeature> implements IXRFeatureManager {
|
|
7
7
|
protected _engine: Engine;
|
|
8
|
-
|
|
8
|
+
_platformFeature: TPlatformFeature;
|
|
9
9
|
protected _descriptor: TDescriptor;
|
|
10
10
|
protected _enabled: boolean;
|
|
11
11
|
/**
|
|
@@ -40,7 +40,7 @@ export declare abstract class XRFeatureManager<TDescriptor extends IXRFeatureDes
|
|
|
40
40
|
/**
|
|
41
41
|
* Called when xr frame is updated.
|
|
42
42
|
*/
|
|
43
|
-
onUpdate(
|
|
43
|
+
onUpdate(): void;
|
|
44
44
|
/**
|
|
45
45
|
* Called when the session is initialized.
|
|
46
46
|
*/
|
package/types/xr/index.d.ts
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
export { XRManager, registerXRFeatureManager } from "./XRManager";
|
|
2
|
-
export type { IXRDevice } from "
|
|
2
|
+
export type { IXRDevice } from "./IXRDevice";
|
|
3
|
+
export { XRPlatformFeature } from "./feature/XRPlatformFeature";
|
|
3
4
|
export { XRFeatureType } from "./feature/XRFeatureType";
|
|
4
5
|
export { XRFeatureManager } from "./feature/XRFeatureManager";
|
|
5
|
-
export type { IXRCameraDescriptor } from "./feature/camera/IXRCameraDescriptor";
|
|
6
|
-
export { XRCameraManager } from "./feature/camera/XRCameraManager";
|
|
7
|
-
export { XRHitTestManager } from "./feature/hitTest/XRHitTestManager";
|
|
8
|
-
export { XRHitTestType } from "./feature/hitTest/XRHitTestType";
|
|
9
|
-
export { XRRequestTrackingState } from "./feature/trackable/XRRequestTrackingState";
|
|
10
|
-
export { XRTracked } from "./feature/trackable/XRTracked";
|
|
11
|
-
export type { IXRMovementTrackingDescriptor } from "./feature/movementTracking/IXRMovementTrackingDescriptor";
|
|
12
|
-
export { XRMovementTrackingManager } from "./feature/movementTracking/XRMovementTrackingManager";
|
|
13
|
-
export { XRMovementTrackingMode } from "./feature/movementTracking/XRMovementTrackingMode";
|
|
14
|
-
export type { IXRAnchorTrackingDescriptor } from "./feature/trackable/anchor/IXRAnchorTrackingDescriptor";
|
|
15
|
-
export { XRAnchorTrackingManager } from "./feature/trackable/anchor/XRAnchorTrackingManager";
|
|
16
|
-
export { XRRequestTrackingAnchor } from "./feature/trackable/anchor/XRRequestTrackingAnchor";
|
|
17
|
-
export type { IXRImageTrackingDescriptor } from "./feature/trackable/image/IXRImageTrackingDescriptor";
|
|
18
|
-
export { XRImageTrackingManager } from "./feature/trackable/image/XRImageTrackingManager";
|
|
19
|
-
export { XRReferenceImage } from "./feature/trackable/image/XRReferenceImage";
|
|
20
|
-
export { XRRequestTrackingImage } from "./feature/trackable/image/XRRequestTrackingImage";
|
|
21
|
-
export { XRTrackedImage } from "./feature/trackable/image/XRTrackedImage";
|
|
22
|
-
export type { IXRPlaneTrackingDescriptor } from "./feature/trackable/plane/IXRPlaneTrackingDescriptor";
|
|
23
|
-
export { XRPlaneTrackingManager } from "./feature/trackable/plane/XRPlaneTrackingManager";
|
|
24
|
-
export { XRPlaneMode } from "./feature/trackable/plane/XRPlaneMode";
|
|
25
|
-
export { XRRequestTrackingPlane } from "./feature/trackable/plane/XRRequestTrackingPlane";
|
|
26
|
-
export { XRTrackedPlane } from "./feature/trackable/plane/XRTrackedPlane";
|
|
27
6
|
export { XRTrackingState } from "./input/XRTrackingState";
|
|
28
7
|
export { XRInputManager } from "./input/XRInputManager";
|
|
29
8
|
export { XRInputButton } from "./input/XRInputButton";
|
|
@@ -31,8 +10,6 @@ export { XRInputEvent } from "./input/XRInputEvent";
|
|
|
31
10
|
export { XRController } from "./input/XRController";
|
|
32
11
|
export { XRInputType } from "./input/XRInputType";
|
|
33
12
|
export { XRCamera } from "./input/XRCamera";
|
|
34
|
-
export { XRTargetRayMode } from "./input/XRTargetRayMode";
|
|
35
|
-
export { XRInputEventType } from "./input/XRInputEventType";
|
|
36
13
|
export { XRTrackedUpdateFlag } from "./input/XRTrackedUpdateFlag";
|
|
37
14
|
export { XRSessionManager } from "./session/XRSessionManager";
|
|
38
15
|
export { XRSessionType } from "./session/XRSessionType";
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { IXRInputEvent } from "@galacean/engine-design";
|
|
2
|
-
import { XRInputEventType } from "./XRInputEventType";
|
|
3
|
-
import { XRTargetRayMode } from "./XRTargetRayMode";
|
|
4
1
|
import { XRInputType } from "./XRInputType";
|
|
5
2
|
/**
|
|
6
3
|
* XR interaction events.
|
|
7
4
|
*/
|
|
8
|
-
export declare class XRInputEvent
|
|
5
|
+
export declare class XRInputEvent {
|
|
9
6
|
/**
|
|
10
7
|
* TargetRayMode indicates the method by which the target ray for
|
|
11
8
|
* the input source should be generated and how it should be presented to the user.
|
|
12
9
|
*/
|
|
13
|
-
targetRayMode:
|
|
10
|
+
targetRayMode: "gaze" | "tracked-pointer" | "screen";
|
|
14
11
|
/** The type of input event. */
|
|
15
|
-
type:
|
|
12
|
+
type: "select" | "selectend" | "selectstart" | "squeeze" | "squeezeend" | "squeezestart";
|
|
16
13
|
/** The type of input. */
|
|
17
14
|
input: XRInputType;
|
|
18
15
|
/** The unique ID of the touch point. (Appears only when targetRayMode is screen.)*/
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Renderer } from "../Renderer";
|
|
2
|
-
import { Primitive } from "../graphic/Primitive";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { ShaderPass } from "../shader/ShaderPass";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
export declare class RenderElementX implements IPoolElement {
|
|
7
|
-
shaderPasses: ReadonlyArray<ShaderPass>;
|
|
8
|
-
component: Renderer;
|
|
9
|
-
material: Material;
|
|
10
|
-
primitive: Primitive;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
package/types/Ticker.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare class Ticker {
|
|
2
|
-
private _vSyncCount;
|
|
3
|
-
private _vSyncCounter;
|
|
4
|
-
private _requestId;
|
|
5
|
-
private _animationLoop;
|
|
6
|
-
private _requestAnimationFrame;
|
|
7
|
-
private _cancelAnimationFrame;
|
|
8
|
-
/**
|
|
9
|
-
* The number of vertical synchronization means the number of vertical blanking for one frame.
|
|
10
|
-
* @remarks 0 means that the vertical synchronization is turned off.
|
|
11
|
-
*/
|
|
12
|
-
get vSyncCount(): number;
|
|
13
|
-
set vSyncCount(value: number);
|
|
14
|
-
get requestAnimationFrame(): (...params: any[]) => any;
|
|
15
|
-
set requestAnimationFrame(func: (...params: any[]) => any);
|
|
16
|
-
get cancelAnimationFrame(): (...params: any[]) => any;
|
|
17
|
-
set cancelAnimationFrame(func: (...params: any[]) => any);
|
|
18
|
-
get animationLoop(): (...params: any[]) => any;
|
|
19
|
-
set animationLoop(func: (...params: any[]) => any);
|
|
20
|
-
/**
|
|
21
|
-
* Pause the engine.
|
|
22
|
-
*/
|
|
23
|
-
pause(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Resume the engine.
|
|
26
|
-
*/
|
|
27
|
-
resume(): void;
|
|
28
|
-
private _onAnimationFrame;
|
|
29
|
-
constructor();
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|