@gg-web-engine/rapier3d 0.0.24

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 (143) hide show
  1. package/README.md +17 -0
  2. package/dist/components/rapier-3d-rigid-body.component.d.ts +26 -0
  3. package/dist/components/rapier-3d-rigid-body.component.js +88 -0
  4. package/dist/components/rapier-3d-trigger.component.d.ts +17 -0
  5. package/dist/components/rapier-3d-trigger.component.js +41 -0
  6. package/dist/components/rapier-3d-world.component.d.ts +27 -0
  7. package/dist/components/rapier-3d-world.component.js +81 -0
  8. package/dist/index.d.ts +5 -0
  9. package/dist/index.js +6 -0
  10. package/dist/rapier-3d-factory.d.ts +22 -0
  11. package/dist/rapier-3d-factory.js +89 -0
  12. package/dist/rapier-3d-loader.d.ts +6 -0
  13. package/dist/rapier-3d-loader.js +7 -0
  14. package/etc/@dimforge/rapier3d/LICENSE +201 -0
  15. package/etc/@dimforge/rapier3d/README.md +33 -0
  16. package/etc/@dimforge/rapier3d/coarena.d.ts +15 -0
  17. package/etc/@dimforge/rapier3d/coarena.js +61 -0
  18. package/etc/@dimforge/rapier3d/coarena.js.map +1 -0
  19. package/etc/@dimforge/rapier3d/control/character_controller.d.ts +188 -0
  20. package/etc/@dimforge/rapier3d/control/character_controller.js +256 -0
  21. package/etc/@dimforge/rapier3d/control/character_controller.js.map +1 -0
  22. package/etc/@dimforge/rapier3d/control/index.d.ts +2 -0
  23. package/etc/@dimforge/rapier3d/control/index.js +5 -0
  24. package/etc/@dimforge/rapier3d/control/index.js.map +1 -0
  25. package/etc/@dimforge/rapier3d/control/ray_cast_vehicle_controller.d.ts +240 -0
  26. package/etc/@dimforge/rapier3d/control/ray_cast_vehicle_controller.js +362 -0
  27. package/etc/@dimforge/rapier3d/control/ray_cast_vehicle_controller.js.map +1 -0
  28. package/etc/@dimforge/rapier3d/dynamics/ccd_solver.d.ts +15 -0
  29. package/etc/@dimforge/rapier3d/dynamics/ccd_solver.js +22 -0
  30. package/etc/@dimforge/rapier3d/dynamics/ccd_solver.js.map +1 -0
  31. package/etc/@dimforge/rapier3d/dynamics/coefficient_combine_rule.d.ts +13 -0
  32. package/etc/@dimforge/rapier3d/dynamics/coefficient_combine_rule.js +15 -0
  33. package/etc/@dimforge/rapier3d/dynamics/coefficient_combine_rule.js.map +1 -0
  34. package/etc/@dimforge/rapier3d/dynamics/impulse_joint.d.ts +204 -0
  35. package/etc/@dimforge/rapier3d/dynamics/impulse_joint.js +335 -0
  36. package/etc/@dimforge/rapier3d/dynamics/impulse_joint.js.map +1 -0
  37. package/etc/@dimforge/rapier3d/dynamics/impulse_joint_set.d.ts +79 -0
  38. package/etc/@dimforge/rapier3d/dynamics/impulse_joint_set.js +123 -0
  39. package/etc/@dimforge/rapier3d/dynamics/impulse_joint_set.js.map +1 -0
  40. package/etc/@dimforge/rapier3d/dynamics/index.d.ts +10 -0
  41. package/etc/@dimforge/rapier3d/dynamics/index.js +11 -0
  42. package/etc/@dimforge/rapier3d/dynamics/index.js.map +1 -0
  43. package/etc/@dimforge/rapier3d/dynamics/integration_parameters.d.ts +55 -0
  44. package/etc/@dimforge/rapier3d/dynamics/integration_parameters.js +98 -0
  45. package/etc/@dimforge/rapier3d/dynamics/integration_parameters.js.map +1 -0
  46. package/etc/@dimforge/rapier3d/dynamics/island_manager.d.ts +24 -0
  47. package/etc/@dimforge/rapier3d/dynamics/island_manager.js +32 -0
  48. package/etc/@dimforge/rapier3d/dynamics/island_manager.js.map +1 -0
  49. package/etc/@dimforge/rapier3d/dynamics/multibody_joint.d.ts +42 -0
  50. package/etc/@dimforge/rapier3d/dynamics/multibody_joint.js +124 -0
  51. package/etc/@dimforge/rapier3d/dynamics/multibody_joint.js.map +1 -0
  52. package/etc/@dimforge/rapier3d/dynamics/multibody_joint_set.d.ts +76 -0
  53. package/etc/@dimforge/rapier3d/dynamics/multibody_joint_set.js +118 -0
  54. package/etc/@dimforge/rapier3d/dynamics/multibody_joint_set.js.map +1 -0
  55. package/etc/@dimforge/rapier3d/dynamics/rigid_body.d.ts +679 -0
  56. package/etc/@dimforge/rapier3d/dynamics/rigid_body.js +960 -0
  57. package/etc/@dimforge/rapier3d/dynamics/rigid_body.js.map +1 -0
  58. package/etc/@dimforge/rapier3d/dynamics/rigid_body_set.d.ts +78 -0
  59. package/etc/@dimforge/rapier3d/dynamics/rigid_body_set.js +147 -0
  60. package/etc/@dimforge/rapier3d/dynamics/rigid_body_set.js.map +1 -0
  61. package/etc/@dimforge/rapier3d/exports.d.ts +7 -0
  62. package/etc/@dimforge/rapier3d/exports.js +11 -0
  63. package/etc/@dimforge/rapier3d/exports.js.map +1 -0
  64. package/etc/@dimforge/rapier3d/geometry/broad_phase.d.ts +15 -0
  65. package/etc/@dimforge/rapier3d/geometry/broad_phase.js +22 -0
  66. package/etc/@dimforge/rapier3d/geometry/broad_phase.js.map +1 -0
  67. package/etc/@dimforge/rapier3d/geometry/collider.d.ts +763 -0
  68. package/etc/@dimforge/rapier3d/geometry/collider.js +1140 -0
  69. package/etc/@dimforge/rapier3d/geometry/collider.js.map +1 -0
  70. package/etc/@dimforge/rapier3d/geometry/collider_set.d.ts +72 -0
  71. package/etc/@dimforge/rapier3d/geometry/collider_set.js +144 -0
  72. package/etc/@dimforge/rapier3d/geometry/collider_set.js.map +1 -0
  73. package/etc/@dimforge/rapier3d/geometry/contact.d.ts +31 -0
  74. package/etc/@dimforge/rapier3d/geometry/contact.js +21 -0
  75. package/etc/@dimforge/rapier3d/geometry/contact.js.map +1 -0
  76. package/etc/@dimforge/rapier3d/geometry/feature.d.ts +6 -0
  77. package/etc/@dimforge/rapier3d/geometry/feature.js +10 -0
  78. package/etc/@dimforge/rapier3d/geometry/feature.js.map +1 -0
  79. package/etc/@dimforge/rapier3d/geometry/index.d.ts +11 -0
  80. package/etc/@dimforge/rapier3d/geometry/index.js +12 -0
  81. package/etc/@dimforge/rapier3d/geometry/index.js.map +1 -0
  82. package/etc/@dimforge/rapier3d/geometry/interaction_groups.d.ts +18 -0
  83. package/etc/@dimforge/rapier3d/geometry/interaction_groups.js +2 -0
  84. package/etc/@dimforge/rapier3d/geometry/interaction_groups.js.map +1 -0
  85. package/etc/@dimforge/rapier3d/geometry/narrow_phase.d.ts +71 -0
  86. package/etc/@dimforge/rapier3d/geometry/narrow_phase.js +148 -0
  87. package/etc/@dimforge/rapier3d/geometry/narrow_phase.js.map +1 -0
  88. package/etc/@dimforge/rapier3d/geometry/point.d.ts +47 -0
  89. package/etc/@dimforge/rapier3d/geometry/point.js +48 -0
  90. package/etc/@dimforge/rapier3d/geometry/point.js.map +1 -0
  91. package/etc/@dimforge/rapier3d/geometry/ray.d.ts +97 -0
  92. package/etc/@dimforge/rapier3d/geometry/ray.js +100 -0
  93. package/etc/@dimforge/rapier3d/geometry/ray.js.map +1 -0
  94. package/etc/@dimforge/rapier3d/geometry/shape.d.ts +489 -0
  95. package/etc/@dimforge/rapier3d/geometry/shape.js +686 -0
  96. package/etc/@dimforge/rapier3d/geometry/shape.js.map +1 -0
  97. package/etc/@dimforge/rapier3d/geometry/toi.d.ts +46 -0
  98. package/etc/@dimforge/rapier3d/geometry/toi.js +37 -0
  99. package/etc/@dimforge/rapier3d/geometry/toi.js.map +1 -0
  100. package/etc/@dimforge/rapier3d/init.d.ts +1 -0
  101. package/etc/@dimforge/rapier3d/init.js +2 -0
  102. package/etc/@dimforge/rapier3d/init.js.map +1 -0
  103. package/etc/@dimforge/rapier3d/math.d.ts +94 -0
  104. package/etc/@dimforge/rapier3d/math.js +138 -0
  105. package/etc/@dimforge/rapier3d/math.js.map +1 -0
  106. package/etc/@dimforge/rapier3d/package.json +33 -0
  107. package/etc/@dimforge/rapier3d/pipeline/debug_render_pipeline.d.ts +39 -0
  108. package/etc/@dimforge/rapier3d/pipeline/debug_render_pipeline.js +38 -0
  109. package/etc/@dimforge/rapier3d/pipeline/debug_render_pipeline.js.map +1 -0
  110. package/etc/@dimforge/rapier3d/pipeline/event_queue.d.ts +101 -0
  111. package/etc/@dimforge/rapier3d/pipeline/event_queue.js +135 -0
  112. package/etc/@dimforge/rapier3d/pipeline/event_queue.js.map +1 -0
  113. package/etc/@dimforge/rapier3d/pipeline/index.d.ts +7 -0
  114. package/etc/@dimforge/rapier3d/pipeline/index.js +8 -0
  115. package/etc/@dimforge/rapier3d/pipeline/index.js.map +1 -0
  116. package/etc/@dimforge/rapier3d/pipeline/physics_hooks.d.ts +39 -0
  117. package/etc/@dimforge/rapier3d/pipeline/physics_hooks.js +13 -0
  118. package/etc/@dimforge/rapier3d/pipeline/physics_hooks.js.map +1 -0
  119. package/etc/@dimforge/rapier3d/pipeline/physics_pipeline.d.ts +12 -0
  120. package/etc/@dimforge/rapier3d/pipeline/physics_pipeline.js +24 -0
  121. package/etc/@dimforge/rapier3d/pipeline/physics_pipeline.js.map +1 -0
  122. package/etc/@dimforge/rapier3d/pipeline/query_pipeline.d.ts +190 -0
  123. package/etc/@dimforge/rapier3d/pipeline/query_pipeline.js +271 -0
  124. package/etc/@dimforge/rapier3d/pipeline/query_pipeline.js.map +1 -0
  125. package/etc/@dimforge/rapier3d/pipeline/serialization_pipeline.d.ts +37 -0
  126. package/etc/@dimforge/rapier3d/pipeline/serialization_pipeline.js +49 -0
  127. package/etc/@dimforge/rapier3d/pipeline/serialization_pipeline.js.map +1 -0
  128. package/etc/@dimforge/rapier3d/pipeline/world.d.ts +419 -0
  129. package/etc/@dimforge/rapier3d/pipeline/world.js +581 -0
  130. package/etc/@dimforge/rapier3d/pipeline/world.js.map +1 -0
  131. package/etc/@dimforge/rapier3d/rapier.d.ts +3 -0
  132. package/etc/@dimforge/rapier3d/rapier.js +4 -0
  133. package/etc/@dimforge/rapier3d/rapier.js.map +1 -0
  134. package/etc/@dimforge/rapier3d/rapier_wasm3d.d.ts +2921 -0
  135. package/etc/@dimforge/rapier3d/rapier_wasm3d.js +2 -0
  136. package/etc/@dimforge/rapier3d/rapier_wasm3d_bg.js +5585 -0
  137. package/etc/@dimforge/rapier3d/rapier_wasm3d_bg.wasm +0 -0
  138. package/etc/@dimforge/rapier3d/rapier_wasm3d_bg.wasm.d.ts +486 -0
  139. package/etc/@dimforge/rapier3d/raw.d.ts +1 -0
  140. package/etc/@dimforge/rapier3d/raw.js +2 -0
  141. package/etc/@dimforge/rapier3d/raw.js.map +1 -0
  142. package/package.json +43 -0
  143. package/tsconfig.json +8 -0
