New issue
 Projects > js > Issues > Feature #4056

Load only wanted extensions?

Feature #4056 [New]
ZippoLag 2014-02-17 13:40 . Updated over 2 years ago

I'm making a game in which I need the extension "EditBox" (and therefore "Scale9Sprite";) but noting else, and so I dislike the idea of having to load all other extensions despite not using them.

So, could there be a way to make the "loadExtension" flag on "cocos2d.js" to handle the following 3 possible inputs?:

  1. true: load all extensions
  2. false: load no extensions 3a. array of strings: load only specified extensions, for example: loadExtension:["EditBox", "Scale9Sprite"] 3b. object with properties: load only specified extensions, for example: loadExtension:{EditBox:true, Scale9Sprite:true} 3c. other (better) way to specify extensions to load?

I hope either a or b could be implemented easily, althought I fear some sort of dependency check would have to be put in place (for checking cases like, for example, loading EditBox but not Scale9Sprite, which should throw an exception?).

ZippoLag 2014-02-17 13:56

I don't know why that closing parenthesis is being converted to an emoticon/smiley, it should be just a closing parenthesis.

sincntx 2014-06-25 09:10

if you need "EditBox", just modify "project.json"

for example :

"modules" : ["cocos2d","editbox"],

if you need module information, view "/cocos2d-html5/moduleConfig.json"


Atom PDF

Start date:2014-02-17
Due date:
% Done:


Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.