How to change shape of a mesh after bones have moved?


I’m a beginner when it comes to 3D in general.

I have successfully loaded a model with bones, mesh and material with the help of Threejs.

I’m trying to make the model bend when it collides with a surface.

Think of a soft ball bending when it hits a floor (the surface of the ball lays flat against the floor and there’s a small radius surrounding the flat area).

However my model is not a ball (it can have any shape).

I have figured out how to get the vertexes from a BufferGeometry.

But the coordinates are before bones are applied.

I might think if it wrong, but this is the way I see it happen.

Mesh vertex positions.
Bones rotate, scale, position.
<here is where I wish to deploy changes to the vertexes, like an animation>
Light, shadows.

I might be able to describe it better as I understand more.

Best Regards
/ Rasmus