Vector like animations on background

I've come across that more and more sites in web-dev seems to use these vector style animations to explain a concept. Eg. https://www.docker.com/ - there is that little factory thing with the geometric on the rolling hoop.

I am trying to figure out how this is done...

I can see that it is on a canvas element.

When I take save image I get a png as a frame from where the animation is when I click save.

Can anyone explain to me how this is coded?