Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Created November 9, 2017 07:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeMyUI/13ce97bb6bf2bb4531613cda2a0ca4aa to your computer and use it in GitHub Desktop.
Save CodeMyUI/13ce97bb6bf2bb4531613cda2a0ca4aa to your computer and use it in GitHub Desktop.
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