collider_contact_skin
The contact skin of a collider acts as if the collider was enlarged by a skin of the given thickness: the objects touching it are kept that much further apart. The default is zero, i.e., no skin at all.
A non-zero contact skin can improve the performances and, in some cases, the stability of the simulation, because the contacts will have more room to prevent penetrations. However, as a result it leaves a small gap between the colliding objects, equal to the sum of their skins. Therefore the skin should be small enough for that gap to remain invisible, or to be hidden by the rendering assets. The contact skin is especially relevant when using non-convex shapes made of thin features like triangle meshes and polylines.
/* Set the contact skin when the collider is created. */
let skinColliderDesc = RAPIER.ColliderDesc.ball(0.5).setContactSkin(0.01);
let skinCollider = world.createCollider(skinColliderDesc);
/* Set the contact skin after the collider creation. */
skinCollider.setContactSkin(0.01);