@galacean/engine-design 0.0.0-experimental-1.4-small-language.4 → 0.0.0-experimental-backup.3

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.
Files changed (57) hide show
  1. package/package.json +2 -2
  2. package/types/IClone.d.ts +0 -15
  3. package/types/index.d.ts +0 -6
  4. package/types/input/IInputOptions.d.ts +0 -21
  5. package/types/input/index.d.ts +0 -1
  6. package/types/physics/ICharacterController.d.ts +0 -44
  7. package/types/physics/ICollider.d.ts +0 -20
  8. package/types/physics/ICollision.d.ts +0 -36
  9. package/types/physics/IDynamicCollider.d.ts +0 -148
  10. package/types/physics/IPhysics.d.ts +0 -108
  11. package/types/physics/IPhysicsManager.d.ts +0 -5
  12. package/types/physics/IPhysicsMaterial.d.ts +0 -34
  13. package/types/physics/IPhysicsScene.d.ts +0 -51
  14. package/types/physics/IStaticCollider.d.ts +0 -19
  15. package/types/physics/index.d.ts +0 -11
  16. package/types/physics/joints/IFixedJoint.d.ts +0 -3
  17. package/types/physics/joints/IHingeJoint.d.ts +0 -55
  18. package/types/physics/joints/IJoint.d.ts +0 -53
  19. package/types/physics/joints/ISpringJoint.d.ts +0 -31
  20. package/types/physics/joints/index.d.ts +0 -4
  21. package/types/physics/shape/IBoxColliderShape.d.ts +0 -12
  22. package/types/physics/shape/ICapsuleColliderShape.d.ts +0 -21
  23. package/types/physics/shape/IColliderShape.d.ts +0 -48
  24. package/types/physics/shape/IPlaneColliderShape.d.ts +0 -6
  25. package/types/physics/shape/ISphereColliderShape.d.ts +0 -11
  26. package/types/physics/shape/index.d.ts +0 -5
  27. package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
  28. package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +0 -4
  29. package/types/renderingHardwareInterface/index.d.ts +0 -2
  30. package/types/shader-lab/IShaderLab.d.ts +0 -18
  31. package/types/shader-lab/IShaderProgramSource.d.ts +0 -4
  32. package/types/shader-lab/index.d.ts +0 -8
  33. package/types/shader-lab/shaderContent/IRenderStates.d.ts +0 -4
  34. package/types/shader-lab/shaderContent/IShaderContent.d.ts +0 -9
  35. package/types/shader-lab/shaderContent/IShaderPassContent.d.ts +0 -11
  36. package/types/shader-lab/shaderContent/IShaderPosition.d.ts +0 -3
  37. package/types/shader-lab/shaderContent/IStatement.d.ts +0 -8
  38. package/types/shader-lab/shaderContent/ISubShaderContent.d.ts +0 -10
  39. package/types/xr/IXRDevice.d.ts +0 -31
  40. package/types/xr/IXRFrame.d.ts +0 -13
  41. package/types/xr/IXRInputEvent.d.ts +0 -17
  42. package/types/xr/IXRPose.d.ts +0 -14
  43. package/types/xr/IXRSession.d.ts +0 -91
  44. package/types/xr/feature/IXRPlatformFeature.d.ts +0 -6
  45. package/types/xr/feature/trackable/IXRRequestTracking.d.ts +0 -10
  46. package/types/xr/feature/trackable/IXRTrackablePlatformFeature.d.ts +0 -35
  47. package/types/xr/feature/trackable/IXRTracked.d.ts +0 -12
  48. package/types/xr/feature/trackable/anchor/IXRRequestAnchor.d.ts +0 -7
  49. package/types/xr/feature/trackable/image/IXRReferenceImage.d.ts +0 -8
  50. package/types/xr/feature/trackable/image/IXRRequestImage.d.ts +0 -6
  51. package/types/xr/feature/trackable/image/IXRTrackedImage.d.ts +0 -8
  52. package/types/xr/feature/trackable/plane/IXRRequestPlane.d.ts +0 -5
  53. package/types/xr/feature/trackable/plane/IXRTrackedPlane.d.ts +0 -16
  54. package/types/xr/index.d.ts +0 -18
  55. package/types/xr/input/IXRCamera.d.ts +0 -11
  56. package/types/xr/input/IXRController.d.ts +0 -8
  57. package/types/xr/input/IXRInput.d.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-design",
