Animate every point of a line to another line

I want to implement an animation.

The animation should be a line move to another line. There will be some deformation in the process of the line moving

There is a correspondence between the points of the two lines.

How to implements it with three.js?

In these examples, the geometry is animated. You can do it similar to this.

From the Collection of examples from



Tks.But some of the example are too old for three.js version. And find the source cost me some time. Finally I find the solution in three.js animation morphTargetInfluences