Skip to content

Releases: jrouwe/JoltPhysics.js

0.36.0

06 May 20:41
Compare
Choose a tag to compare

0.36.0

  • Added Cosserat rods to soft bodies. This is a stick constraint with an orientation that can be used to attach geometry. Can be used e.g. to simulate vegetation in a cheap way.
  • Added CompoundShapeSettings AddShapeShape / AddShapeShapeSettings and deprecated AddShape
  • Added Vec4 IsNearZero
  • Added HingeConstraint SetTargetOrientationBS
  • Added ability to drive hinge constraints with Ragdoll::DriveToPoseUsingMotors. This also adds HingeConstraint::SetTargetOrientationBS which sets the target angle in body space.
  • Fixed an issue where soft body bend constraints could be created with identical vertices. This led to an assert triggering.
  • Fixed infinite recursion when colliding a TriangleShape vs a TriangleShape.

0.35.0

31 Mar 19:11
Compare
Choose a tag to compare
  • Renamed cmake option TOTAL_MEMORY to INITIAL_MEMORY
  • Exposing new cmake option MAXIMUM_MEMORY
  • Exposing all Array constructors to JavaScript
  • Updated to emscripten 4.0.6

0.34.0

17 Mar 21:20
Compare
Choose a tag to compare

Reverting back to emscripten 3.1.74 because there's multiple issues with emscripten 4.0.0+:

  • The WASM compat build became 2.4x as big
  • -s LEGACY_VM_SUPPORT=1 doesn't work in debug builds
  • i64 types need to be passed as BigInt now which breaks the API

0.33.0

16 Mar 10:37
Compare
Choose a tag to compare

Update to Jolt Physics v5.3.0, this brings in the following changes:

  • Added accessors to the vehicle anti roll bars.
  • Added Get/SetCollisionGroup on BodyInterface.
  • Fix stack corruption when destroying extremely unbalanced broad phase tree.
  • When updating the simulation with a delta time of 0, contact remove callbacks were triggered by accident for all existing contacts.
  • Fixed HingeConstraint not having limits if LimitsMin was set to -PI or LimitsMax was set to PI. It should only be turned off if both are.
  • Made BodyInterface::SetShape, NotifyShapeChanged, SetPosition, SetRotation, SetPositionAndRotation and SetPositionAndRotationWhenChanged work when body has not been added to the PhysicsSystem yet and passing the EActivation::Activate flag.
  • Improved stability of cylinder contact points.
  • When there were no active bodies, the step listeners weren't called.
  • Fixed assert: It should be possible to add zero bodies to the physics system.

0.32.0

15 Feb 10:10
Compare
Choose a tag to compare

Breaking changes:

  • Added OnContactPersisted, OnContactRemoved, OnCharacterContactPersisted and OnCharacterContactRemoved functions on CharacterContactListener to better match the interface of ContactListener.
  • Renamed PhysicsSettings mManifoldToleranceSq to mManifoldTolerance (and the value is no longer squared)
  • VehicleController is no longer a refcounted class

Added:

  • Added support for CharacterVirtual to override the inner rigid body ID. This can be used to make the simulation deterministic in e.g. client/server setups.
  • Every CharacterVirtual now has a CharacterID. This ID can be used to identify the character after removal and is used to make the simulation deterministic in case a character collides with multiple other virtual characters.
  • Added MeshShapeSettings mBuildQuality to control run time performance vs build speed
  • Added Vec3/RVec3/Vec4 sOne