3
- "version": "0.0.0-experimental-1.4-small-language.4",
3
+ "version": "0.0.0-experimental-backup.3",
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": "0.0.0-experimental-1.4-small-language.4"
20
+ "@galacean/engine-math": "0.0.0-experimental-backup.3"
21
21
  },
22
22
  "scripts": {
23
23
  "b:types": "tsc"
package/types/IClone.d.ts DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * Clone interface.
3
- */
4
- export interface IClone {
5
- /**
6
- * Clone and return object.
7
- * @returns Clone object
8
- */
9
- clone(): Object;
10
- /**
11
- * Clone to the target object.
12
- * @param target - Target object
13
- */
14
- cloneTo(target: Object): void;
15
- }
package/types/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export type { IClone } from "./IClone";
2
- export * from "./input/index";
3
- export * from "./physics/index";
4
- export * from "./renderingHardwareInterface/index";
5
- export * from "./shader-lab/index";
6
- export * from "./xr/index";
@@ -1,21 +0,0 @@
1
- /**
2
- * Options for the input.
3
- */
4
- export interface IInputOptions {
5
- /**
6
- * The target element of the pointer event, defaults is the current canvas.
7
- * @remarks
8
- * @remarks: When setting the pointer target you need to specify:
9
- * - Do not set window as target because window cannot listen to pointer leave event.
10
- * - On mobile, pointer move may trigger the default slide event, thereby removing the point from the screen, so in most cases you need to set HtmlElement.style.touchAction = "none".
11
- */
12
- pointerTarget?: Exclude<EventTarget, Window & typeof globalThis>;
13
- /**
14
- * The target element of the keyboard event, defaults is the window.
15
- * @remarks
16
- * If the type of listening target is `HtmlElement`, you need to set tabIndex to make the element focus.
17
- */
18
- keyboardTarget?: EventTarget;
19
- /** The target element of the wheel event, defaults is the current canvas. */
20
- wheelTarget?: EventTarget;
21
- }
@@ -1 +0,0 @@
1
- export type { IInputOptions } from "./IInputOptions";
@@ -1,44 +0,0 @@
1
- import { Vector3 } from "@galacean/engine-math";
2
- import { ICollider } from "./ICollider";
3
- /**
4
- * Base class for character controllers.
5
- */
6
- export interface ICharacterController extends ICollider {
7
- /**
8
- * Moves the character using a "collide-and-slide" algorithm.
9
- * @param disp Displacement vector
10
- * @param minDist The minimum travelled distance to consider.
11
- * @param elapsedTime Time elapsed since last call
12
- */
13
- move(disp: Vector3, minDist: number, elapsedTime: number): number;
14
- /**
15
- * Sets controller's world position.
16
- * @param position The new (center) position for the controller.
17
- */
18
- setWorldPosition(position: Vector3): void;
19
- /**
20
- * Retrieve the world position of the controller.
21
- * @param position The controller's center position
22
- */
23
- getWorldPosition(position: Vector3): void;
24
- /**
25
- * The step height.
26
- * @param offset The new step offset for the controller.
27
- */
28
- setStepOffset(offset: number): void;
29
- /**
30
- * Sets the non-walkable mode for the CCT.
31
- * @param flag The new value of the non-walkable mode.
32
- */
33
- setNonWalkableMode(flag: number): void;
34
- /**
35
- * Sets the 'up' direction.
36
- * @param up The up direction for the controller.
37
- */
38
- setUpDirection(up: Vector3): void;
39
- /**
40
- * Sets the slope limit in degrees.
41
- * @param slopeLimit The slope limit for the controller.
42
- */
43
- setSlopeLimit(slopeLimit: number): void;
44
- }
@@ -1,20 +0,0 @@
1
- import { IColliderShape } from "./shape";
2
- /**
3
- * Interface of physics collider.
4
- */
5
- export interface ICollider {
6
- /**
7
- * Add collider shape on collider.
8
- * @param shape - The collider shape attached
9
- */
10
- addShape(shape: IColliderShape): void;
11
- /**
12
- * Remove collider shape on collider.
13
- * @param shape - The collider shape attached
14
- */
15
- removeShape(shape: IColliderShape): void;
16
- /**
17
- * Deletes the collider.
18
- */
19
- destroy(): void;
20
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * Interface of collision.
3
- */
4
- export interface ICollision {
5
- /** The unique id of the first collider. */
6
- shape0Id: number;
7
- /** The unique id of the second collider. */
8
- shape1Id: number;
9
- /** Count of contact points. */
10
- contactCount: number;
11
- /** Get contact points. */
12
- getContacts(): VectorContactPairPoint;
13
- }
14
- interface VectorContactPairPoint {
15
- size(): number;
16
- get(index: number): IContactPoint;
17
- }
18
- interface IContactPoint {
19
- position: {
20
- x: number;
21
- y: number;
22
- z: number;
23
- };
24
- normal: {
25
- x: number;
26
- y: number;
27
- z: number;
28
- };
29
- impulse: {
30
- x: number;
31
- y: number;
32
- z: number;
33
- };
34
- separation: number;
35
- }
36
- export {};
@@ -1,148 +0,0 @@
1
- import { Quaternion, Vector3 } from "@galacean/engine-math";
2
- import { ICollider } from "./ICollider";
3
- /**
4
- * Interface of physics dynamic collider.
5
- */
6
- export interface IDynamicCollider extends ICollider {
7
- /**
8
- * Set global transform of collider.
9
- * @param position - The global position
10
- * @param rotation - The global rotation
11
- */
12
- setWorldTransform(position: Vector3, rotation: Quaternion): void;
13
- /**
14
- * Get global transform of collider.
15
- * @param outPosition - The global position
16
- * @param outRotation - The global rotation
17
- */
18
- getWorldTransform(outPosition: Vector3, outRotation: Quaternion): void;
19
- /**
20
- * Sets the linear damping coefficient.
21
- * @param value - Linear damping coefficient
22
- */
23
- setLinearDamping(value: number): void;
24
- /**
25
- * Sets the angular damping coefficient.
26
- * @param value - Angular damping coefficient
27
- */
28
- setAngularDamping(value: number): void;
29
- /**
30
- * Get the linear velocity of the actor.
31
- * @param out - The linear velocity of the actor
32
- */
33
- getLinearVelocity(out: Vector3): Vector3;
34
- /**
35
- * Sets the linear velocity of the actor.
36
- * @param value - New linear velocity of actor
37
- */
38
- setLinearVelocity(value: Vector3): void;
39
- /**
40
- * Get the angular velocity of the actor.
41
- * @param out - The angular velocity of the actor
42
- */
43
- getAngularVelocity(out: Vector3): Vector3;
44
- /**
45
- * Sets the angular velocity of the actor.
46
- * @param value - New angular velocity of actor
47
- */
48
- setAngularVelocity(value: Vector3): void;
49
- /**
50
- * Sets the mass of a dynamic actor.
51
- * @param value - New mass value for the actor
52
- */
53
- setMass(value: number): void;
54
- /**
55
- * Sets the center of mass relative to the actor.
56
- * @param value - Mass frame offset transform relative to the actor frame
57
- */
58
- setCenterOfMass(value: Vector3): void;
59
- /**
60
- * Gets the center of mass relative to the actor.
61
- * @param out - The center of mass of the actor
62
- */
63
- getCenterOfMass(out: Vector3): Vector3;
64
- /**
65
- * Sets the inertia tensor, using a parameter specified in mass space coordinates.
66
- * @param value - New mass space inertia tensor for the actor
67
- */
68
- setInertiaTensor(value: Vector3): void;
69
- /**
70
- * Gets the inertia tensor of the actor.
71
- * @param out - The mass space inertia tensor of the actor
72
- */
73
- getInertiaTensor(out: Vector3): Vector3;
74
- /**
75
- * Sets the mass of a dynamic actor and automatically updates its inertia tensor.
76
- * @param mass - New mass value for the actor
77
- * @remarks This differs from setMass() by automatically updating
78
- * the inertia tensor and center of mass based on the new mass value.
79
- */
80
- setMassAndUpdateInertia(mass: number): void;
81
- /**
82
- * Set the maximum angular velocity permitted for this actor.
83
- * @param value - Max allowable angular velocity for actor
84
- */
85
- setMaxAngularVelocity(value: number): void;
86
- /**
87
- * Sets the maximum depenetration velocity permitted to be introduced by the solver.
88
- * @param value - The maximum velocity to de-penetrate
89
- */
90
- setMaxDepenetrationVelocity(value: number): void;
91
- /**
92
- * Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.
93
- * @param value - Energy below which an actor may go to sleep
94
- */
95
- setSleepThreshold(value: number): void;
96
- /**
97
- * Sets the solver iteration counts for the body.
98
- * @param value - Number of position iterations the solver should perform for this body
99
- */
100
- setSolverIterations(value: number): void;
101
- /**
102
- * Sets the colliders' collision detection mode.
103
- * @param value - rigid body flag
104
- */
105
- setCollisionDetectionMode(value: number): void;
106
- /**
107
- * Whether the collider is affected by gravity.
108
- */
109
- setUseGravity(value: boolean): void;
110
- /**
111
- * Controls whether physics affects the dynamic collider.
112
- * @param value - is or not
113
- */
114
- setIsKinematic(value: boolean): void;
115
- /**
116
- * Raises or clears a particular rigid dynamic lock flag.
117
- * @param flags - the flag to raise(set) or clear
118
- */
119
- setConstraints(flags: number): void;
120
- /**
121
- * Apply a force to the dynamic collider.
122
- * @param force - The force make the collider move
123
- */
124
- addForce(force: Vector3): void;
125
- /**
126
- * Apply a torque to the dynamic collider.
127
- * @param torque - The force make the collider rotate
128
- */
129
- addTorque(torque: Vector3): void;
130
- /**
131
- * Moves kinematically controlled dynamic actors through the game world.
132
- * @param positionOrRotation - The desired position or rotation for the kinematic actor
133
- * @param rotation - The desired rotation for the kinematic actor
134
- */
135
- move(positionOrRotation: Vector3 | Quaternion, rotation?: Quaternion): void;
136
- /**
137
- * Forces a collider to sleep at least one frame.
138
- */
139
- sleep(): void;
140
- /**
141
- * Returns whether the collider is sleeping.
142
- */
143
- isSleeping(): boolean;
144
- /**
145
- * Forces a collider to wake up.
146
- */
147
- wakeUp(): void;
148
- }
@@ -1,108 +0,0 @@
1
- import { Quaternion, Vector3 } from "@galacean/engine-math";
2
- import { ICharacterController } from "./ICharacterController";
3
- import { ICollider } from "./ICollider";
4
- import { IDynamicCollider } from "./IDynamicCollider";
5
- import { IPhysicsManager } from "./IPhysicsManager";
6
- import { IPhysicsMaterial } from "./IPhysicsMaterial";
7
- import { IPhysicsScene } from "./IPhysicsScene";
8
- import { IStaticCollider } from "./IStaticCollider";
9
- import { IFixedJoint, IHingeJoint, ISpringJoint } from "./joints";
10
- import { IBoxColliderShape, ICapsuleColliderShape, IPlaneColliderShape, ISphereColliderShape } from "./shape";
11
- import { ICollision } from "./ICollision";
12
- /**
13
- * The interface of physics creation.
14
- */
15
- export interface IPhysics {
16
- /**
17
- * Initialize physics.
18
- * @returns A promise that will resolve when the physics is initialized
19
- */
20
- initialize(): Promise<void>;
21
- /**
22
- * Create physics manager.
23
- */
24
- createPhysicsManager(): IPhysicsManager;
25
- /**
26
- * Create physics scene.
27
- * @param physicsManager - The physics manager
28
- * @param onContactEnter - Function called when contact begin
29
- * @param onContactExit - Function called when contact end
30
- * @param onContactStay - Function called when contact stay
31
- * @param onTriggerEnter - Function called when trigger begin
32
- * @param onTriggerExit - Function called when trigger end
33
- * @param onTriggerStay - Function called when trigger stay
34
- */
35
- createPhysicsScene(physicsManager: IPhysicsManager, onContactEnter?: (collision: ICollision) => void, onContactExit?: (collision: ICollision) => void, onContactStay?: (collision: ICollision) => void, onTriggerEnter?: (obj1: number, obj2: number) => void, onTriggerExit?: (obj1: number, obj2: number) => void, onTriggerStay?: (obj1: number, obj2: number) => void): IPhysicsScene;
36
- /**
37
- * Create dynamic collider.
38
- * @param position - The global position
39
- * @param rotation - The global rotation
40
- */
41
- createDynamicCollider(position: Vector3, rotation: Quaternion): IDynamicCollider;
42
- /**
43
- * Create static collider.
44
- * @param position - The global position
45
- * @param rotation - The global rotation
46
- */
47
- createStaticCollider(position: Vector3, rotation: Quaternion): IStaticCollider;
48
- /**
49
- * Create character controller.
50
- */
51
- createCharacterController(): ICharacterController;
52
- /**
53
- * Create physics material.
54
- * @param staticFriction - Static friction
55
- * @param dynamicFriction - Dynamic friction
56
- * @param bounciness - Restitution
57
- * @param frictionCombine - The mode to combine the friction of collider
58
- * @param bounceCombine - The mode to combine the bounce of collider
59
- */
60
- createPhysicsMaterial(staticFriction: number, dynamicFriction: number, bounciness: number, frictionCombine: number, bounceCombine: number): IPhysicsMaterial;
61
- /**
62
- * Create box collider shape.
63
- * @param uniqueID - Shape unique id
64
- * @param size - Size of the box
65
- * @param material - The material of this shape
66
- */
67
- createBoxColliderShape(uniqueID: number, size: Vector3, material: IPhysicsMaterial): IBoxColliderShape;
68
- /**
69
- * Create sphere collider shape.
70
- * @param uniqueID - Shape unique id
71
- * @param radius - Radius of the sphere
72
- * @param material - The material of this shape
73
- */
74
- createSphereColliderShape(uniqueID: number, radius: number, material: IPhysicsMaterial): ISphereColliderShape;
75
- /**
76
- * Create plane collider shape.
77
- * @param uniqueID - Shape unique id
78
- * @param material - The material of this shape
79
- */
80
- createPlaneColliderShape(uniqueID: number, material: IPhysicsMaterial): IPlaneColliderShape;
81
- /**
82
- * Create capsule collider shape.
83
- * @param uniqueID - Shape unique id
84
- * @param radius - Radius of capsule
85
- * @param height - Height of capsule
86
- * @param material - The material of this shape
87
- */
88
- createCapsuleColliderShape(uniqueID: number, radius: number, height: number, material: IPhysicsMaterial): ICapsuleColliderShape;
89
- /**
90
- * Create fixed joint.
91
- * @param collider - Affector of joint
92
- */
93
- createFixedJoint(collider: ICollider): IFixedJoint;
94
- /**
95
- * Create hinge joint.
96
- * @param collider - Affector of joint
97
- */
98
- createHingeJoint(collider: ICollider): IHingeJoint;
99
- /**
100
- * Create spring joint
101
- * @param collider - Affector of joint
102
- */
103
- createSpringJoint(collider: ICollider): ISpringJoint;
104
- /**
105
- * Destroy physics scene.
106
- */
107
- destroy(): void;
108
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Interface for the physics manager.
3
- */
4
- export interface IPhysicsManager {
5
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Interface of physics material.
3
- */
4
- export interface IPhysicsMaterial {
5
- /**
6
- * Set the coefficient of bounciness.
7
- * @param value - The bounciness
8
- */
9
- setBounciness(value: number): void;
10
- /**
11
- * Set the coefficient of dynamic friction.
12
- * @param value - The dynamic friction
13
- */
14
- setDynamicFriction(value: number): void;
15
- /**
16
- * Set the coefficient of static friction.
17
- * @param value - The static friction
18
- */
19
- setStaticFriction(value: number): void;
20
- /**
21
- * Set the bounciness combine mode.
22
- * @param value - The combine mode
23
- */
24
- setBounceCombine(value: number): void;
25
- /**
26
- * Set the friction combine mode.
27
- * @param value - The combine mode
28
- */
29
- setFrictionCombine(value: number): void;
30
- /**
31
- * Decrements the reference count of a material and releases it if the new reference count is zero.
32
- */
33
- destroy(): void;
34
- }
@@ -1,51 +0,0 @@
1
- import { Ray, Vector3 } from "@galacean/engine-math";
2
- import { ICharacterController } from "./ICharacterController";
3
- import { ICollider } from "./ICollider";
4
- /**
5
- * Interface for physics manager.
6
- */
7
- export interface IPhysicsScene {
8
- /**
9
- * Set gravity.
10
- * @param gravity - Physics gravity
11
- */
12
- setGravity(gravity: Vector3): void;
13
- /**
14
- * Add ICollider into the manager.
15
- * @param collider - StaticCollider or DynamicCollider.
16
- */
17
- addCollider(collider: ICollider): void;
18
- /**
19
- * Remove ICollider.
20
- * @param collider - StaticCollider or DynamicCollider.
21
- */
22
- removeCollider(collider: ICollider): void;
23
- /**
24
- * Add ICharacterController into the manager.
25
- * @param characterController The Character Controller.
26
- */
27
- addCharacterController(characterController: ICharacterController): void;
28
- /**
29
- * Remove ICharacterController.
30
- * @param characterController The Character Controller.
31
- */
32
- removeCharacterController(characterController: ICharacterController): void;
33
- /**
34
- * Call on every frame to update pose of objects.
35
- * @param elapsedTime - Step time of update.
36
- */
37
- update(elapsedTime: number): void;
38
- /**
39
- * Casts a ray through the Scene and returns the first hit.
40
- * @param ray - The ray
41
- * @param distance - The max distance the ray should check
42
- * @param onRaycast - The raycast result callback which prefilter result
43
- * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
44
- * @returns Returns True if the ray intersects with a collider, otherwise false
45
- */
46
- raycast(ray: Ray, distance: number, onRaycast: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, point: Vector3, normal: Vector3) => void): boolean;
47
- /**
48
- * Destroy the physics scene.
49
- */
50
- destroy(): void;
51
- }
@@ -1,19 +0,0 @@
1
- import { Quaternion, Vector3 } from "@galacean/engine-math";
2
- import { ICollider } from "./ICollider";
3
- /**
4
- * Interface of physics static collider.
5
- */
6
- export interface IStaticCollider extends ICollider {
7
- /**
8
- * Set global transform of collider.
9
- * @param position - The global position
10
- * @param rotation - The global rotation
11
- */
12
- setWorldTransform(position: Vector3, rotation: Quaternion): void;
13
- /**
14
- * Get global transform of collider.
15
- * @param outPosition - The global position
16
- * @param outRotation - The global rotation
17
- */
18
- getWorldTransform(outPosition: Vector3, outRotation: Quaternion): void;
19
- }
@@ -1,11 +0,0 @@
1
- export type { ICharacterController } from "./ICharacterController";
2
- export type { ICollider } from "./ICollider";
3
- export type { IDynamicCollider } from "./IDynamicCollider";
4
- export type { IPhysics } from "./IPhysics";
5
- export type { IPhysicsMaterial } from "./IPhysicsMaterial";
6
- export type { IPhysicsScene } from "./IPhysicsScene";
7
- export type { IPhysicsManager } from "./IPhysicsManager";
8
- export type { IStaticCollider } from "./IStaticCollider";
9
- export type { ICollision } from "./ICollision";
10
- export * from "./joints/index";
11
- export * from "./shape/index";
@@ -1,3 +0,0 @@
1
- import { IJoint } from "./IJoint";
2
- export interface IFixedJoint extends IJoint {
3
- }
@@ -1,55 +0,0 @@
1
- import { IJoint } from "./IJoint";
2
- import { Vector3 } from "@galacean/engine-math";
3
- /**
4
- * A joint which behaves in a similar way to a hinge or axle.
5
- */
6
- export interface IHingeJoint extends IJoint {
7
- /**
8
- * The anchor rotation.
9
- */
10
- setAxis(value: Vector3): void;
11
- /**
12
- * The current angle in degrees of the joint relative to its rest position.
13
- */
14
- getAngle(): number;
15
- /**
16
- * The angular velocity of the joint in degrees per second.
17
- */
18
- getVelocity(): Readonly<number>;
19
- /**
20
- * Set a cone hard limit.
21
- * @param lowerLimit The lower angle of the limit
22
- * @param upperLimit The upper angle of the limit
23
- * @param contactDist The distance from the limit at which it becomes active. Default is the lesser of 0.1 radians, and 0.49 * the lower of the limit angles
24
- */
25
- setHardLimit(lowerLimit: number, upperLimit: number, contactDist: number): void;
26
- /**
27
- * Set a cone soft limit.
28
- * @param lowerLimit The lower angle of the limit
29
- * @param upperLimit The upper angle of the limit
30
- * @param stiffness the spring strength of the drive
31
- * @param damping the damping strength of the drive
32
- */
33
- setSoftLimit(lowerLimit: number, upperLimit: number, stiffness: number, damping: number): void;
34
- /**
35
- * set the target velocity for the drive model.
36
- * @param velocity the drive target velocity
37
- */
38
- setDriveVelocity(velocity: number): void;
39
- /**
40
- * sets the maximum torque the drive can exert.
41
- * @param limit the maximum torque
42
- */
43
- setDriveForceLimit(limit: number): void;
44
- /**
45
- * sets the gear ratio for the drive.
46
- * @param ratio the gear ratio
47
- */
48
- setDriveGearRatio(ratio: number): void;
49
- /**
50
- * sets a single flag specific to a Hinge Joint.
51
- * @param flag The flag to set or clear.
52
- * @param value the value to which to set the flag
53
- */
54
- setHingeJointFlag(flag: number, value: boolean): void;
55
- }
@@ -1,53 +0,0 @@
1
- import { Quaternion, Vector3 } from "@galacean/engine-math";
2
- import { ICollider } from "../ICollider";
3
- /**
4
- * a base interface providing common functionality for joints.
5
- */
6
- export interface IJoint {
7
- /**
8
- * The connected collider.
9
- */
10
- setConnectedCollider(value: ICollider): void;
11
- /**
12
- * The connected anchor position.
13
- * @remarks If connectedCollider is set, this anchor is relative offset, or the anchor is world position.
14
- */
15
- setConnectedAnchor(value: Vector3): void;
16
- /**
17
- * The anchor position.
18
- */
19
- setAnchor(value: Vector3): void;
20
- /**
21
- * The scale to apply to the inverse mass of collider1 for resolving this constraint.
22
- */
23
- setConnectedMassScale(value: number): void;
24
- /**
25
- * The rotation of the joint.
26
- * @param value The rotation of the joint.
27
- */
28
- setRotation(value: Quaternion): void;
29
- /**
30
- * The scale to apply to the inverse mass of collider0 for resolving this constraint.
31
- */
32
- setMassScale(value: number): void;
33
- /**
34
- * The scale to apply to the inverse inertia of collider1 for resolving this constraint.
35
- */
36
- setConnectedInertiaScale(value: number): void;
37
- /**
38
- * The scale to apply to the inverse inertia of collider0 for resolving this constraint.
39
- */
40
- setInertiaScale(value: number): void;
41
- /**
42
- * The maximum force the joint can apply before breaking.
43
- */
44
- setBreakForce(value: number): void;
45
- /**
46
- * The maximum torque the joint can apply before breaking.
47
- */
48
- setBreakTorque(value: number): void;
49
- /**
50
- * Destroy the joint.
51
- */
52
- destroy(): void;
53
- }