@absolutejs/rapier3d 0.0.0-stage → 0.1.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.
Files changed (50) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +56 -2
  3. package/absolutejs/README.md +57 -0
  4. package/dist/provenance.json +10 -0
  5. package/dist/rapier.mjs +1 -0
  6. package/dist/types/coarena.d.ts +15 -0
  7. package/dist/types/control/character_controller.d.ts +191 -0
  8. package/dist/types/control/index.d.ts +3 -0
  9. package/dist/types/control/pid_controller.d.ts +50 -0
  10. package/dist/types/control/ray_cast_vehicle_controller.d.ts +277 -0
  11. package/dist/types/dynamics/ccd_solver.d.ts +15 -0
  12. package/dist/types/dynamics/coefficient_combine_rule.d.ts +13 -0
  13. package/dist/types/dynamics/impulse_joint.d.ts +359 -0
  14. package/dist/types/dynamics/impulse_joint_set.d.ts +84 -0
  15. package/dist/types/dynamics/index.d.ts +12 -0
  16. package/dist/types/dynamics/integration_parameters.d.ts +101 -0
  17. package/dist/types/dynamics/island_manager.d.ts +24 -0
  18. package/dist/types/dynamics/multibody_joint.d.ts +42 -0
  19. package/dist/types/dynamics/multibody_joint_set.d.ts +81 -0
  20. package/dist/types/dynamics/rigid_body.d.ts +839 -0
  21. package/dist/types/dynamics/rigid_body_set.d.ts +90 -0
  22. package/dist/types/dynamics/soft_body.d.ts +1210 -0
  23. package/dist/types/dynamics/soft_body_set.d.ts +99 -0
  24. package/dist/types/exports.d.ts +8 -0
  25. package/dist/types/geometry/broad_phase.d.ts +162 -0
  26. package/dist/types/geometry/collider.d.ts +1016 -0
  27. package/dist/types/geometry/collider_set.d.ts +97 -0
  28. package/dist/types/geometry/contact.d.ts +36 -0
  29. package/dist/types/geometry/feature.d.ts +6 -0
  30. package/dist/types/geometry/index.d.ts +11 -0
  31. package/dist/types/geometry/interaction_groups.d.ts +18 -0
  32. package/dist/types/geometry/narrow_phase.d.ts +140 -0
  33. package/dist/types/geometry/point.d.ts +58 -0
  34. package/dist/types/geometry/ray.d.ts +108 -0
  35. package/dist/types/geometry/shape.d.ts +681 -0
  36. package/dist/types/geometry/toi.d.ts +59 -0
  37. package/dist/types/init.d.ts +3 -0
  38. package/dist/types/math.d.ts +98 -0
  39. package/dist/types/pipeline/debug_render_pipeline.d.ts +40 -0
  40. package/dist/types/pipeline/event_queue.d.ts +113 -0
  41. package/dist/types/pipeline/index.d.ts +7 -0
  42. package/dist/types/pipeline/physics_hooks.d.ts +39 -0
  43. package/dist/types/pipeline/physics_pipeline.d.ts +12 -0
  44. package/dist/types/pipeline/query_pipeline.d.ts +38 -0
  45. package/dist/types/pipeline/serialization_pipeline.d.ts +37 -0
  46. package/dist/types/pipeline/world.d.ts +674 -0
  47. package/dist/types/rapier.d.ts +3 -0
  48. package/dist/types/rapier_wasm3d.d.ts +2908 -0
  49. package/dist/types/raw.d.ts +1 -0
  50. package/package.json +33 -4
@@ -0,0 +1,81 @@
1
+ import { RawMultibodyJointSet } from "../raw";
2
+ import { MultibodyJoint, MultibodyJointHandle } from "./multibody_joint";
3
+ import { JointData } from "./impulse_joint";
4
+ import { RigidBodyHandle } from "./rigid_body";
5
+ /**
6
+ * A set of joints.
7
+ *
8
+ * To avoid leaking WASM resources, this MUST be freed manually with `jointSet.free()`
9
+ * once you are done using it (and all the joints it created).
10
+ */
11
+ export declare class MultibodyJointSet {
12
+ raw: RawMultibodyJointSet;
13
+ private map;
14
+ /**
15
+ * Release the WASM memory occupied by this joint set.
16
+ */
17
+ free(): void;
18
+ constructor(raw?: RawMultibodyJointSet);
19
+ /**
20
+ * Creates a new joint and return its integer handle.
21
+ *
22
+ * @param desc - The joint's parameters.
23
+ * @param parent1 - The handle of the first rigid-body this joint is attached to.
24
+ * @param parent2 - The handle of the second rigid-body this joint is attached to.
25
+ * @param wakeUp - Should the attached rigid-bodies be awakened?
26
+ */
27
+ createJoint(desc: JointData, parent1: RigidBodyHandle, parent2: RigidBodyHandle, wakeUp: boolean): MultibodyJoint;
28
+ /**
29
+ * Remove a joint from this set.
30
+ *
31
+ * @param handle - The integer handle of the joint.
32
+ * @param wake_up - If `true`, the rigid-bodies attached by the removed joint will be woken-up automatically.
33
+ */
34
+ remove(handle: MultibodyJointHandle, wake_up: boolean): void;
35
+ /**
36
+ * Internal function, do not call directly.
37
+ * @param handle
38
+ */
39
+ unmap(handle: MultibodyJointHandle): void;
40
+ /**
41
+ * Drops the wrappers of the joints the engine removed on its own (the joints of removed
42
+ * soft bodies and clusters).
43
+ */
44
+ unmapRemovedJoints(): void;
45
+ /**
46
+ * The number of joints on this set.
47
+ */
48
+ len(): number;
49
+ /**
50
+ * Does this set contain a joint with the given handle?
51
+ *
52
+ * @param handle - The joint handle to check.
53
+ */
54
+ contains(handle: MultibodyJointHandle): boolean;
55
+ /**
56
+ * Gets the joint with the given handle.
57
+ *
58
+ * Returns `null` if no joint with the specified handle exists.
59
+ *
60
+ * @param handle - The integer handle of the joint to retrieve.
61
+ */
62
+ get(handle: MultibodyJointHandle): MultibodyJoint | null;
63
+ /**
64
+ * Applies the given closure to each joint contained by this set.
65
+ *
66
+ * @param f - The closure to apply.
67
+ */
68
+ forEach(f: (joint: MultibodyJoint) => void): void;
69
+ /**
70
+ * Calls the given closure with the integer handle of each multibody joint attached to this rigid-body.
71
+ *
72
+ * @param f - The closure called with the integer handle of each multibody joint attached to the rigid-body.
73
+ */
74
+ forEachJointHandleAttachedToRigidBody(handle: RigidBodyHandle, f: (handle: MultibodyJointHandle) => void): void;
75
+ /**
76
+ * Gets all joints in the list.
77
+ *
78
+ * @returns joint list.
79
+ */
80
+ getAll(): MultibodyJoint[];
81
+ }