1
0
Fork 0
This commit is contained in:
Andrew Tomaka 2014-08-29 11:43:15 -04:00
parent 0e96c0118f
commit 8efd650180
2 changed files with 15 additions and 7 deletions

View file

@ -1,6 +1 @@
* { margin: 0; padding: 0; }
body {
background: url(../img/africa.png) no-repeat center center fixed;
background-size: cover;
}

View file

@ -9,8 +9,8 @@
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<script src="assets/js/SeamlessLoop.js"></script>
</head>
<body>
<body onloadi> https://github.com/maroslaw/rainyday.js/blob/master/demo2.html
<img id="background" src="" />
<script>
var loop = new SeamlessLoop();
@ -20,6 +20,19 @@
loop.start('africa');
});
</script>
<script>
function run() {
var image = document.getElementById('background');
image.onload = function() {
var engine = new RainyDay({
image: this
});
engine.rain([ [3, 2, 2] ], 100);
};
image.src = 'assets/img/africa.png';
}
</script>
</body>
</html>