You can do animation in PDF slides with latex ONLY with multimedia package, ONLY with LuaLaTeX ONLY in okular (on linux).
JS based animation out for "security" reasons, XeLaTeX etc can't build multimedia, evince etc needs mouse click but in presentation mode it means next page 🤦