Creates a scrolling Super Mario inspired sky scape.
MIT License
Super Mario Sky is a simple jQuery plugin that allows you to easily create simple parallax scrolling clouds from old Super Mario Brothers games.
Click Here to see a live demo.
Create a simple html block with set width and height:
<div class="screen" style="width: 300px; height: 300px; overflow: hidden">
</div>
And populate it with several layers of Mario clouds:
<script type='text/javascript'>
jQuery(function(){
jQuery('.screen')
.sprite_layer({num_sprites: 5, xspeed: -10})
.sprite_layer({num_sprites: 5, xspeed: -20})
.sprite_layer({num_sprites: 2, xspeed: -30})
});
</script>
See the index.html file for an example with multiple sprite classes.
sprite_layer
method accepts the following options: