Progress bar library for LimeJS

I’ve made a small sprite scaling library for LimeJS, inspired by CCSpriteScale9 for iOS.  It’s good for speech bubbles, progress bars, health bars… anything with rounded corners and variable sizes.  You can download it from Github.

To use, save spritescale9.js somewhere in your LimeJS project and run python bin/lime.py update to get the new namespace. Then add something like this to your code:

require('kchodorow.lime.SpriteScale9');
 
 var spriteSheet = new lime.SpriteSheet('someSpriteSheet.png',
 lime.ASSETS.someSpriteSheet.json, lime.parser.JSON);
 var sprite = new kchodorow.lime.SpriteScale9()
 .setFill(spriteSheet.getFrame('bubble.png')).scale9(300,200);
 scene.appendChild(sprite);

It assumes you’re using sprite sheets, although it would probably be easy to hack in support for “bare” images.

Enjoy!