Created
November 30, 2018 15:36
-
-
Save jefBinomed/f42b30766465132d06252ece7bc3e6f4 to your computer and use it in GitHub Desktop.
2018-countdown-loads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First I load the 'sprites' | |
loadSprites([ | |
{title:'logos', url: 'imgs/logos.svg'}, | |
{title:'spaceship', url: 'imgs/spaceship.png'} | |
]).then(function(){ | |
// When the sprites are load, I start multiples 'intervals' | |
// One for the music | |
nextSong(); | |
// One that display the grid, the space ship, ... (based on requestAnimationFrameRate) | |
runAnimation(); | |
// One that move the logos (every 5 000 ms) | |
processMoveLogos(); | |
// One that move the spaceship (every 500ms) | |
processMoveSpaceShip(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment