This is going to depend on other factors, I doubt very much that anyone is going to say 100% of the time do this and 100% of the time don't do this.
I created a site about 9 months ago
Birds For Sale and almost the entire homepage and sub-page headers has an animation on it and for them, in their situation it works very well.
Would I do that for a B2B insurance company or a credit union, of course not. The point being it depends on what kind of site, your audience and if the animation serves a purpose or not.