Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Created Nov 9, 2017
Embed
What would you like to do?
LEGO Loader
<div id="animationWindow">
</div>

LEGO Loader

Everybody loves LEGO and nobody likes waiting. 

I've lost track of the number of vehicles and buildings I've made with my son since he had his tonsils out. I just had to dip back into the digital realm for a few hours!

A Pen by Chris Gannon on CodePen.

License.

var animData = {
wrapper: document.querySelector('#animationWindow'),
animType: 'svg',
loop: true,
prerender: true,
autoplay: true,
path: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/35984/LEGO_loader.json'
};
var anim = bodymovin.loadAnimation(animData);
anim.setSpeed(3.4);
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.8.0/bodymovin.min.js"></script>
body {
background-color: #FDC800;
overflow: hidden;
text-align: center;
}
body,
html {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#animationWindow {
width: 100%;
height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment