D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jadiehm
Full window
Github gist
After Effects animations to canvas with bodymovin.js
<!DOCTYPE html> <html> <body> <div id="bodymovin"></div> <script src='bodymovin.js'></script> <script> // cross-browser but verbose var xhr = new XMLHttpRequest(); xhr.onload = function () { start( JSON.parse( xhr.responseText ) ); }; xhr.open( 'GET', 'data.json' ); xhr.send(); // modern and lovely, doesn't work in Safari // fetch( 'data.json' ).then( r => r.json() ).then( start ); function start ( animationData ) { var params = { container: document.getElementById('bodymovin'), renderer: 'canvas', loop: true, autoplay: true, animationData: animationData }; var anim; anim = bodymovin.loadAnimation(params); } </script> </body> </html>