@@ -0,0 +1,33 @@
1
+ <p align="center">
2
+ <img src="https://www.rapier.rs/img/rapier_logo_color_textpath_dark.svg" alt="crates.io">
3
+ </p>
4
+ <p align="center">
5
+ <a href="https://discord.gg/vt9DJSW">
6
+ <img src="https://img.shields.io/discord/507548572338880513.svg?logo=discord&colorB=7289DA">
7
+ </a>
8
+ <a href="https://github.com/dimforge/rapier.js/actions">
9
+ <img src="https://github.com/dimforge/rapier.js/workflows/build/badge.svg" alt="Build status">
10
+ </a>
11
+ <a href="https://crates.io/crates/rapier3d">
12
+ <img src="https://meritbadge.herokuapp.com/rapier3d?style=flat-square" alt="crates.io">
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/@dimforge/rapier3d">
15
+ <img src="https://badge.fury.io/js/%40dimforge%2Frapier3d.svg" alt="npm version">
16
+ </a>
17
+ <a href="https://opensource.org/licenses/Apache-2.0">
18
+ <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg">
19
+ </a>
20
+ </p>
21
+ <p align = "center">
22
+ <strong>
23
+ <a href="https://rapier.rs">Website</a> | <a href="https://rapier.rs/docs/">Documentation</a>
24
+ </p>
25
+
26
+ ---
27
+
28
+ <p align = "center">
29
+ <b>3D physics engine</b>
30
+ <i>for the JavaScript programming language (official bindings).</i>
31
+ </p>
32
+
33
+ ---
@@ -0,0 +1,15 @@
1
+ export declare class Coarena<T> {
2
+ fconv: Float64Array;
3
+ uconv: Uint32Array;
4
+ data: Array<T>;
5
+ size: number;
6
+ constructor();
7
+ set(handle: number, data: T): void;
8
+ len(): number;
9
+ delete(handle: number): void;
10
+ clear(): void;
11
+ get(handle: number): T | null;
12
+ forEach(f: (elt: T) => void): void;
13
+ getAll(): Array<T>;
14
+ private index;
15
+ }
@@ -0,0 +1,61 @@
1
+ export class Coarena {
2
+ constructor() {
3
+ this.fconv = new Float64Array(1);
4
+ this.uconv = new Uint32Array(this.fconv.buffer);
5
+ this.data = new Array();
6
+ this.size = 0;
7
+ }
8
+ set(handle, data) {
9
+ let i = this.index(handle);
10
+ while (this.data.length <= i) {
11
+ this.data.push(null);
12
+ }
13
+ if (this.data[i] == null)
14
+ this.size += 1;
15
+ this.data[i] = data;
16
+ }
17
+ len() {
18
+ return this.size;
19
+ }
20
+ delete(handle) {
21
+ let i = this.index(handle);
22
+ if (i < this.data.length) {
23
+ if (this.data[i] != null)
24
+ this.size -= 1;
25
+ this.data[i] = null;
26
+ }
27
+ }
28
+ clear() {
29
+ this.data = new Array();
30
+ }
31
+ get(handle) {
32
+ let i = this.index(handle);
33
+ if (i < this.data.length) {
34
+ return this.data[i];
35
+ }
36
+ else {
37
+ return null;
38
+ }
39
+ }
40
+ forEach(f) {
41
+ for (const elt of this.data) {
42
+ if (elt != null)
43
+ f(elt);
44
+ }
45
+ }
46
+ getAll() {
47
+ return this.data.filter((elt) => elt != null);
48
+ }
49
+ index(handle) {
50
+ /// Extracts the index part of a handle (the lower 32 bits).
51
+ /// This is done by first injecting the handle into an Float64Array
52
+ /// which is itself injected into an Uint32Array (at construction time).
53
+ /// The 0-th value of the Uint32Array will become the `number` integer
54
+ /// representation of the lower 32 bits.
55
+ /// Also `this.uconv[1]` then contains the generation number as a `number`,
56
+ /// which we don’t really need.
57
+ this.fconv[0] = handle;
58
+ return this.uconv[0];
59
+ }
60
+ }
61
+ //# sourceMappingURL=coarena.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coarena.js","sourceRoot":"","sources":["src/coarena.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAMhB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;QACjC,I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AAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACvB;aAAM;YACH,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAEM,OAAO,CAAC,CAAmB;QAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE;YACzB,IAAI,GAAG,IAAI,IAAI;gBAAE,CAAC,CAAC,GAAG,CAAC,CAAC;SAC3B;IACL,CAAC;IAEM,MAAM;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;IAClD,CAAC;IAEO,KAAK,CAAC,MAAc;QACxB,4DAA4D;QAC5D,mEAAmE;QACnE,wEAAwE;QACxE,sEAAsE;QACtE,wCAAwC;QACxC,2EAA2E;QAC3E,+BAA+B;QAC/B,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;CACJ"}
@@ -0,0 +1,188 @@
1
+ import { Vector } from "../math";
2
+ import { Collider, ColliderSet, InteractionGroups } from "../geometry";
3
+ import { QueryFilterFlags, QueryPipeline } from "../pipeline";
4
+ import { IntegrationParameters, RigidBodySet } from "../dynamics";
5
+ /**
6
+ * A collision between the character and an obstacle hit on its path.
7
+ */
8
+ export declare class CharacterCollision {
9
+ /** The collider involved in the collision. Null if the collider no longer exists in the physics world. */
10
+ collider: Collider | null;
11
+ /** The translation delta applied to the character before this collision took place. */
12
+ translationDeltaApplied: Vector;
13
+ /** The translation delta the character would move after this collision if there is no other obstacles. */
14
+ translationDeltaRemaining: Vector;
15
+ /** The time-of-impact between the character and the obstacles. */
16
+ toi: number;
17
+ /** The world-space contact point on the collider when the collision happens. */
18
+ witness1: Vector;
19
+ /** The local-space contact point on the character when the collision happens. */
20
+ witness2: Vector;
21
+ /** The world-space outward contact normal on the collider when the collision happens. */
22
+ normal1: Vector;
23
+ /** The local-space outward contact normal on the character when the collision happens. */
24
+ normal2: Vector;
25
+ }
26
+ /**
27
+ * A character controller for controlling kinematic bodies and parentless colliders by hitting
28
+ * and sliding against obstacles.
29
+ */
30
+ export declare class KinematicCharacterController {
31
+ private raw;
32
+ private rawCharacterCollision;
33
+ private params;
34
+ private bodies;
35
+ private colliders;
36
+ private queries;
37
+ private _applyImpulsesToDynamicBodies;
38
+ private _characterMass;
39
+ constructor(offset: number, params: IntegrationParameters, bodies: RigidBodySet, colliders: ColliderSet, queries: QueryPipeline);
40
+ /** @internal */
41
+ free(): void;
42
+ /**
43
+ * The direction that goes "up". Used to determine where the floor is, and the floor’s angle.
44
+ */
45
+ up(): Vector;
46
+ /**
47
+ * Sets the direction that goes "up". Used to determine where the floor is, and the floor’s angle.
48
+ */
49
+ setUp(vector: Vector): void;
50
+ applyImpulsesToDynamicBodies(): boolean;
51
+ setApplyImpulsesToDynamicBodies(enabled: boolean): void;
52
+ /**
53
+ * Returns the custom value of the character mass, if it was set by `this.setCharacterMass`.
54
+ */
55
+ characterMass(): number | null;
56
+ /**
57
+ * Set the mass of the character to be used for impulse resolution if `self.applyImpulsesToDynamicBodies`
58
+ * is set to `true`.
59
+ *
60
+ * If no character mass is set explicitly (or if it is set to `null`) it is automatically assumed to be equal
61
+ * to the mass of the rigid-body the character collider is attached to; or equal to 0 if the character collider
62
+ * isn’t attached to any rigid-body.
63
+ *
64
+ * @param mass - The mass to set.
65
+ */
66
+ setCharacterMass(mass: number | null): void;
67
+ /**
68
+ * A small gap to preserve between the character and its surroundings.
69
+ *
70
+ * This value should not be too large to avoid visual artifacts, but shouldn’t be too small
71
+ * (must not be zero) to improve numerical stability of the character controller.
72
+ */
73
+ offset(): number;
74
+ /**
75
+ * Sets a small gap to preserve between the character and its surroundings.
76
+ *
77
+ * This value should not be too large to avoid visual artifacts, but shouldn’t be too small
78
+ * (must not be zero) to improve numerical stability of the character controller.
79
+ */
80
+ setOffset(value: number): void;
81
+ /**
82
+ * Is sliding against obstacles enabled?
83
+ */
84
+ slideEnabled(): boolean;
85
+ /**
86
+ * Enable or disable sliding against obstacles.
87
+ */
88
+ setSlideEnabled(enabled: boolean): void;
89
+ /**
90
+ * The maximum step height a character can automatically step over.
91
+ */
92
+ autostepMaxHeight(): number | null;
93
+ /**
94
+ * The minimum width of free space that must be available after stepping on a stair.
95
+ */
96
+ autostepMinWidth(): number | null;
97
+ /**
98
+ * Can the character automatically step over dynamic bodies too?
99
+ */
100
+ autostepIncludesDynamicBodies(): boolean | null;
101
+ /**
102
+ * Is automatically stepping over small objects enabled?
103
+ */
104
+ autostepEnabled(): boolean;
105
+ /**
106
+ * Enabled automatically stepping over small objects.
107
+ *
108
+ * @param maxHeight - The maximum step height a character can automatically step over.
109
+ * @param minWidth - The minimum width of free space that must be available after stepping on a stair.
110
+ * @param includeDynamicBodies - Can the character automatically step over dynamic bodies too?
111
+ */
112
+ enableAutostep(maxHeight: number, minWidth: number, includeDynamicBodies: boolean): void;
113
+ /**
114
+ * Disable automatically stepping over small objects.
115
+ */
116
+ disableAutostep(): void;
117
+ /**
118
+ * The maximum angle (radians) between the floor’s normal and the `up` vector that the
119
+ * character is able to climb.
120
+ */
121
+ maxSlopeClimbAngle(): number;
122
+ /**
123
+ * Sets the maximum angle (radians) between the floor’s normal and the `up` vector that the
124
+ * character is able to climb.
125
+ */
126
+ setMaxSlopeClimbAngle(angle: number): void;
127
+ /**
128
+ * The minimum angle (radians) between the floor’s normal and the `up` vector before the
129
+ * character starts to slide down automatically.
130
+ */
131
+ minSlopeSlideAngle(): number;
132
+ /**
133
+ * Sets the minimum angle (radians) between the floor’s normal and the `up` vector before the
134
+ * character starts to slide down automatically.
135
+ */
136
+ setMinSlopeSlideAngle(angle: number): void;
137
+ /**
138
+ * If snap-to-ground is enabled, should the character be automatically snapped to the ground if
139
+ * the distance between the ground and its feet are smaller than the specified threshold?
140
+ */
141
+ snapToGroundDistance(): number | null;
142
+ /**
143
+ * Enables automatically snapping the character to the ground if the distance between
144
+ * the ground and its feet are smaller than the specified threshold.
145
+ */
146
+ enableSnapToGround(distance: number): void;
147
+ /**
148
+ * Disables automatically snapping the character to the ground.
149
+ */
150
+ disableSnapToGround(): void;
151
+ /**
152
+ * Is automatically snapping the character to the ground enabled?
153
+ */
154
+ snapToGroundEnabled(): boolean;
155
+ /**
156
+ * Computes the movement the given collider is able to execute after hitting and sliding on obstacles.
157
+ *
158
+ * @param collider - The collider to move.
159
+ * @param desiredTranslationDelta - The desired collider movement.
160
+ * @param filterFlags - Flags for excluding whole subsets of colliders from the obstacles taken into account.
161
+ * @param filterGroups - Groups for excluding colliders with incompatible collision groups from the obstacles
162
+ * taken into account.
163
+ * @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the
164
+ * obstacles taken into account.
165
+ */
166
+ computeColliderMovement(collider: Collider, desiredTranslationDelta: Vector, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterPredicate?: (collider: Collider) => boolean): void;
167
+ /**
168
+ * The movement computed by the last call to `this.computeColliderMovement`.
169
+ */
170
+ computedMovement(): Vector;
171
+ /**
172
+ * The result of ground detection computed by the last call to `this.computeColliderMovement`.
173
+ */
174
+ computedGrounded(): boolean;
175
+ /**
176
+ * The number of collisions against obstacles detected along the path of the last call
177
+ * to `this.computeColliderMovement`.
178
+ */
179
+ numComputedCollisions(): number;
180
+ /**
181
+ * Returns the collision against one of the obstacles detected along the path of the last
182
+ * call to `this.computeColliderMovement`.
183
+ *
184
+ * @param i - The i-th collision will be returned.
185
+ * @param out - If this argument is set, it will be filled with the collision information.
186
+ */
187
+ computedCollision(i: number, out?: CharacterCollision): CharacterCollision | null;
188
+ }
@@ -0,0 +1,256 @@
1
+ import { RawKinematicCharacterController, RawCharacterCollision } from "../raw";
2
+ import { VectorOps } from "../math";
3
+ /**
4
+ * A collision between the character and an obstacle hit on its path.
5
+ */
6
+ export class CharacterCollision {
7
+ }
8
+ /**
9
+ * A character controller for controlling kinematic bodies and parentless colliders by hitting
10
+ * and sliding against obstacles.
11
+ */
12
+ export class KinematicCharacterController {
13
+ constructor(offset, params, bodies, colliders, queries) {
14
+ this.params = params;
15
+ this.bodies = bodies;
16
+ this.colliders = colliders;
17
+ this.queries = queries;
18
+ this.raw = new RawKinematicCharacterController(offset);
19
+ this.rawCharacterCollision = new RawCharacterCollision();
20
+ this._applyImpulsesToDynamicBodies = false;
21
+ this._characterMass = null;
22
+ }
23
+ /** @internal */
24
+ free() {
25
+ if (!!this.raw) {
26
+ this.raw.free();
27
+ this.rawCharacterCollision.free();
28
+ }
29
+ this.raw = undefined;
30
+ this.rawCharacterCollision = undefined;
31
+ }
32
+ /**
33
+ * The direction that goes "up". Used to determine where the floor is, and the floor’s angle.
34
+ */
35
+ up() {
36
+ return this.raw.up();
37
+ }
38
+ /**
39
+ * Sets the direction that goes "up". Used to determine where the floor is, and the floor’s angle.
40
+ */
41
+ setUp(vector) {
42
+ let rawVect = VectorOps.intoRaw(vector);
43
+ return this.raw.setUp(rawVect);
44
+ rawVect.free();
45
+ }
46
+ applyImpulsesToDynamicBodies() {
47
+ return this._applyImpulsesToDynamicBodies;
48
+ }
49
+ setApplyImpulsesToDynamicBodies(enabled) {
50
+ this._applyImpulsesToDynamicBodies = enabled;
51
+ }
52
+ /**
53
+ * Returns the custom value of the character mass, if it was set by `this.setCharacterMass`.
54
+ */
55
+ characterMass() {
56
+ return this._characterMass;
57
+ }
58
+ /**
59
+ * Set the mass of the character to be used for impulse resolution if `self.applyImpulsesToDynamicBodies`
60
+ * is set to `true`.
61
+ *
62
+ * If no character mass is set explicitly (or if it is set to `null`) it is automatically assumed to be equal
63
+ * to the mass of the rigid-body the character collider is attached to; or equal to 0 if the character collider
64
+ * isn’t attached to any rigid-body.
65
+ *
66
+ * @param mass - The mass to set.
67
+ */
68
+ setCharacterMass(mass) {
69
+ this._characterMass = mass;
70
+ }
71
+ /**
72
+ * A small gap to preserve between the character and its surroundings.
73
+ *
74
+ * This value should not be too large to avoid visual artifacts, but shouldn’t be too small
75
+ * (must not be zero) to improve numerical stability of the character controller.
76
+ */
77
+ offset() {
78
+ return this.raw.offset();
79
+ }
80
+ /**
81
+ * Sets a small gap to preserve between the character and its surroundings.
82
+ *
83
+ * This value should not be too large to avoid visual artifacts, but shouldn’t be too small
84
+ * (must not be zero) to improve numerical stability of the character controller.
85
+ */
86
+ setOffset(value) {
87
+ this.raw.setOffset(value);
88
+ }
89
+ /**
90
+ * Is sliding against obstacles enabled?
91
+ */
92
+ slideEnabled() {
93
+ return this.raw.slideEnabled();
94
+ }
95
+ /**
96
+ * Enable or disable sliding against obstacles.
97
+ */
98
+ setSlideEnabled(enabled) {
99
+ this.raw.setSlideEnabled(enabled);
100
+ }
101
+ /**
102
+ * The maximum step height a character can automatically step over.
103
+ */
104
+ autostepMaxHeight() {
105
+ return this.raw.autostepMaxHeight();
106
+ }
107
+ /**
108
+ * The minimum width of free space that must be available after stepping on a stair.
109
+ */
110
+ autostepMinWidth() {
111
+ return this.raw.autostepMinWidth();
112
+ }
113
+ /**
114
+ * Can the character automatically step over dynamic bodies too?
115
+ */
116
+ autostepIncludesDynamicBodies() {
117
+ return this.raw.autostepIncludesDynamicBodies();
118
+ }
119
+ /**
120
+ * Is automatically stepping over small objects enabled?
121
+ */
122
+ autostepEnabled() {
123
+ return this.raw.autostepEnabled();
124
+ }
125
+ /**
126
+ * Enabled automatically stepping over small objects.
127
+ *
128
+ * @param maxHeight - The maximum step height a character can automatically step over.
129
+ * @param minWidth - The minimum width of free space that must be available after stepping on a stair.
130
+ * @param includeDynamicBodies - Can the character automatically step over dynamic bodies too?
131
+ */
132
+ enableAutostep(maxHeight, minWidth, includeDynamicBodies) {
133
+ this.raw.enableAutostep(maxHeight, minWidth, includeDynamicBodies);
134
+ }
135
+ /**
136
+ * Disable automatically stepping over small objects.
137
+ */
138
+ disableAutostep() {
139
+ return this.raw.disableAutostep();
140
+ }
141
+ /**
142
+ * The maximum angle (radians) between the floor’s normal and the `up` vector that the
143
+ * character is able to climb.
144
+ */
145
+ maxSlopeClimbAngle() {
146
+ return this.raw.maxSlopeClimbAngle();
147
+ }
148
+ /**
149
+ * Sets the maximum angle (radians) between the floor’s normal and the `up` vector that the
150
+ * character is able to climb.
151
+ */
152
+ setMaxSlopeClimbAngle(angle) {
153
+ this.raw.setMaxSlopeClimbAngle(angle);
154
+ }
155
+ /**
156
+ * The minimum angle (radians) between the floor’s normal and the `up` vector before the
157
+ * character starts to slide down automatically.
158
+ */
159
+ minSlopeSlideAngle() {
160
+ return this.raw.minSlopeSlideAngle();
161
+ }
162
+ /**
163
+ * Sets the minimum angle (radians) between the floor’s normal and the `up` vector before the
164
+ * character starts to slide down automatically.
165
+ */
166
+ setMinSlopeSlideAngle(angle) {
167
+ this.raw.setMinSlopeSlideAngle(angle);
168
+ }
169
+ /**
170
+ * If snap-to-ground is enabled, should the character be automatically snapped to the ground if
171
+ * the distance between the ground and its feet are smaller than the specified threshold?
172
+ */
173
+ snapToGroundDistance() {
174
+ return this.raw.snapToGroundDistance();
175
+ }
176
+ /**
177
+ * Enables automatically snapping the character to the ground if the distance between
178
+ * the ground and its feet are smaller than the specified threshold.
179
+ */
180
+ enableSnapToGround(distance) {
181
+ this.raw.enableSnapToGround(distance);
182
+ }
183
+ /**
184
+ * Disables automatically snapping the character to the ground.
185
+ */
186
+ disableSnapToGround() {
187
+ this.raw.disableSnapToGround();
188
+ }
189
+ /**
190
+ * Is automatically snapping the character to the ground enabled?
191
+ */
192
+ snapToGroundEnabled() {
193
+ return this.raw.snapToGroundEnabled();
194
+ }
195
+ /**
196
+ * Computes the movement the given collider is able to execute after hitting and sliding on obstacles.
197
+ *
198
+ * @param collider - The collider to move.
199
+ * @param desiredTranslationDelta - The desired collider movement.
200
+ * @param filterFlags - Flags for excluding whole subsets of colliders from the obstacles taken into account.
201
+ * @param filterGroups - Groups for excluding colliders with incompatible collision groups from the obstacles
202
+ * taken into account.
203
+ * @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the
204
+ * obstacles taken into account.
205
+ */
206
+ computeColliderMovement(collider, desiredTranslationDelta, filterFlags, filterGroups, filterPredicate) {
207
+ let rawTranslationDelta = VectorOps.intoRaw(desiredTranslationDelta);
208
+ this.raw.computeColliderMovement(this.params.dt, this.bodies.raw, this.colliders.raw, this.queries.raw, collider.handle, rawTranslationDelta, this._applyImpulsesToDynamicBodies, this._characterMass, filterFlags, filterGroups, this.colliders.castClosure(filterPredicate));
209
+ rawTranslationDelta.free();
210
+ }
211
+ /**
212
+ * The movement computed by the last call to `this.computeColliderMovement`.
213
+ */
214
+ computedMovement() {
215
+ return VectorOps.fromRaw(this.raw.computedMovement());
216
+ }
217
+ /**
218
+ * The result of ground detection computed by the last call to `this.computeColliderMovement`.
219
+ */
220
+ computedGrounded() {
221
+ return this.raw.computedGrounded();
222
+ }
223
+ /**
224
+ * The number of collisions against obstacles detected along the path of the last call
225
+ * to `this.computeColliderMovement`.
226
+ */
227
+ numComputedCollisions() {
228
+ return this.raw.numComputedCollisions();
229
+ }
230
+ /**
231
+ * Returns the collision against one of the obstacles detected along the path of the last
232
+ * call to `this.computeColliderMovement`.
233
+ *
234
+ * @param i - The i-th collision will be returned.
235
+ * @param out - If this argument is set, it will be filled with the collision information.
236
+ */
237
+ computedCollision(i, out) {
238
+ if (!this.raw.computedCollision(i, this.rawCharacterCollision)) {
239
+ return null;
240
+ }
241
+ else {
242
+ let c = this.rawCharacterCollision;
243
+ out = out !== null && out !== void 0 ? out : new CharacterCollision();
244
+ out.translationDeltaApplied = VectorOps.fromRaw(c.translationDeltaApplied());
245
+ out.translationDeltaRemaining = VectorOps.fromRaw(c.translationDeltaRemaining());
246
+ out.toi = c.toi();
247
+ out.witness1 = VectorOps.fromRaw(c.worldWitness1());
248
+ out.witness2 = VectorOps.fromRaw(c.worldWitness2());
249
+ out.normal1 = VectorOps.fromRaw(c.worldNormal1());
250
+ out.normal2 = VectorOps.fromRaw(c.worldNormal2());
251
+ out.collider = this.colliders.get(c.handle());
252
+ return out;
253
+ }
254
+ }
255
+ }
256
+ //# sourceMappingURL=character_controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character_controller.js","sourceRoot":"","sources":["../src/control/character_controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,+BAA+B,EAAE,qBAAqB,EAAC,MAAM,QAAQ,CAAC;AAC9E,OAAO,EAAmB,SAAS,EAAC,MAAM,SAAS,CAAC;AAKpD;;GAEG;AACH,MAAM,OAAO,kBAAkB;CAiB9B;AAED;;;GAGG;AACH,MAAM,OAAO,4BAA4B;IAWrC,YACI,MAAc,EACd,MAA6B,EAC7B,MAAoB,EACpB,SAAsB,EACtB,OAAsB;QAEtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,IAAI,+BAA+B,CAAC,MAAM,CAAC,CAAC;QACvD,IAAI,CAAC,qBAAqB,GAAG,IAAI,qBAAqB,EAAE,CAAC;QACzD,IAAI,CAAC,6BAA6B,GAAG,KAAK,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED,gBAAgB;IACT,IAAI;QACP,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAChB,IAAI,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;SACrC;QAED,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;IAC3C,CAAC;IAED;;OAEG;IACI,EAAE;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAc;QACvB,IAAI,OAAO,GAAG,SAAS,CA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7C,CAAC,CAAC,yBAAyB,EAAE,CAChC,CAAC;YACF,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YAClB,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC;YACpD,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC;YACpD,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;YAClD,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;YAClD,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YAC9C,OAAO,GAAG,CAAC;SACd;IACL,CAAC;CACJ"}
@@ -0,0 +1,2 @@
1
+ export * from "./character_controller";
2
+ export * from "./ray_cast_vehicle_controller";
@@ -0,0 +1,5 @@
1
+ export * from "./character_controller";
2
+ // #if DIM3
3
+ export * from "./ray_cast_vehicle_controller";
4
+ // #endif
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/control/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AAEvC,WAAW;AACX,cAAc,+BAA+B,CAAC;AAC9C,SAAS"}