@galacean/engine-design 1.5.14 → 1.6.0-alpha.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"types": "types/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@galacean/engine-math": "1.
|
|
20
|
+
"@galacean/engine-math": "1.6.0-alpha.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"b:types": "tsc"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ray, Vector3 } from "@galacean/engine-math";
|
|
1
|
+
import { Quaternion, Ray, Vector3 } from "@galacean/engine-math";
|
|
2
2
|
import { ICharacterController } from "./ICharacterController";
|
|
3
3
|
import { ICollider } from "./ICollider";
|
|
4
4
|
/**
|
|
@@ -39,11 +39,38 @@ export interface IPhysicsScene {
|
|
|
39
39
|
* Casts a ray through the Scene and returns the first hit.
|
|
40
40
|
* @param ray - The ray
|
|
41
41
|
* @param distance - The max distance the ray should check
|
|
42
|
-
* @param onRaycast - The raycast result callback which
|
|
42
|
+
* @param onRaycast - The raycast result callback which pre filter result
|
|
43
43
|
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
44
44
|
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
45
45
|
*/
|
|
46
46
|
raycast(ray: Ray, distance: number, onRaycast: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, point: Vector3, normal: Vector3) => void): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Casts a box through the scene and returns true if there is any hit.
|
|
49
|
+
*/
|
|
50
|
+
boxCast(center: Vector3, orientation: Quaternion, halfExtents: Vector3, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Casts a sphere through the scene and returns true if there is any hit.
|
|
53
|
+
*/
|
|
54
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Casts a capsule through the scene and returns true if there is any hit.
|
|
57
|
+
*/
|
|
58
|
+
capsuleCast(center: Vector3, radius: number, height: number, orientation: Quaternion, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get all colliders overlapping with a box.
|
|
61
|
+
* Returns an array of shape unique IDs.
|
|
62
|
+
*/
|
|
63
|
+
overlapBoxAll(center: Vector3, orientation: Quaternion, halfExtents: Vector3, onOverlap: (obj: number) => boolean): number[];
|
|
64
|
+
/**
|
|
65
|
+
* Get all colliders overlapping with a sphere.
|
|
66
|
+
* Returns an array of shape unique IDs.
|
|
67
|
+
*/
|
|
68
|
+
overlapSphereAll(center: Vector3, radius: number, onOverlap: (obj: number) => boolean): number[];
|
|
69
|
+
/**
|
|
70
|
+
* Get all colliders overlapping with a capsule.
|
|
71
|
+
* Returns an array of shape unique IDs.
|
|
72
|
+
*/
|
|
73
|
+
overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation: Quaternion, onOverlap: (obj: number) => boolean): number[];
|
|
47
74
|
/**
|
|
48
75
|
* Destroy the physics scene.
|
|
49
76
|
*/
|