@alexandernanberg/rapier3d 0.0.2 → 0.0.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.
package/dist/rapier.d.mts CHANGED
@@ -968,14 +968,6 @@ declare class RawRigidBodySet {
968
968
  * - `rx`, `ry`, `rz`, `rw`: the rotation quaternion components.
969
969
  */
970
970
  rbSetNextKinematicTransform(handle: number, tx: number, ty: number, tz: number, rx: number, ry: number, rz: number, rw: number): void;
971
- /**
972
- * Sets next kinematic transforms for multiple rigid-bodies in a single WASM call.
973
- *
974
- * # Parameters
975
- * - `data`: Float32Array with layout [handle, tx, ty, tz, rx, ry, rz, rw] × N
976
- * - `count`: Number of bodies in the batch
977
- */
978
- rbSetNextKinematicTransformsBatch(data: Float32Array, count: number): void;
979
971
  /**
980
972
  * If this rigid body is kinematic, sets its future translation after the next timestep integration.
981
973
  *
@@ -1015,15 +1007,6 @@ declare class RawRigidBodySet {
1015
1007
  * - `wakeUp`: forces the rigid-body to wake-up so it is properly affected by forces.
1016
1008
  */
1017
1009
  rbSetTransform(handle: number, tx: number, ty: number, tz: number, rx: number, ry: number, rz: number, rw: number, wakeUp: boolean): void;
1018
- /**
1019
- * Sets transforms for multiple rigid-bodies in a single WASM call.
1020
- *
1021
- * # Parameters
1022
- * - `data`: Float32Array with layout [handle, tx, ty, tz, rx, ry, rz, rw] × N
1023
- * - `count`: Number of bodies in the batch
1024
- * - `wakeUp`: forces the rigid-bodies to wake-up
1025
- */
1026
- rbSetTransformsBatch(data: Float32Array, count: number, wakeUp: boolean): void;
1027
1010
  /**
1028
1011
  * Sets the translation of this rigid-body.
1029
1012
  *
@@ -2277,46 +2260,6 @@ declare class World {
2277
2260
  * @param body - The description of the rigid-body to create.
2278
2261
  */
2279
2262
  createRigidBody(body: RigidBodyDesc): RigidBody;
2280
- /**
2281
- * Sets transforms for multiple rigid-bodies in a single WASM call.
2282
- *
2283
- * This is more efficient than calling `setTransform` on each body individually
2284
- * when you need to update many bodies at once.
2285
- *
2286
- * @param batch - The batch of transforms to apply.
2287
- * @param wakeUp - Forces the rigid-bodies to wake-up so they are properly affected by forces.
2288
- *
2289
- * @example
2290
- * ```typescript
2291
- * const batch = RAPIER.createTransformBatch(1000);
2292
- * batch.clear();
2293
- * for (const body of dynamicBodies) {
2294
- * batch.add(body.handle, newPosition, newRotation);
2295
- * }
2296
- * world.setTransformsBatch(batch, true);
2297
- * ```
2298
- */
2299
- setTransformsBatch(batch: TransformBatch, wakeUp: boolean): void;
2300
- /**
2301
- * Sets next kinematic transforms for multiple rigid-bodies in a single WASM call.
2302
- *
2303
- * This is more efficient than calling `setNextKinematicTransform` on each body individually
2304
- * when you need to update many kinematic bodies at once.
2305
- *
2306
- * @param batch - The batch of transforms to apply.
2307
- *
2308
- * @example
2309
- * ```typescript
2310
- * const batch = RAPIER.createTransformBatch(1000);
2311
- * batch.clear();
2312
- * for (const body of kinematicBodies) {
2313
- * batch.add(body.handle, mesh.position, mesh.quaternion);
2314
- * }
2315
- * world.setNextKinematicTransformsBatch(batch);
2316
- * world.step();
2317
- * ```
2318
- */
2319
- setNextKinematicTransformsBatch(batch: TransformBatch): void;
2320
2263
  /**
2321
2264
  * Creates a new character controller.
2322
2265
  *
@@ -6154,87 +6097,8 @@ declare class CCDSolver {
6154
6097
  free(): void;
6155
6098
  constructor(raw?: RawCCDSolver);
6156
6099
  }
6157
- //#endregion
6158
- //#region src/dynamics/transform_batch.d.ts
6159
- /**
6160
- * A batch of transforms for efficient bulk updates.
6161
- *
6162
- * This class allows you to collect multiple body transforms and apply them
6163
- * all in a single WASM call, reducing boundary-crossing overhead.
6164
- *
6165
- * @example
6166
- * ```typescript
6167
- * const batch = RAPIER.createTransformBatch(1000);
6168
- *
6169
- * // In your game loop:
6170
- * batch.clear();
6171
- * for (const body of kinematicBodies) {
6172
- * batch.add(body.handle, mesh.position, mesh.quaternion);
6173
- * }
6174
- * world.setNextKinematicTransformsBatch(batch);
6175
- * world.step();
6176
- * ```
6177
- */
6178
- declare class TransformBatch {
6179
- /** @internal */
6180
- buffer: Float32Array;
6181
- /** @internal */
6182
- count: number;
6183
- private static FLOATS_PER_ENTRY;
6184
- /**
6185
- * Creates a new TransformBatch with the given initial capacity.
6186
- *
6187
- * @param capacity - The initial number of transforms this batch can hold.
6188
- */
6189
- constructor(capacity: number);
6190
- /**
6191
- * The current number of transforms in the batch.
6192
- */
6193
- get length(): number;
6194
- /**
6195
- * The maximum number of transforms this batch can hold without growing.
6196
- */
6197
- get capacity(): number;
6198
- /**
6199
- * Clears all transforms from the batch.
6200
- * Call this at the start of each frame before adding new transforms.
6201
- */
6202
- clear(): void;
6203
- /**
6204
- * Adds a transform to the batch.
6205
- *
6206
- * @param handle - The rigid body handle.
6207
- * @param translation - The position to set.
6208
- * @param rotation - The rotation quaternion to set.
6209
- */
6210
- add(handle: RigidBodyHandle, translation: Vector, rotation: Rotation): void;
6211
- private grow;
6212
- }
6213
- /**
6214
- * Creates a new TransformBatch for efficient bulk body updates.
6215
- *
6216
- * @param capacity - The initial number of transforms the batch can hold.
6217
- * The batch will automatically grow if more are added.
6218
- * @returns A new TransformBatch instance.
6219
- *
6220
- * @example
6221
- * ```typescript
6222
- * // Create once, reuse every frame
6223
- * const batch = RAPIER.createTransformBatch(1000);
6224
- *
6225
- * function update() {
6226
- * batch.clear();
6227
- * for (const body of kinematicBodies) {
6228
- * batch.add(body.handle, mesh.position, mesh.quaternion);
6229
- * }
6230
- * world.setNextKinematicTransformsBatch(batch);
6231
- * world.step();
6232
- * }
6233
- * ```
6234
- */
6235
- declare function createTransformBatch(capacity: number): TransformBatch;
6236
6100
  declare namespace exports_d_exports {
6237
- export { ActiveCollisionTypes, ActiveEvents, ActiveHooks, Ball, BroadPhase, CCDSolver, Capsule, CharacterCollision, CoefficientCombineRule, Collider, ColliderDesc, ColliderHandle, ColliderSet, ColliderShapeCastHit, Cone, ConvexPolyhedron, Cuboid, Cylinder, DebugRenderBuffers, DebugRenderPipeline, DynamicRayCastVehicleController, EventQueue, FeatureType, FixedImpulseJoint, FixedMultibodyJoint, GenericImpulseJoint, HalfSpace, HeightFieldFlags, Heightfield, ImpulseJoint, ImpulseJointHandle, ImpulseJointSet, IntegrationParameters, InteractionGroups, IslandManager, JointAxesMask, JointData, JointType, KinematicCharacterController, MassPropsMode, MotorModel, MultibodyJoint, MultibodyJointHandle, MultibodyJointSet, NarrowPhase, PhysicsHooks, PhysicsPipeline, PidAxesMask, PidController, PointColliderProjection, PointProjection, Polyline, PrismaticImpulseJoint, PrismaticMultibodyJoint, Quaternion, QueryFilterFlags, Ray, RayColliderHit, RayColliderIntersection, RayIntersection, RevoluteImpulseJoint, RevoluteMultibodyJoint, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet, RigidBodyType, RopeImpulseJoint, Rotation, RotationOps, RoundCone, RoundConvexPolyhedron, RoundCuboid, RoundCylinder, RoundTriangle, SdpMatrix3, SdpMatrix3Ops, Segment, SerializationPipeline, Shape, ShapeCastHit, ShapeContact, ShapeType, SolverFlags, SphericalImpulseJoint, SphericalMultibodyJoint, SpringImpulseJoint, TempContactForceEvent, TempContactManifold, TransformBatch, TriMesh, TriMeshFlags, Triangle, UnitImpulseJoint, UnitMultibodyJoint, Vector, Vector3, VectorOps, Voxels, World, createTransformBatch, reserveMemory, version };
6101
+ export { ActiveCollisionTypes, ActiveEvents, ActiveHooks, Ball, BroadPhase, CCDSolver, Capsule, CharacterCollision, CoefficientCombineRule, Collider, ColliderDesc, ColliderHandle, ColliderSet, ColliderShapeCastHit, Cone, ConvexPolyhedron, Cuboid, Cylinder, DebugRenderBuffers, DebugRenderPipeline, DynamicRayCastVehicleController, EventQueue, FeatureType, FixedImpulseJoint, FixedMultibodyJoint, GenericImpulseJoint, HalfSpace, HeightFieldFlags, Heightfield, ImpulseJoint, ImpulseJointHandle, ImpulseJointSet, IntegrationParameters, InteractionGroups, IslandManager, JointAxesMask, JointData, JointType, KinematicCharacterController, MassPropsMode, MotorModel, MultibodyJoint, MultibodyJointHandle, MultibodyJointSet, NarrowPhase, PhysicsHooks, PhysicsPipeline, PidAxesMask, PidController, PointColliderProjection, PointProjection, Polyline, PrismaticImpulseJoint, PrismaticMultibodyJoint, Quaternion, QueryFilterFlags, Ray, RayColliderHit, RayColliderIntersection, RayIntersection, RevoluteImpulseJoint, RevoluteMultibodyJoint, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet, RigidBodyType, RopeImpulseJoint, Rotation, RotationOps, RoundCone, RoundConvexPolyhedron, RoundCuboid, RoundCylinder, RoundTriangle, SdpMatrix3, SdpMatrix3Ops, Segment, SerializationPipeline, Shape, ShapeCastHit, ShapeContact, ShapeType, SolverFlags, SphericalImpulseJoint, SphericalMultibodyJoint, SpringImpulseJoint, TempContactForceEvent, TempContactManifold, TriMesh, TriMeshFlags, Triangle, UnitImpulseJoint, UnitMultibodyJoint, Vector, Vector3, VectorOps, Voxels, World, reserveMemory, version };
6238
6102
  }
6239
6103
  declare function version(): string;
6240
6104
  declare function reserveMemory(extraBytesCount: number): void;
@@ -6246,5 +6110,5 @@ declare function reserveMemory(extraBytesCount: number): void;
6246
6110
  */
6247
6111
  declare function init(input?: InitInput): Promise<void>;
6248
6112
  //#endregion
6249
- export { ActiveCollisionTypes, ActiveEvents, ActiveHooks, Ball, BroadPhase, CCDSolver, Capsule, CharacterCollision, CoefficientCombineRule, Collider, ColliderDesc, ColliderHandle, ColliderSet, ColliderShapeCastHit, Cone, ConvexPolyhedron, Cuboid, Cylinder, DebugRenderBuffers, DebugRenderPipeline, DynamicRayCastVehicleController, EventQueue, FeatureType, FixedImpulseJoint, FixedMultibodyJoint, GenericImpulseJoint, HalfSpace, HeightFieldFlags, Heightfield, ImpulseJoint, ImpulseJointHandle, ImpulseJointSet, IntegrationParameters, InteractionGroups, IslandManager, JointAxesMask, JointData, JointType, KinematicCharacterController, MassPropsMode, MotorModel, MultibodyJoint, MultibodyJointHandle, MultibodyJointSet, NarrowPhase, PhysicsHooks, PhysicsPipeline, PidAxesMask, PidController, PointColliderProjection, PointProjection, Polyline, PrismaticImpulseJoint, PrismaticMultibodyJoint, Quaternion, QueryFilterFlags, Ray, RayColliderHit, RayColliderIntersection, RayIntersection, RevoluteImpulseJoint, RevoluteMultibodyJoint, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet, RigidBodyType, RopeImpulseJoint, Rotation, RotationOps, RoundCone, RoundConvexPolyhedron, RoundCuboid, RoundCylinder, RoundTriangle, SdpMatrix3, SdpMatrix3Ops, Segment, SerializationPipeline, Shape, ShapeCastHit, ShapeContact, ShapeType, SolverFlags, SphericalImpulseJoint, SphericalMultibodyJoint, SpringImpulseJoint, TempContactForceEvent, TempContactManifold, TransformBatch, TriMesh, TriMeshFlags, Triangle, UnitImpulseJoint, UnitMultibodyJoint, Vector, Vector3, VectorOps, Voxels, World, createTransformBatch, exports_d_exports as default, init, reserveMemory, version };
6113
+ export { ActiveCollisionTypes, ActiveEvents, ActiveHooks, Ball, BroadPhase, CCDSolver, Capsule, CharacterCollision, CoefficientCombineRule, Collider, ColliderDesc, ColliderHandle, ColliderSet, ColliderShapeCastHit, Cone, ConvexPolyhedron, Cuboid, Cylinder, DebugRenderBuffers, DebugRenderPipeline, DynamicRayCastVehicleController, EventQueue, FeatureType, FixedImpulseJoint, FixedMultibodyJoint, GenericImpulseJoint, HalfSpace, HeightFieldFlags, Heightfield, ImpulseJoint, ImpulseJointHandle, ImpulseJointSet, IntegrationParameters, InteractionGroups, IslandManager, JointAxesMask, JointData, JointType, KinematicCharacterController, MassPropsMode, MotorModel, MultibodyJoint, MultibodyJointHandle, MultibodyJointSet, NarrowPhase, PhysicsHooks, PhysicsPipeline, PidAxesMask, PidController, PointColliderProjection, PointProjection, Polyline, PrismaticImpulseJoint, PrismaticMultibodyJoint, Quaternion, QueryFilterFlags, Ray, RayColliderHit, RayColliderIntersection, RayIntersection, RevoluteImpulseJoint, RevoluteMultibodyJoint, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet, RigidBodyType, RopeImpulseJoint, Rotation, RotationOps, RoundCone, RoundConvexPolyhedron, RoundCuboid, RoundCylinder, RoundTriangle, SdpMatrix3, SdpMatrix3Ops, Segment, SerializationPipeline, Shape, ShapeCastHit, ShapeContact, ShapeType, SolverFlags, SphericalImpulseJoint, SphericalMultibodyJoint, SpringImpulseJoint, TempContactForceEvent, TempContactManifold, TriMesh, TriMeshFlags, Triangle, UnitImpulseJoint, UnitMultibodyJoint, Vector, Vector3, VectorOps, Voxels, World, exports_d_exports as default, init, reserveMemory, version };
6250
6114
  //# sourceMappingURL=rapier.d.mts.map