@galacean/engine-physics-lite 0.9.0 → 1.0.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.
@@ -1,54 +1,58 @@
1
- import { IBoxColliderShape, ICapsuleColliderShape, ICharacterController, IDynamicCollider, IPhysicsManager, IPhysicsMaterial, IPlaneColliderShape, ISphereColliderShape, IStaticCollider, IFixedJoint, IHingeJoint, ISpringJoint } from "@galacean/engine-design";
1
+ import { IBoxColliderShape, ICapsuleColliderShape, ICharacterController, IDynamicCollider, IFixedJoint, IHingeJoint, IPhysics, IPhysicsManager, IPhysicsMaterial, IPlaneColliderShape, ISphereColliderShape, ISpringJoint, IStaticCollider } from "@galacean/engine-design";
2
2
  import { Quaternion, Vector3 } from "@galacean/engine";
3
- import { LitePhysicsMaterial } from "./LitePhysicsMaterial";
4
3
  import { LiteCollider } from "./LiteCollider";
5
- export declare class LitePhysics {
4
+ import { LitePhysicsMaterial } from "./LitePhysicsMaterial";
5
+ export declare class LitePhysics implements IPhysics {
6
+ /**
7
+ * {@inheritDoc IPhysics.initialize }
8
+ */
9
+ initialize(): Promise<void>;
6
10
  /**
7
11
  * {@inheritDoc IPhysics.createPhysicsManager }
8
12
  */
9
- static createPhysicsManager(onContactBegin?: (obj1: number, obj2: number) => void, onContactEnd?: (obj1: number, obj2: number) => void, onContactPersist?: (obj1: number, obj2: number) => void, onTriggerBegin?: (obj1: number, obj2: number) => void, onTriggerEnd?: (obj1: number, obj2: number) => void, onTriggerPersist?: (obj1: number, obj2: number) => void): IPhysicsManager;
13
+ createPhysicsManager(onContactBegin?: (obj1: number, obj2: number) => void, onContactEnd?: (obj1: number, obj2: number) => void, onContactPersist?: (obj1: number, obj2: number) => void, onTriggerBegin?: (obj1: number, obj2: number) => void, onTriggerEnd?: (obj1: number, obj2: number) => void, onTriggerPersist?: (obj1: number, obj2: number) => void): IPhysicsManager;
10
14
  /**
11
15
  * {@inheritDoc IPhysics.createStaticCollider }
12
16
  */
13
- static createStaticCollider(position: Vector3, rotation: Quaternion): IStaticCollider;
17
+ createStaticCollider(position: Vector3, rotation: Quaternion): IStaticCollider;
14
18
  /**
15
19
  * {@inheritDoc IPhysics.createDynamicCollider }
16
20
  */
17
- static createDynamicCollider(position: Vector3, rotation: Quaternion): IDynamicCollider;
21
+ createDynamicCollider(position: Vector3, rotation: Quaternion): IDynamicCollider;
18
22
  /**
19
23
  * {@inheritDoc IPhysics.createCharacterController }
20
24
  */
21
- static createCharacterController(): ICharacterController;
25
+ createCharacterController(): ICharacterController;
22
26
  /**
23
27
  * {@inheritDoc IPhysics.createPhysicsMaterial }
24
28
  */
25
- static createPhysicsMaterial(staticFriction: number, dynamicFriction: number, bounciness: number, frictionCombine: number, bounceCombine: number): IPhysicsMaterial;
29
+ createPhysicsMaterial(staticFriction: number, dynamicFriction: number, bounciness: number, frictionCombine: number, bounceCombine: number): IPhysicsMaterial;
26
30
  /**
27
31
  * {@inheritDoc IPhysics.createBoxColliderShape }
28
32
  */
29
- static createBoxColliderShape(uniqueID: number, size: Vector3, material: LitePhysicsMaterial): IBoxColliderShape;
33
+ createBoxColliderShape(uniqueID: number, size: Vector3, material: LitePhysicsMaterial): IBoxColliderShape;
30
34
  /**
31
35
  * {@inheritDoc IPhysics.createSphereColliderShape }
32
36
  */
33
- static createSphereColliderShape(uniqueID: number, radius: number, material: LitePhysicsMaterial): ISphereColliderShape;
37
+ createSphereColliderShape(uniqueID: number, radius: number, material: LitePhysicsMaterial): ISphereColliderShape;
34
38
  /**
35
39
  * {@inheritDoc IPhysics.createPlaneColliderShape }
36
40
  */
37
- static createPlaneColliderShape(uniqueID: number, material: LitePhysicsMaterial): IPlaneColliderShape;
41
+ createPlaneColliderShape(uniqueID: number, material: LitePhysicsMaterial): IPlaneColliderShape;
38
42
  /**
39
43
  * {@inheritDoc IPhysics.createCapsuleColliderShape }
40
44
  */
41
- static createCapsuleColliderShape(uniqueID: number, radius: number, height: number, material: LitePhysicsMaterial): ICapsuleColliderShape;
45
+ createCapsuleColliderShape(uniqueID: number, radius: number, height: number, material: LitePhysicsMaterial): ICapsuleColliderShape;
42
46
  /**
43
47
  * {@inheritDoc IPhysics.createFixedJoint }
44
48
  */
45
- static createFixedJoint(collider: LiteCollider): IFixedJoint;
49
+ createFixedJoint(collider: LiteCollider): IFixedJoint;
46
50
  /**
47
51
  * {@inheritDoc IPhysics.createHingeJoint }
48
52
  */
49
- static createHingeJoint(collider: LiteCollider): IHingeJoint;
53
+ createHingeJoint(collider: LiteCollider): IHingeJoint;
50
54
  /**
51
55
  * {@inheritDoc IPhysics.createSpringJoint }
52
56
  */
53
- static createSpringJoint(collider: LiteCollider): ISpringJoint;
57
+ createSpringJoint(collider: LiteCollider): ISpringJoint;
54
58
  }
@@ -1,9 +1,3 @@
1
- /**
2
- * Fastly remove an element from array.
3
- * @param array - Array
4
- * @param item - Element
5
- */
6
- export declare function removeFromArray(array: any[], item: any): boolean;
7
1
  /**
8
2
  * Used to update tags.
9
3
  */
@@ -1,5 +0,0 @@
1
- /**
2
- * Static interface implement decorator.
3
- * https://stackoverflow.com/questions/13955157/how-to-define-static-property-in-typescript-interface
4
- */
5
- export declare function StaticInterfaceImplement<T>(): <U extends T>(constructor: U) => void;