Update dependency @dimforge/rapier3d-compat to ^0.19.0 #497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.11.2->^0.19.0Release Notes
dimforge/rapier.js (@dimforge/rapier3d-compat)
v0.19.3Compare Source
combineVoxelStates.0.19.2 (17 Oct. 2025)
0.19.1 (03 Oct. 2025)
Modified
for the Voxels shapes. This allows support for orders of magnitudes larger maps without reaching the 4GB WASM memory
limit.
0.19.0 (05 Sept. 2025)
Modified
See dimforge/rapier#876 for details.
RigidBody.invPrincipalInertiaSqrtand.effectiveWorldInvInertiaSqrtmethods toRigidBody.invPrincipalInertiaand.effectiveWorldInvInertia(removed theSqrtsuffix). These methods will nowreturn the actual inverse angular inertia matrix rather than its square root.
World.numAdditionalFrictionIterations,switchToStandardPgsSolver,switchToSmallStepsPgsSolver,switchToSmallStepsPgsSolverWithoutWarmstart.0.18.2 (13 August 2025)
Fixed
types: "./rapier.d.ts"to the export config.0.18.1 (8 August 2025)
Modified
the user applies modification to a collider or rigid-body.
Fix
0.18.0 (24 July 2025)
Added
World.timing*functions to access the internal performances measurements if the internalprofiler is enabled with
World.profilerEnabled = true.World.maxCcdSubstepsto get/set the max number of CCD substeps run by the engine.Fix
as their insertion).
0.18.0-beta.0 (12 July 2025)
Modified
This implies a performance gain on large scenes by avoiding the need to re-build the underlying acceleration
structure at each frame.
collider.radius()). It turned out that thesemethods are more convenient as they are guaranteed to always be in sync with rapier’s state on wasm.
collider.translationWrtParent()andcollider.rotationWrtParent()to get the collider’s translation/rotationrelative to its parent rigid-body.
Fix
.cjs.jsand.es.jsto.cjsandmjsrespectively. This results in better compatibility with NPM.
0.17.3 (30 May 2025)
Fix
0.17.2 (30 May 2025)
Added
RAPIER.reserveMemoryto instruct the internal allocator to pre-allocate more memory in preparationfor future operations. This typically called only once after initializing the WASM module.
0.17.1 (23 May 2025)
Added
World.debugRender(filterFlags, filterPredicate)to prevent some colliders from beingrendered.
Collider.combineVoxelStatesto ensure two adjacent voxels colliders don’t suffer from the internal edgesproblem, and
Collider.propagateVoxelChangeto maintain that coupling after modifications with.setVoxel.0.17.0 (16 May 2025)
Fixed
Added
0.16.2 (5 May 2025)
Fixed
collider.setVoxel.0.16.1 (2 May 2025)
Added
Collider.clearShapeCacheto release the reference to the JS shape stored in the collider, oor too force itsrecomputation the next time the collider shape is accessed.
0.16.0 (24 April 2025)
Added
ColliderDesc.voxelsto create a collider with a shape optimized for voxels.Collider.setVoxelfor adding or removing a voxel from a collider with a voxel shape.Voxelsshape class.The support or voxels is still experimental. In particular the following features will currently not work on
colliders with voxel shapes:
See parry#336 for additional information.
0.15.1 (10 April 2025)
Added
RigidBody.velocityAtPointfunction to retrieve the velocity of a given world-space point on a rigid-body.Modified
TriMeshFlags.FIX_INTERNAL_EDGESflag will no longerimply that the
TriMeshFlags.ORIENTEDflag is set, avoiding edge-cases where enablingFIX_INTERNAL_EDGESresults in unexpected collisions between open meshes and balls.
Fixed
*-simd-compatbuilds not actually emitting SIMD instructions.0.15.0 (06 March 2025)
Added
PidController,World.createPidController,World.removePidControllerto create a Position-Integral-Derivativecontroller; a building block for building velocity-based dynamic character controllers.
Modified
rapier2dandrapier3dare now built withoutenhanced-determinismfeature enabled,so if you rely on that feature, you should migrate to the new
-deterministicflavor.0.14.0 (20 July 2024)
Modified
Added
RigidBody.userForcefunction to retrieve the constant force(s) the user added to a rigid-bodyRigidBody.userTorquefunction to retrieve the constant torque(s) the user added to a rigid-body0.13.1 (2024-05-08)
Fixed
0.13.0 (2024-05-05)
Several stability improvements are added as part of this release.
See rapier#625 for overviews of the most important improvements.
Modified
castShapeandcastColliderfunctions have been modified to add atargetDistanceparameter. This parameterindicates the distance below which a hit is detected.
RayIntersection.toito.timeOfImpactfor better clarity.RayColliderIntersection.toito.timeOfImpactfor better clarity.RayColliderToitoRayColliderHit.RayColliderHit.toito.timeOfImpactfor better clarity.ShapeTOItoShapeCastHit.ShapeColliderTOItoColliderShapeCastHit.ShapeCastHit.toito.timeOfImpact.Added
KinematicCharacterController.normalNudgeFactorand.setNormalNudgeFactorso set a coefficient used foravoiding having the character controller get stuck on penetrations.
RigidBody.softCcdPrediction,.setSoftCcdPrediction, andRigidBodyDesc.setSoftCcdPredictionfor configuringsoft-ccd on the rigid-body. See rapier#625 for additional details on
soft-ccd.
TriMeshFlags::FIX_INTERNAL_EDGESandHeightFieldFlags::FIX_INTERNAL_EDGESfor enablinginternal edges correction (which is no longer enabled by default). The flags have been added as an optional parameter
when building the shapes.
Collider.contactSkin,.setContactSkin, andColliderDesc.setContactSkinfor configuring the collider’scontact skin. See rapier#625 for additional details on contact skins.
World.lengthUnitwhich can be used to indicate the typical size of dynamic objects (e.g. 100 pixels instead of1 meter). This helps the physics engine adjust internal thresholds for better results.
Fixed
0.12.0 (2024-01-28)
The main highlight of this release is the implementation of a new non-linear constraints solver for better stability
and increased convergence rates. See #579 for additional information.
In order to adjust the number of iterations of the new solver, simply adjust
World.numSolverIterations.If recovering the old solver behavior is useful to you, call
World.switchToStandardPgsSolver().It is now possible to specify some additional solver iteration for specific rigid-bodies (and everything interacting
with it directly or indirectly through contacts and joints):
RigidBodyDesc.additionalSolverIterationsandRigidBody::setAdditionalSolverIterations. This allows for higher-accuracy on subsets of the physics scenewithout affecting performance of the other parts of the simulation.
Modified
CharacterController.translationApplied,.translationRemainingand thedesiredTranslationmethod argument to
CharacterController.translationDeltaApplied,.translationDeltaRemainingand thedesiredTranslationDeltato avoid confusion with the usage of thetranslationworld inRigidBody.translation().Added
DynamicRayCastVehicleControllerto simulate vehicles based on ray-casting.JointData.generic(3D only) to create a generic 6-dof joint and manually specify the locked axes.0.11.2
Fixed
Added
JointData.springandJointData.ropejoints.RigidBody.effectiveInvMass,.invMass(),.localCom(),.worldCom(),.invPrincipalInertiaSqrt(),.principalInertia(),.principalInertiaLocalFrame(),.effectiveWorldInvInertiaSqrt(),.effectiveAngularInertia().DynamicRayCastVehicleController.siteFrictionStiffnessto customize the side friction applied to the vehiclecontroller’s wheel.
Modified
World.contactsWithtoWorld.contactPairsWith.World.intersectionsWithtoWorld.intersectionPairsWith.0.11.1 (2023-01-16)
Fixed
0.11.0 (2023-01-15)
Added
World.propagateModifiedBodyPositionsToCollidersto propagate rigid-bodies position changes to their attachedcolliders.
World.updateSceneQueriesto update the scene queries data structures without stepping the whole simulation.RigidBody.isEnabled, RigidBody.setEnabled, RigidBodyDesc.setEnabledto disable a rigid-body (and all itsattached colliders) without removing it from the physics world.
Collider.isEnabled, Collider.setEnabled, ColliderDesc.setEnabledto disable a collider without removing itfrom the physics world.
size:
Collider.setRadius, setHalfExtents, setRoundRadius, setHalfHeight.Modified
RigidBody.setBodyTypeto indicate if the rigid-body should awaken after changingits type.
Fixed
0.10.0 (2022-11-06)
Added
World.createCharacterController,World.removeCharacterControllerto create/remove a kinematic charactercontroller.
KinematicCharacterControllerclass and its methodKinematicCharacterController.computeColliderMovement. The character controller features currently supported are:HalfSpace(infinite plane) shape. Colliders with this shape can be built usingColliderDesc.halfspace.Modified
Collider.castShapeand World.castShape by adding a boolean argumentstop_at_penetrationbefore the filter-related arguments. Set this argument to
trueto get the same result as before. If this is set tofalseand the shape being cast starts it path already intersecting another shape, then a hit won’t be returnedwith that intersecting shape unless the casting movement would result in more penetrations.
Fixed
position, but before calling
World.step.0.9.0 (2022-10-07)
Fixed
contact manifolds (like triangle meshes).
Modified
RigidBodyDesc.setAdditionalMassmethod will now result in the additional angular inertiabeing automatically computed based on the shapes of the colliders attached to the rigid-body.
RigidBodyDesc.setAdditionalPrincipalAngularInertia. UseRigidBodyDesc.setAdditionalMassPropertiesinstead.RigidBodyDescandColliderDescwill now always copy the object provided bythe user instead of storing the object itself.
ColliderDesc.setRotation,ColliderDesc.setMassProperties,RigidBodyDesc.setRotation,RigidBodyDesc.setAdditionalMassProperties,RigidBodyDesc.setAngvel.RigidBody.restrictRotationsandRigidBody.restrictTranslationstoRigidBody.setEnabledRotationsandRigidBody.setEnabledTranslations.RigidBodyDesc.restrictRotationsandRigidBodyDesc.restrictTranslationstoRigidBodyDesc.enabledRotationsandRigidBodyDesc.enabledTranslations.Added
ImpulseJoint.setContactsEnabled, andMultibodyJoint.setContactsEnabledto set whethercontacts are enabled between colliders attached to rigid-bodies linked by this joint.
UnitImpulseJoint.setLimitsto set the limits of a unit joint.RigidBody.recomputeMassPropertiesFromCollidersto force the immediate computationof a rigid-body’s mass properties (instead of waiting for them to be recomputed during the next
timestep). This is useful to be able to read immediately the result of a change of a rigid-body
additional mass-properties or a change of one of its collider’s mass-properties.
RigidBody::setAdditionalMassto set the additional mass for the rigid-body. The additionalangular inertia is automatically computed based on the attached colliders shapes. If this automatic
angular inertia computation isn’t desired, use
RigidBody::setAdditionalMassPropertiesinstead.Collider.setDensity,.setMass,.setMassProperties, to alter a collider’s massproperties. Note that
.setMasswill result in the collider’s angular inertia being automaticallycomputed based on this mass and on its shape.
ColliderDesc.setMassto set the mass of the collider instead of its density. Its angularinertia tensor will be automatically computed based on this mass and its shape.
arguments to indicate if one particular collider, rigid-body, or type of colliders/rigid-bodies have to
be ignored by the query.
EventHandlertrait has been modified to includethe method
EventQueue.drainContactForceEvents. Contact force events are generated whenever the sum of themagnitudes of all the forces between two colliders is greater than any of their
Collider.contactForceEventThresholdvalues (only the colliders with theActiveEvents.CONTACT_FORCE_EVENTflag set are taken into account for this threshold).
0.8.1 (2022-04-06)
Starting with this release, all the examples in
testbed2dandtestbed3dhave been updated towebpack 5,and are written in Typescript. In addition, canary
0.0.0releases will be generated automatically after each mergeto the
masterbranch.Fixed
World.intersectionPairto always returnfalse.0.8.0 (2022-03-31)
Breaking changes
RigidBodyor
Colliderobjects instead. Handles are now only needed for events and hooks.ActiveCollisionTypesflags.RigidBody.applyForceand.applyTorquemethods have been replaced by.addForceand.addTorque. Theseforce/torques are no longer automatically zeroed after a timestep. To zero them manually, call
.resetForceor.resetTorque.EventQueue.drainContactEventsandEventQueue.drainIntersectionEventshave been merged into a singlemethod:
EventQueue:drainCollisionEvents.Added
integration of the debug-renderer with
THREE.jsandPIXI.js.in only valid as long as the corresponding objects is inserted to the
World.wakeUp: boolargument to theWorld.createImpulseJointandMultibodyJointSet::createMultibodyJointtoautomatically wake-up the rigid-bodies attached to the inserted joint.
filtercallback to all the scene queries. Use this for filtering more fine-grained than collision groups.collider.shapethat represents the shape of a collider. This is a more convenient way of reading the collider’sshape properties. Modifying this shape will have no effect unless
collider.setShapeis called with the modifiedshape.
Collider.containsPoint,.projectPoint,.intersectsRay,.castShape,.castCollider,.intersectsShape,.contactShape,.contactCollider,.castRay,.castRayAndGetNormal.Shape.containsPoint,.projectPoint,.intersectsRay,.castShape,.intersectsShape,.contactShape,.castRay,.castRayAndGetNormal.World.projectPointAndGetFeaturewhich includes the feature Id the projected point lies on.RigidBodyDesc.sleepingto initialize the rigid-body in a sleeping state.0.8.0-alpha.2 (2022-03-20)
The changelog hasn’t been updated yet.
For an overview of the changes, refer to the changelog for the unreleased Rust version:
https://github.com/dimforge/rapier/blob/master/CHANGELOG.md#unreleased
0.8.0-alpha.1 (2022-01-28)
Fixed
collider.setShape.world.collidersWithAabbIntersectingAabb.0.8.0-alpha.0 (2022-01-16)
This release updates to Rapier 0.12.0-alpha.0 which contains:
This is an alpha release because the new solver still needs some tuning,
and the spherical joint motors/limits is currently not working.
Breaking changes
BallJointtoSphericalJoint.BallJointtoRevoluteJoint.RevoluteJoint,PrismaticJoint,createJoint, etc.) have renamed toinclude
impulsein the names:RevoluteImpulseJoint,PrismaticImpulseJoint,createImpulseJoint, etc. This isto differentiate them from the new multibody joints.
maxPositionIterations,jointErp,warmstartCoeff,allowedAngularError,maxLinearCorrection,maxAngularCorrection).Added
by
world.createMultibodyJointinstead ofworld.createImpulseJoint.rigidBody.restrictTranslation.Fixed
0.7.6
This release updates to Rapier 0.11.1 which contains several bug fixes.
Fixed
appropriate flags were set.
0.7.5
Fixed
under some conditions.
0.7.4
This release was broken and has been unpublished.
0.7.3
Fixed
collider.halfExtents()methods now returns a valid value for round cuboids.0.7.2 (rapier-compat only)
Modified
rapier-compatpackages don’t need theBufferpolyfill anymore.0.7.1
Modified
rapier-compatpackages are now generated by rollup.v0.7.0
The typescripts bindings for Rapier have
a brand new user-guide
covering all the features of the physics engine!
Breaking change
World.castRayandWorld.castRayAndGetNormalmethods have a different signature now, making themmore flexible.
ActiveHooks::FILTER_CONTACT_PAIRtoActiveHooks.FILTER_CONTACT_PAIRS.ActiveHooks::FILTER_INTERSECTION_PAIRtoActiveHooks.FILTER_INTERSECTION_PAIRS.BodyStatustoRigidBodyType.RigidBody.bodyStatus()toRigidBody.bodyType().RigidBodyDesc.setMassPropertiestoRigidBodyDesc.setAdditionalMassProperties.RigidBodyDesc.setPrincipalAngularInertiatoRigidBodyDesc.setAdditionalPrincipalAngularInertia.ColliderDesc.setIsSensorto `ColliderDesc.setSensor.Added
Ray.pointAt(t)that conveniently computesray.origin + ray.dir * t.Joint. Each joint nowhave its relevant motor configuration
methods:
configurMotorModel, configureMotorVelocity, configureMotorPosition, configureMotor.World.collidersWithAabbIntersectingAabbfor retrieving the handles of all the colliders intersecting the givenAABB.
RigidBody.lockTranslationsRigidBody.lockRotationsRigidBody.restrictRotationsRigidBody.dominanceGroupRigidBody.setDominanceGroupRigidBody.enableCcdRigidBodyDesc.setDominanceGroupfor setting the dominance group of the rigid-body being built.Collider.setSendorCollider.setShapeCollider.setRestitutionCollider.setFrictionCollider.frictionCombineRuleCollider.setFrictionCombineRuleCollider.restitutionCombineRuleCollider.setRestitutionCombineRuleCollider.setCollisionGroupsCollider.setSolverGroupsCollider.activeHooksCollider.setActiveHooksCollider.activeEventsCollider.setActiveEventsCollider.activeCollisionTypesCollider.setTranslationCollider.setTranslationWrtParentCollider.setRotationCollider.setRotationWrtParentColliderDesc.setMassPropertiesfor setting explicitly the mass properties of the collider being built (insteadof relying on density).
Modified
of
World.createCollideris now optional.
v0.6.0
Breaking changes
BodyStatus::Kinematicvariant has been replaced byBodyStatus::KinematicPositionBasedandBodyStatus::KinematicVelocityBased. Position-based kinematic bodies are controlled by setting (at each frame) thenext
kinematic position of the rigid-body (just like before), and the velocity-based kinematic bodies are controlled
by setting (at each frame) the velocity of the rigid-body.
RigidBodyDesc.newKinematichas been replaced byRigidBodyDesc.newKinematicPositionBasedandRigidBodyDesc.newKinematicVelocityBasedin order to build a position-based or velocity-based kinematic body.by setting
its
ActiveEvents:ColliderDesc.setActiveEvents(ActiveEvents.PROXIMITY_EVENTS | ActiveEvents.ContactEvents).Added
world.narrowPhase.contactsWith(collider1, callback)world.narrowPhase.intersectionsWith(collider1, callback)world.narrowPhase.contactPair(collider1, collider2, callback)world.narrowPhase.intersectionPair(collider1, collider2, callback)based on a JS object by doing the following:
ColliderDesc.setActiveHooks(ActiveHooks.FILTER_CONTACT_PAIR | ActiveHooks.FILTER_CONTACT_PAIR)PhysicsHooksinterface.World.stepmethod.body and a fixed body) by setting the active collision types of a collider:
ColliderDesc.setActiveCollisionTypes(ActiveCollisionTypes.ALL)v0.5.3
v0.5.2
before stepping the simulation.
v0.5.1
v0.5.0
RigidBodyDesc::setCcdEnabledto enable Continuous Collision Detection (CCD) for this rigid-body. CCD ensuresthat a fast-moving rigid-body doesn't miss a collision (the tunneling problem).
Breaking changes:
IntegrationParameters. These were unused parameters.v0.4.0
its radius.
Breaking changes:
IntegrationParameters.restitutionVelocityThresholdand
IntegrationParameters.set_restitutionVelocityThreshold.v0.3.1
ColliderDesc.convexHullshape.RigidBodyDesc.setMassas mentioned in the 0.3.0 changelog.v0.3.0
Added
RAPIER.version()function at the root of the package to retrieve the version of Rapier as a string.Several geometric queries have been added (the same methods have been added to the
QueryPipelinetoo):World.intersectionsWithRay: get all colliders intersecting a ray.World.intersectionWithShape: get one collider intersecting a shape.World.projectPoint: get the projection of a point on the closest collider.World.intersectionsWithPoint: get all the colliders containing a point.World.castShape: get the first collider intersecting a shape moving linearly(aka. sweep test).
World.intersectionsWithShape: get all the colliders intersecting a shape.Several new shape types are now supported:
RoundCuboid,Segment,Triangle,RoundTriangle,Polyline,ConvexPolygon(2D only),RoundConvexPolygon(2D only),ConvexPolyhedron(3D only),RoundConvexPolyhedron(3D only),RoundCone(3D only).It is possible to build
ColliderDescusing these new shapes:ColliderDesc.roundCuboid,ColliderDesc.segment,ColliderDesc.triangle,ColliderDesc.roundTriangle,ColliderDesc.convexHull,ColliderDesc.roundConvexHull,ColliderDesc.Polyline,ColliderDesc.convexPolyline(2D only),ColliderDesc.roundConvexPolyline(2D only),ColliderDesc.convexMesh(3D only),ColliderDesc.roundConvexMesh(3D only),ColliderDesc.roundCone(3D only).It is possible to specify different rules for combining friction and restitution coefficients of the two colliders
involved in a contact with:
ColliderDesc.frictionCombineRule, andColliderDesc.restitutionCombineRule.Various RigidBody-related getter and setters have been added:
RigidBodyDesc.newStatic,RigidBodyDesc.newDynamic, andRigidBodyDesc.newKinematicare new static method, shortequivalent to
new RigidBodyDesc(BodyStatus.Static), etc.RigidBodyDesc.setGravityScale,RigidBody.gravityScale,RigidBody.setGravityScaleto get/set the scale factorapplied to the gravity affecting a rigid-body. Setting this to 0.0 will make the rigid-body ignore gravity.
RigidBody.setLinearDampingandRigidBody.setAngularDampingto set the linear and angular damping of therigid-body.
RigidBodyDesc.restrictRotationsto prevent rotations along specific coordinate axes. This replaces the three booleanarguments previously passed to
.setPrincipalAngularInertia.Breaking changes
Breaking changes related to rigid-bodies:
RigidBodyDesc.setTranslationandRigidBodyDesc.setLinvelmethods now take the components of the translationdirectly as arguments instead of a single
Vector.RigidBodyDesc.setMasstakes only one argument now. UseRigidBodyDesc.lockTranslationsto lock thetranslational motion of the rigid-body.
RigidBodyDesc.setPrincipalAngularInertiano longer have boolean parameters to lock rotations.Use
RigidBodyDesc.lockRotationsorRigidBodyDesc.restrictRotationsto lock the rotational motion of therigid-body.
Breaking changes related to colliders:
ColliderDesc.setTranslationmethod now take the components of the translation directly as arguments instead of asingle
Vector.roundRadiusfields have been renamedborderRadius.RawShapeType.Polygonno longer exists. For a 2D convex polygon, useRawShapeType.ConvexPolygoninstead.
Trimeshhave been replaced byTriMesh(note the change in case).Breaking changes related to events:
ProximitytoIntersection.Proximityenum has been removed.drainIntersectionEvents(previously calleddrainProximityEvent) will now call a callback witharguments
(number, number, boolean): two collider handles, and a boolean indicating if they are intersecting.Breaking changes related to scene queries:
QueryPipeline.castRaymethod now takes two additional parameters: a boolean indicating if the ray should notpropagate if it starts inside of a shape, and a bit mask indicating the group the ray is part of and these it
interacts with.
World.castRayandQueryPipeline.castRaynow return a struct of typeRayColliderHitwhich no longer contains the normal at the hit point. Use the new methods
World.castRayAndGetNormalor
QueryPipeline.castRayAndGetNormalin order to retrieve the normal too.v0.2.13
RigidBodyDesc.setMass(m)withm != 0.0would cause the rotations of the created rigid-body to belocked.
v0.2.12
RigidBodyDesc.setMassto indicate if the mass contribution of colliders should be enabledfor this rigid-body or not.
RigidBody.lockRotationsmethod to lock all the rigid-body rotations resulting from forces.RigidBody.lockTranslationsmethod to lock all the rigid-body translations resulting from forces.RigidBody.setPrincipalAngularInertiamethod to set the principal inertia of the rigid-body. This gives theability to lock individual rotation axes of one rigid-body.
v0.2.11
v0.2.10
JointData.prismaticandJointData.fixedfor creating prismatic joint or fixed joints.v0.2.9
RigidBody.setLinvelto set the linear velocity of a rigid-body.RigidBody.setAngvelto set the angular velocity of a rigid-body.v0.2.8
RigidBodySet.removeto remove a rigid-body from the set.ColliderSet.removeto remove a collider from the set.JointSet.removeto remove a joint from the set.RigidBodyDesc.setLinearDampingandRigidBodyDesc.setAngularDampingfor setting the linear and angular dampingcoefficient of the rigid-body to create.
RigidBodyDesc.setMass, andRigidBodyDesc.setMassPropertiesfor setting the initial mass properties of arigid-body.
ColliderDesc.setCollisionGroupsto use bit-masks for collision filtering between some pairs of colliders.ColliderDesc.setSolverGroupsto use bit-masks for making the constraints solver ignore contacts between somepairs of colliders.
ColliderDesc.heightfieldto build a collider with an heightfield shape.ColliderDesc.trimeshto build a collider with a triangle mesh shape.v0.2.7
v0.2.6
v0.2.5
RigidBody.isKinematic()andRigidBody.isDynamic().v0.2.4
v0.2.3
v0.2.2
isSensorproperties ofColliderDescto not be taken into account.world.createCollideris not a number.v0.2.1
This is a significant rewrite of the JavaScript bindings for rapier. The objective of this rewrite is to make the API
closer to Rapier's and remove most need for manual memory management.
.free()is now required only for objects that live for the whole duration of the simulation. This means thatit is no longer necessary to
.free()vectors, rays, ray intersections, colliders, rigid-bodies, etc. Object thatcontinue to require an explicit
.free()are:WorldandEventQueue.Worlddirectly:RigidBodySet,ColliderSet,JointSet,IntegrationParameters,PhysicsPipeline,QueryPipeline,
SerializationPipeline, andEventQueue.RigidBodyHandleof its parent (instead of theRigidBodydirectly).world.createCollider, i.e.,body.createCollider(colliderDesc)becomes
world.createCollider(colliderDesc, bodyHandle).ShapeType.BallandShapeType.Cuboidinstead of"ball"and
"cuboid".collider.handleis now a field instead of a function.body.handleis now a field instead of a function.Vectorinstead of individual components, i.e.,let world = new RAPIER.World(x, y, z);becomes
let world = new RAPIER.World(new RAPIER.Vector3(x, y, z)).setPosition,setKinematicPosition,setRotation, etc.)now take a
VectororRotationstructure instead. For examplerigid_body.setKinematicPosition(x, y, z)becomes
rigid_body.setKinematicPosition(new RAPIER.Vector3(x, y, z)).world.stepWithEventsbecomesworld.step(the event queue is the last optional argument).RigidBodyDescandColliderDescnow use the builder pattern. For examplelet bodyDesc = new RAPIER.RigidBodyDesc("dynamic"); bodyDesc.setTranslation(x, y, z)becomesnew RigidBodyDesc(BodyStatus.Dynamic).setTranslation(new Vector(x, y, z)).ray.dirandray.originare now fields instead of methods.numberinstead of aRotationstruct. So instead of doingrotation.angle, single usethe number as the rotation angle.
Rotation(with fields{x,y,z,w}) or the classQuaternion. Anyobject with these
{x, y, z, w}fields can be used wherever aRotationis required.Vector(with fields{x,y}) or the classVector2). Any objectwith these
{x,y}fields can be used wherever aVectoris required.Vector(with fields{x,y,z}) or the classVector3). Any objectwith these
{x,y,z}fields can be used wherever aVectoris required.v0.2.0
See changelogs for v0.2.1 instead. The NPM package for v0.2.0 were missing some files.
v0.1.17
v0.1.16
new Ray(origin, direction)constructor instead ofRay.new(origin, direction).v0.1.15
v0.1.14
with
Vector.free()afterwards.v0.1.13
rigidBody.setNextKinematicTranslationto set the translation of a kinematic rigid-body at the next timestep.rigidBody.setNextKinematicRotationto set the rotation of a kinematic rigid-body at the next timestep.rigidBody.predictedTranslationto get the translation of a kinematic rigid-body at the next timestep.rigidBody.predictedRotationto set the rotation of a kinematic rigid-body at the next timestep.RayandRayIntersectionstructures for ray-casting.world.castRayto compute the first hit of a ray with the physics scene.rigidBody.setPosition.v0.1.12
world.removeCollider(collider)to remove a collider from the physics world.colliderDesc.setTranslation(...)to set the relative translation of the collider to build wrt. the rigid-bodyit is attached to.
colliderDesc.setRotation(...)to set the relative rotation of the collider to build wrt. the rigid-body it isattached to.
v0.1.11
v0.1.10
restoration.
v0.1.9
world.getCollider(handle)that retrieves a collider from its integer handle.joint.handle()that returns the integer handle of the joint.v0.1.8
world.forEachRigidBodyHandle(f)to apply a closure on the integer handle of each rigid-body on the world.world.forEachActiveRigidBody(f)to apply a closure on each rigid-body on the world.world.forEachActiveRigidBodyHandle(f)to apply a closure on the integer handle of each rigid-body on theworld.
rigidBody.applyForce,.applyTorque,.applyImpulse,.applyTorqueImpulse,.applyForceAtPoint, and.applyImpulseAtPointto apply a manual force or torque to a rigid-body.EventQueuestructure that can be used to collect and iterate through physics events.Proximityenum that represents the proximity state of a sensor collider and another collider.world.stepWithEvents(eventQueue)which executes a physics timestep and collects the physics events intothe given event queue.
v0.1.7
world.getRigidBody(handle)to retrieve a rigid-body from its handle.world.getJoint(handle)to retrieve a joint from its handle.rigidBody.rotation()to retrieve its world-space orientation as a quaternion.rigidBody.setTranslation(...)to set the translation of a rigid-body.rigidBody.setRotation(...)to set the orientation of a rigid-body.rigidBody.wakeUp()to manually wake up a rigid-body.rigidBody_desc.setRotation(...)to set tho orientation of the rigid-body to be created.v0.1.6
world.removeRigidBody(...)to remove a rigid-body from the world.v0.19.2Compare Source
v0.19.1Compare Source
v0.19.0Compare Source
v0.18.2Compare Source
v0.18.1Compare Source
v0.18.0Compare Source
v0.17.3Compare Source
Fix
v0.17.2Compare Source
Added
RAPIER.reserveMemoryto instruct the internal allocator to pre-allocate more memory in preparationfor future operations. This typically called only once after initializing the WASM module.
v0.17.1Compare Source
Added
World.debugRender(filterFlags, filterPredicate)to prevent some colliders from beingrendered.
Collider.combineVoxelStatesto ensure two adjacent voxels colliders don’t suffer from the internal edgesproblem, and
Collider.propagateVoxelChangeto maintain that coupling after modifications with.setVoxel.v0.17.0Compare Source
Fixed
Added
v0.16.2Compare Source
Fixed
collider.setVoxel.v0.16.1Compare Source
Added
Collider.clearShapeCacheto release the reference to the JS shape stored in the collider, oor too force itsrecomputation the next time the collider shape is accessed.
v0.16.0Compare Source
Added
ColliderDesc.voxelsto create a collider with a shape optimized for voxels.Collider.setVoxelfor adding or removing a voxel from a collider with a voxel shape.Voxelsshape class.The support or voxels is still experimental. In particular the following features will currently not work on
colliders with voxel shapes:
See parry#336 for additional information.
v0.15.1Compare Source
Added
RigidBody.velocityAtPointfunction to retrieve the velocity of a given world-space point on a rigid-body.Modified
TriMeshFlags.FIX_INTERNAL_EDGESflag will no longerimply that the
TriMeshFlags.ORIENTEDflag is set, avoiding edge-cases where enablingFIX_INTERNAL_EDGESresults in unexpected collisions between open meshes and balls.
Fixed
*-simd-compatbuilds not actually emitting SIMD instructions.v0.15.0Compare Source
Added
PidController,World.createPidController,World.removePidControllerto create a Position-Integral-Derivativecontroller; a building block for building velocity-based dynamic character controllers.
Modified
rapier2dandrapier3dare now built withoutenhanced-determinismfeature enabled,so if you rely on that feature, you should migrate to the new
-deterministicflavor.v0.14.0Compare Source
Modified
Added
RigidBody.userForcefunction to retrieve the constant force(s) the user added to a rigid-bodyRigidBody.userTorquefunction to retrieve the constant torque(s) the user added to a rigid-bodyv0.13.1Compare Source
Fixed
v0.13.0Compare Source
Several stability improvements are added as part of this release.
See rapier#625 for overviews of the most important improvements.
Modified
castShapeandcastColliderfunctions have been modified to add atargetDistanceparameter. This parameterindicates the distance below which a hit is detected.
RayIntersection.toito.timeOfImpactfor better clarity.RayColliderIntersection.toito.timeOfImpactfor better clarity.RayColliderToitoRayColliderHit.RayColliderHit.toito.timeOfImpactfor better clarity.ShapeTOItoShapeCastHit.ShapeColliderTOItoColliderShapeCastHit.ShapeCastHit.toito.timeOfImpact.Added
KinematicCharacterController.normalNudgeFactorand.setNormalNudgeFactorso set a coefficient used foravoiding having the character controller get stuck on penetrations.
RigidBody.softCcdPrediction,.setSoftCcdPrediction, andRigidBodyDesc.setSoftCcdPredictionfor configuringsoft-ccd on the rigid-body. See rapier#625 for additional details on
soft-ccd.
TriMeshFlags::FIX_INTERNAL_EDGESandHeightFieldFlags::FIX_INTERNAL_EDGESfor enablinginternal edges correction (which is no longer enabled by default). The flags have been added as an optional parameter
when building the shapes.
Collider.contactSkin,.setContactSkin, andColliderDesc.setContactSkinfor configuring the collider’scontact skin. See rapier#625 for additional details on contact skins.
World.lengthUnitwhich can be used to indicate the typical size of dynamic objects (e.g. 100 pixels instead of1 meter). This helps the physics engine adjust internal thresholds for better results.
Fixed
v0.12.0Compare Source
The main highlight of this release is the implementation of a new non-linear constraints solver for better stability
and increased convergence rates. See #579 for additional information.
In order to adjust the number of iterations of the new solver, simply adjust
World.numSolverIterations.If recovering the old solver behavior is useful to you, call
World.switchToStandardPgsSolver().It is now possible to specify some additional solver iteration for specific rigid-bodies (and everything interacting
with it directly or indirectly through contacts and joints):
RigidBodyDesc.additionalSolverIterationsandRigidBody::setAdditionalSolverIterations. This allows for higher-accuracy on subsets of the physics scenewithout affecting performance of the other parts of the simulation.
Modified
CharacterController.translationApplied,.translationRemainingand thedesiredTranslationmethod argument to
CharacterController.translationDeltaApplied,.translationDeltaRemainingand thedesiredTranslationDeltato avoid confusion with the usage of thetranslationworld iConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.