Animated items

Im trying to make a propeller hat for my datapack, and i want the propeller to be animated. How do i make an animated hat like that?
Continue to help post