Optional raw: RawSoftBodySetPrivate finishMaps the soft bodies, proxies and colliders a topology change created, and unmaps what it removed.
Private mapAdds a cluster over the given particles: a rigid proxy that joints and colliders can
attach to. Returns the cluster's index, or null if no particle was valid.
Creates a new soft body, its hidden root rigid body and its colliders, and returns it.
The set of rigid bodies receiving the body's proxies.
The set of colliders receiving the body's colliders.
The description of the soft body to create.
Cuts a soft body along a blade: a segment (two points) in 2D, a triangle (three points) in 3D. Pieces disconnected by the cut become soft bodies of their own.
Returns the tear event (which must be freed), or null when nothing changed.
Internal method, do not call this explicitly.
Applies the given closure to each soft body contained by this set.
Wraps the soft bodies the engine created (the pieces a tear split off) that have no JavaScript wrapper yet; the pieces of a tear event are only reachable after this.
Removes a soft body from this set, with its proxies, colliders and attached joints.
Removes a cluster with its proxy, colliders and joints. Returns false if the cluster
did not exist.
Tears a soft body at once along the given edges and through the given cells, without removing material. Pieces disconnected by the tear become soft bodies of their own.
Returns the tear event (which must be freed), or null when nothing changed.
Wakes a soft body and everything it touches up.
If true the bodies stay awake for a while even if they are at rest.
A set of soft bodies that can be handled by a physics pipeline.
To avoid leaking WASM resources, this MUST be freed manually with
softBodySet.free()once you are done using it (and all the soft bodies it created).