Activate your free membership today | Log-in

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

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

Also check out this demo and follow them.

Related Content:

  • NOB
    Silver game data and...
  • SPR
    Sprite (Image layering and...
  • KMCOBJ
    Kinemac Sprite...
  • VSP
    Image sprite...
  • SPRITE
    Bitmap file...

Posted by Dion Almaer at 6:42 am
1 Comment

++++-
4.6 rating from 36 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.