These are some animations that I've made for a few past projects such as FWD projects, AIA One, The Executive Centre and more. I used Illustrator to create the shapes and objects and animated them with After Effects. Then I exported them using Lottie by Airbnb as a json file for the developers to seamlessly integrate them. By doing this, the developers are able to manipulate the animation to respond to any interactions. Because the animation is a json file, not only is it lightweight, it's also scalable without pixelation unlike gifs or videos. Don't belive me? Try zooming in ;)
Check out the Lottie documentation to learn more.