js代码
<script type="text/javascript" src="js/bodymovin.min.js"></script> <script type="text/javascript"> var select = function(s) { return document.querySelector(s); }, selectAll = function(s) { return document.querySelectorAll(s); }, animationWindow = select('#animationWindow'), animData = { wrapper: animationWindow, animType: 'svg', loop: true, prerender: true, autoplay: true, path: 'world.json' }, anim; anim = bodymovin.loadAnimation(animData); //anim.addEventListener('DOMLoaded', onDOMLoaded); anim.setSpeed(1.4); </script>