Fixed:

  • Removing a sub shape from a MutableCompoundShape would not update the bounding box if the last shape was removed, which can result in a small performance loss.
  • VehicleConstraint would override Body::SetAllowSleeping every frame, making it impossible for client code to configure a vehicle that cannot go to sleep.
  • Fixed CharacterVirtual::Contact::mIsSensorB not being persisted in SaveState.
  • Fixed CharacterVirtual::Contact::mHadContact not being true for collisions with sensors. They will still be marked as mWasDiscarded to prevent any further interaction.
  • Fixed Character::SetShape failing to switch when standing inside a sensor / Character::PostSimulation finding a sensor as ground collision.
  • Fixed numerical inaccuracy in penetration depth calculation when CollideShapeSettings::mMaxSeparationDistance was set to a really high value (e.g. 1000).
  • Bugfix in Semaphore::Acquire for non-windows platform. The count was updated before waiting, meaning that the counter would become -(number of waiting threads) and the semaphore would not wake up until at least the same amount of releases was done. In practice this meant that the main thread had to do the last (number of threads) jobs, slowing down the simulation a bit.
  • An empty MutableCompoundShape now returns the same local bounding box as EmptyShape (a point at (0, 0, 0)). This prevents floating point overflow exceptions.
  • Fixed a bug in ManifoldBetweenTwoFaces that led to incorrect ContactManifold::mRelativeContactPointsOn2 when the contact normal and the face normal were not roughly parallel. Also it led to possibly jitter in the simulation in that case.
  • Fixed InternalEdgeRemovingCollector not working when colliding with a very dense triangle grid because it ran out of internal space. Now falling back to memory allocations when this happens to avoid ghost collisions.
  • Fixed running out of stack space when simulating a really high number of active rigid bodies.
  • Moved the 'broad phase bit' to the highest bit in BodyID to avoid running out of NodeIDs in BroadPhaseQuadTree when calling PhysicsSystem::OptimizeBroadPhase on a tree with a very high body count.
  • TempAllocatorImpl uses 64 bit integers internally to allow for a higher max contact constraint count.

0.31.0

30 Dec 22:06
Compare
Choose a tag to compare

Updated to latest Jolt version

Added:

  • The ability to add a sub shape at a specified index in a MutableCompoundShape rather than at the end.
  • PhysicsSystem::SetSimShapeFilter. This allows filtering out collisions between sub shapes within a body and can for example be used to have a single body that contains a low detail simulation shape an a high detail collision query shape.
  • Shape/PlaneShape::SetMaterial
  • SkeletonAnimation::SetIsLooping/IsLooping
  • CharacterVirtual::HasCollidedWith/HasCollidedWithCharacter/GetActiveContacts
  • Mat44::sRotationAxisAngle/sScaleVec3/MulMat44
  • AABox::sFromTriangle/EncapsulateIndexedTriangle/GetExtent

Fixed:

  • Fixed return type of CreateBodyWithID and CreateSoftBodyWithID
  • Fixed CharacterVsCharacterCollisionSimple constructor
  • BodyInterface::AddForce applied a force per soft body vertex rather than to the whole body, this resulted in a soft body accelerating much more compared to a rigid body of the same mass. If you are applying forces to soft bodies, you need to multiply the force by the number of vertices of the soft body to get the same effect as before.

0.30.0

27 Nov 16:03
Compare
Choose a tag to compare

Added:

  • PathConstraintPathHermite
  • Various function on AABox
  • SaveState/RestoreState on Body, Constraint and CharacterBase
  • ScaleToMass on MotionProperties
  • CollideShapeWithInternalEdgeRemoval on NarrowPhaseQuery
  • GetConstraint on VehicleController

Updated to latest Jolt, highlights:

  • Fixed bodies gaining more energy than intended due to restitution. E.g. A restitution of 1 could lead to bodies bouncing ever higher.
  • Optimized creation of MeshShape. Improves build speed by about 25% and reduces number of allocations by a factor of 1000. Allocations caused contention when building meshes from multiple threads.

0.29.0

03 Nov 17:10
Compare
Choose a tag to compare
  • Added batch add/remove interfaces to BodyInterface
  • Exposing more functions (among which the operators) of the Vec3, RVec3, Mat44, RMat44, Vec4, Vector2 and AABox classes

0.28.1

01 Nov 12:10
Compare
Choose a tag to compare
  • Fixed an issue that caused the multi-threaded simulation to fail on FireFox.
  • Added JoltSettings::mMaxWorkerThreads to limit the number of threads Jolt will use

0.28.0

21 Oct 20:58
Compare
Choose a tag to compare
  • Added multithreaded versions of the library to the package
  • Exposing new functions on Quat: MulQuat, MulVec3 and MulFloat

Compare the stress test without multi threading and the same test with multi threading.