Monday, March 22nd, 2010

Spritely: sprite and pan away

Category: jQuery, Library

<>p>spritely

Spritely is a new jQuery plugin that adds sprite() and pan() to your $().

The fun front page of birds is explained with simple goodness of:

javascript
< view plain text >
  1. // animate through 3 frames
  2. $('#bird').sprite({fps: 12, no_of_frames: 3});
  3.  
  4. // clicking on the screen flies a sprite to you
  5. $('#bird').sprite({fps: 12, no_of_frames: 3}).activeOnClick().active();
  6. $('body').flyToTap();
  7.  
  8. // random movement
  9. $('#bird')
  10.       .sprite({fps: 8, no_of_frames: 3}
  11.       .spRandom({
  12.           top: 70,
  13.           left: 100,
  14.           right: 200,
  15.           bottom: 340,
  16.           speed: 4000,
  17.           pause: 3000
  18.       });

The library is very new with 0.1 stable and 0.2 preview out.

Also check out this demo and follow them.

Posted by Dion Almaer at 6:42 am
1 Comment

++++-
4.5 rating from 37 votes

1 Comment »

Comments feed TrackBack URI

Is this Animated GIFs 2.0??

Comment by yogurtearl — March 22, 2010

Leave a comment

You must be logged in to post a comment.