Try It Out On This Page
Update 11/28/16: Version 0.9.4 is here, and it is a huge update: animation has been redone and deals with odd-shaped sprites; performance enhancements; tons of code clean-ups; better parameter validation; new restart_delay param; somewhat simplified API.
***
MetaPong is a simple yet powerful library that allows you to animate images within a given HTML container (for instance, document.body). It was originally developed by Invitecast to add amazing effects to our online invites.
MetaPong can be used to create things like snow storms, birds flying around the screen, raining cats and dogs, and many other fun things. The animation can be targeted at a particular HMTL container, or the whole screen (document.body).
As a compact, pure-JavaScript (no dependencies) library, you can easily add MetaPong to your project.
Simple Usage Example
In the example below, 9 images will be animated around the page in a random way, bouncing off the edges, "pong style" (like a pool table, if you will). The 9 images will be randomly selected from the given three PNG files (which oh-so-happen to be in the same server/directory as the calling file).
var mp = new MetaPong({ image_url: ["img/red_ball.png", "img/blue_ball.png", "img/green_ball.png"], count: 9, direction: [[0, 359]], bounce: "bounce" }); mp.start();