@absolutejs/rapier3d 0.8.0 → 0.9.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.
@@ -16,6 +16,18 @@ export declare class MultibodyJointSet {
16
16
  */
17
17
  free(): void;
18
18
  constructor(raw?: RawMultibodyJointSet);
19
+ /** Returns an owned copy of articulation-wide damping, or undefined for a stale handle. */
20
+ generalizedDamping(handle: MultibodyJointHandle): Float32Array | undefined;
21
+ /**
22
+ * Sets generalized damping for the entire articulation containing this joint,
23
+ * including its free root. Body damping setters do not change this vector.
24
+ * Entries follow native generalized-coordinate order; topology changes may
25
+ * change its length and meaning. Read it again after changing joints.
26
+ * Returns false without mutation for a removed handle, wrong length,
27
+ * negative/nonfinite values, or values that overflow native float precision.
28
+ * This does not wake sleeping bodies; callers must wake the affected bodies.
29
+ */
30
+ setGeneralizedDamping(handle: MultibodyJointHandle, values: ArrayLike<number>): boolean;
19
31
  /**
20
32
  * Creates a new joint and return its integer handle.
21
33
  *
@@ -823,6 +823,10 @@ export class RawMultibodyJointSet {
823
823
  * - `f(handle)`: the function to apply to the integer handle of each joint managed by this set. Called as `f(collider)`.
824
824
  */
825
825
  forEachJointHandle(f: Function): void;
826
+ /**
827
+ * Copies damping for the entire articulation containing this joint, including its free root.
828
+ */
829
+ generalizedDamping(handle: number): Float32Array | undefined;
826
830
  /**
827
831
  * The position of the first anchor of this joint.
828
832
  *
@@ -871,6 +875,10 @@ export class RawMultibodyJointSet {
871
875
  jointType(handle: number): RawJointType;
872
876
  constructor();
873
877
  remove(handle: number, wakeUp: boolean): void;
878
+ /**
879
+ * Transactional update: malformed input or a stale handle leaves the articulation unchanged.
880
+ */
881
+ setGeneralizedDamping(handle: number, values: Float32Array): boolean;
874
882
  }
875
883
 
876
884
  export class RawNarrowPhase {
@@ -2374,6 +2382,7 @@ export interface InitOutput {
2374
2382
  readonly rawmultibodyjointset_createJoint: (a: number, b: number, c: number, d: number, e: number) => number;
2375
2383
  readonly rawmultibodyjointset_forEachJointAttachedToRigidBody: (a: number, b: number, c: number) => void;
2376
2384
  readonly rawmultibodyjointset_forEachJointHandle: (a: number, b: number) => void;
2385
+ readonly rawmultibodyjointset_generalizedDamping: (a: number, b: number, c: number) => void;
2377
2386
  readonly rawmultibodyjointset_jointAnchor1: (a: number, b: number) => number;
2378
2387
  readonly rawmultibodyjointset_jointAnchor2: (a: number, b: number) => number;
2379
2388
  readonly rawmultibodyjointset_jointContactsEnabled: (a: number, b: number) => number;
@@ -2386,6 +2395,7 @@ export interface InitOutput {
2386
2395
  readonly rawmultibodyjointset_jointType: (a: number, b: number) => number;
2387
2396
  readonly rawmultibodyjointset_new: () => number;
2388
2397
  readonly rawmultibodyjointset_remove: (a: number, b: number, c: number) => void;
2398
+ readonly rawmultibodyjointset_setGeneralizedDamping: (a: number, b: number, c: number, d: number) => number;
2389
2399
  readonly rawnarrowphase_contact_pair: (a: number, b: number, c: number) => number;
2390
2400
  readonly rawnarrowphase_contact_pairs_with: (a: number, b: number, c: number) => void;
2391
2401
  readonly rawnarrowphase_intersection_pair: (a: number, b: number, c: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/rapier3d",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Rapier 3D with corrected contact witnesses, rotation precision and solver diagnostics",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",