@galacean/engine-core 1.1.0-beta.29 → 1.1.0-beta.30
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 +16 -8
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +16 -8
- package/dist/module.js +16 -8
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/RenderPipeline/MeshRenderData.d.ts +17 -0
- package/types/physics/PhysicsManager.d.ts +78 -0
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.30",
|
|
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.30"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.1.0-beta.30"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
}
|