@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/compat-simd.d.mts +2 -138
- package/dist/compat-simd.d.mts.map +1 -1
- package/dist/compat-simd.mjs +2 -190
- package/dist/compat-simd.mjs.map +1 -1
- package/dist/compat.d.mts +2 -138
- package/dist/compat.d.mts.map +1 -1
- package/dist/compat.mjs +2 -190
- package/dist/compat.mjs.map +1 -1
- package/dist/rapier.d.mts +2 -138
- package/dist/rapier.d.mts.map +1 -1
- package/dist/rapier.mjs +1 -189
- package/dist/rapier.mjs.map +1 -1
- package/dist/rapier_wasm_3d_bg.wasm +0 -0
- package/dist/rapier_wasm_3d_simd_bg.wasm +0 -0
- package/dist/simd.d.mts +2 -138
- package/dist/simd.d.mts.map +1 -1
- package/dist/simd.mjs +1 -189
- package/dist/simd.mjs.map +1 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
package/dist/simd.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
|
*
|
|
@@ -2276,46 +2259,6 @@ declare class World {
|
|
|
2276
2259
|
* @param body - The description of the rigid-body to create.
|
|
2277
2260
|
*/
|
|
2278
2261
|
createRigidBody(body: RigidBodyDesc): RigidBody;
|
|
2279
|
-
/**
|
|
2280
|
-
* Sets transforms for multiple rigid-bodies in a single WASM call.
|
|
2281
|
-
*
|
|
2282
|
-
* This is more efficient than calling `setTransform` on each body individually
|
|
2283
|
-
* when you need to update many bodies at once.
|
|
2284
|
-
*
|
|
2285
|
-
* @param batch - The batch of transforms to apply.
|
|
2286
|
-
* @param wakeUp - Forces the rigid-bodies to wake-up so they are properly affected by forces.
|
|
2287
|
-
*
|
|
2288
|
-
* @example
|
|
2289
|
-
* ```typescript
|
|
2290
|
-
* const batch = RAPIER.createTransformBatch(1000);
|
|
2291
|
-
* batch.clear();
|
|
2292
|
-
* for (const body of dynamicBodies) {
|
|
2293
|
-
* batch.add(body.handle, newPosition, newRotation);
|
|
2294
|
-
* }
|
|
2295
|
-
* world.setTransformsBatch(batch, true);
|
|
2296
|
-
* ```
|
|
2297
|
-
*/
|
|
2298
|
-
setTransformsBatch(batch: TransformBatch, wakeUp: boolean): void;
|
|
2299
|
-
/**
|
|
2300
|
-
* Sets next kinematic transforms for multiple rigid-bodies in a single WASM call.
|
|
2301
|
-
*
|
|
2302
|
-
* This is more efficient than calling `setNextKinematicTransform` on each body individually
|
|
2303
|
-
* when you need to update many kinematic bodies at once.
|
|
2304
|
-
*
|
|
2305
|
-
* @param batch - The batch of transforms to apply.
|
|
2306
|
-
*
|
|
2307
|
-
* @example
|
|
2308
|
-
* ```typescript
|
|
2309
|
-
* const batch = RAPIER.createTransformBatch(1000);
|
|
2310
|
-
* batch.clear();
|
|
2311
|
-
* for (const body of kinematicBodies) {
|
|
2312
|
-
* batch.add(body.handle, mesh.position, mesh.quaternion);
|
|
2313
|
-
* }
|
|
2314
|
-
* world.setNextKinematicTransformsBatch(batch);
|
|
2315
|
-
* world.step();
|
|
2316
|
-
* ```
|
|
2317
|
-
*/
|
|
2318
|
-
setNextKinematicTransformsBatch(batch: TransformBatch): void;
|
|
2319
2262
|
/**
|
|
2320
2263
|
* Creates a new character controller.
|
|
2321
2264
|
*
|
|
@@ -6153,87 +6096,8 @@ declare class CCDSolver {
|
|
|
6153
6096
|
free(): void;
|
|
6154
6097
|
constructor(raw?: RawCCDSolver);
|
|
6155
6098
|
}
|
|
6156
|
-
//#endregion
|
|
6157
|
-
//#region src/dynamics/transform_batch.d.ts
|
|
6158
|
-
/**
|
|
6159
|
-
* A batch of transforms for efficient bulk updates.
|
|
6160
|
-
*
|
|
6161
|
-
* This class allows you to collect multiple body transforms and apply them
|
|
6162
|
-
* all in a single WASM call, reducing boundary-crossing overhead.
|
|
6163
|
-
*
|
|
6164
|
-
* @example
|
|
6165
|
-
* ```typescript
|
|
6166
|
-
* const batch = RAPIER.createTransformBatch(1000);
|
|
6167
|
-
*
|
|
6168
|
-
* // In your game loop:
|
|
6169
|
-
* batch.clear();
|
|
6170
|
-
* for (const body of kinematicBodies) {
|
|
6171
|
-
* batch.add(body.handle, mesh.position, mesh.quaternion);
|
|
6172
|
-
* }
|
|
6173
|
-
* world.setNextKinematicTransformsBatch(batch);
|
|
6174
|
-
* world.step();
|
|
6175
|
-
* ```
|
|
6176
|
-
*/
|
|
6177
|
-
declare class TransformBatch {
|
|
6178
|
-
/** @internal */
|
|
6179
|
-
buffer: Float32Array;
|
|
6180
|
-
/** @internal */
|
|
6181
|
-
count: number;
|
|
6182
|
-
private static FLOATS_PER_ENTRY;
|
|
6183
|
-
/**
|
|
6184
|
-
* Creates a new TransformBatch with the given initial capacity.
|
|
6185
|
-
*
|
|
6186
|
-
* @param capacity - The initial number of transforms this batch can hold.
|
|
6187
|
-
*/
|
|
6188
|
-
constructor(capacity: number);
|
|
6189
|
-
/**
|
|
6190
|
-
* The current number of transforms in the batch.
|
|
6191
|
-
*/
|
|
6192
|
-
get length(): number;
|
|
6193
|
-
/**
|
|
6194
|
-
* The maximum number of transforms this batch can hold without growing.
|
|
6195
|
-
*/
|
|
6196
|
-
get capacity(): number;
|
|
6197
|
-
/**
|
|
6198
|
-
* Clears all transforms from the batch.
|
|
6199
|
-
* Call this at the start of each frame before adding new transforms.
|
|
6200
|
-
*/
|
|
6201
|
-
clear(): void;
|
|
6202
|
-
/**
|
|
6203
|
-
* Adds a transform to the batch.
|
|
6204
|
-
*
|
|
6205
|
-
* @param handle - The rigid body handle.
|
|
6206
|
-
* @param translation - The position to set.
|
|
6207
|
-
* @param rotation - The rotation quaternion to set.
|
|
6208
|
-
*/
|
|
6209
|
-
add(handle: RigidBodyHandle, translation: Vector, rotation: Rotation): void;
|
|
6210
|
-
private grow;
|
|
6211
|
-
}
|
|
6212
|
-
/**
|
|
6213
|
-
* Creates a new TransformBatch for efficient bulk body updates.
|
|
6214
|
-
*
|
|
6215
|
-
* @param capacity - The initial number of transforms the batch can hold.
|
|
6216
|
-
* The batch will automatically grow if more are added.
|
|
6217
|
-
* @returns A new TransformBatch instance.
|
|
6218
|
-
*
|
|
6219
|
-
* @example
|
|
6220
|
-
* ```typescript
|
|
6221
|
-
* // Create once, reuse every frame
|
|
6222
|
-
* const batch = RAPIER.createTransformBatch(1000);
|
|
6223
|
-
*
|
|
6224
|
-
* function update() {
|
|
6225
|
-
* batch.clear();
|
|
6226
|
-
* for (const body of kinematicBodies) {
|
|
6227
|
-
* batch.add(body.handle, mesh.position, mesh.quaternion);
|
|
6228
|
-
* }
|
|
6229
|
-
* world.setNextKinematicTransformsBatch(batch);
|
|
6230
|
-
* world.step();
|
|
6231
|
-
* }
|
|
6232
|
-
* ```
|
|
6233
|
-
*/
|
|
6234
|
-
declare function createTransformBatch(capacity: number): TransformBatch;
|
|
6235
6099
|
declare namespace exports_d_exports {
|
|
6236
|
-
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,
|
|
6100
|
+
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 };
|
|
6237
6101
|
}
|
|
6238
6102
|
declare function version(): string;
|
|
6239
6103
|
declare function reserveMemory(extraBytesCount: number): void;
|
|
@@ -6248,5 +6112,5 @@ type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Modul
|
|
|
6248
6112
|
*/
|
|
6249
6113
|
declare function init(input?: InitInput): Promise<void>;
|
|
6250
6114
|
//#endregion
|
|
6251
|
-
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,
|
|
6115
|
+
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 };
|
|
6252
6116
|
//# sourceMappingURL=simd.d.mts.map
|