@galacean/engine-design 1.5.14 → 1.6.0-alpha.1

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.5.14",
3
+ "version": "1.6.0-alpha.1",
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.5.14"
20
+ "@galacean/engine-math": "1.6.0-alpha.1"
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 prefilter result
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
  */
@@ -1,4 +1,5 @@
1
+ import { IPlatformShaderProgram } from "./IPlatformShaderProgram";
1
2
  export interface IPlatformPrimitive {
2
- draw(tech: any, subPrimitive: any): void;
3
+ draw(shaderProgram: IPlatformShaderProgram, subPrimitive: any): void;
3
4
  destroy(): void;
4
5
  }
@@ -0,0 +1,4 @@
1
+ export interface IPlatformShaderProgram {
2
+ readonly id: number;
3
+ readonly attributeLocation: Record<string, GLint>;
4
+ }
@@ -1,2 +1,3 @@
1
1
  export type { IHardwareRenderer } from "./IHardwareRenderer";
2
2
  export type { IPlatformPrimitive } from "./IPlatformPrimitive";
3
+ export type { IPlatformShaderProgram } from "./IPlatformShaderProgram";