{"author_name":"siat","cat":"LD #27","comments":[],"epoch":1377031740,"likes":1,"metadata":{"p_key":"41802","p_author":"siat","p_authorkey":"24592","p_urlkey":"77425","p_title":"Progress bar library for LimeJS","p_cat":"LD #27","p_event":"LD27","p_time":"1377031740","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"24592","us_name":"siat","us_username":"siat","event_start":"1377216000","event_key":"18","event_name":"LD27"},"text":"<p>I&#8217;ve made a small sprite scaling library for LimeJS, inspired by <a title=\"CCSpriteScale9\" href=\"https:\/\/github.com\/schristmann\/ccspritescale9\" target=\"_blank\">CCSpriteScale9<\/a> for iOS. \u00a0It&#8217;s good for speech bubbles, progress bars, health bars&#8230; anything with rounded corners and variable sizes. \u00a0You can download it <a title=\"kchodorow.lime.SpriteScale9\" href=\"https:\/\/gist.github.com\/kchodorow\/6288227\" target=\"_blank\">from Github<\/a>.<\/p>\n <p>To use, save <em>spritescale9.js<\/em> somewhere in your LimeJS project and run <em>python bin\/lime.py update<\/em> to get the new namespace. Then add something like this to your code:<\/p>\n <pre>require('kchodorow.lime.SpriteScale9');\n \n var spriteSheet = new lime.SpriteSheet('someSpriteSheet.png',\n lime.ASSETS.someSpriteSheet.json, lime.parser.JSON);\n var sprite = new kchodorow.lime.SpriteScale9()\n .setFill(spriteSheet.getFrame('bubble.png')).scale9(300,200);\n scene.appendChild(sprite);<\/pre>\n <p>It assumes you&#8217;re using sprite sheets, although it would probably be easy to hack in support for &#8220;bare&#8221; images.<\/p>\n <p>Enjoy!<\/p>","time":"August 20th, 2013 3:49 pm","title":"Progress bar library for LimeJS"}