If I have some shapes defined using arrays of coordinates e.g.
[[-30, -30], [-30, 30], [30, 30], [30, -30]]
and edges defined using:
use css transition and change transform by javascript
https://www.w3schools.com/cssref/css3_pr_transform.asp
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions