ambidex Posted October 27, 2014 Share Posted October 27, 2014 I guess I could simply create a subsystem.config.js and load it up as a <script> in my index.html though this sounds a bit off. Though I guess it could work if I would just add : pandaConfig.subsystem = {};. Isn't there a more logical way of adding additional config files? I would preferably load up other js files with only a object with config values with addAsset() or something like that, this prevents the need to load up config files that might not be needed in the first place and could be loaded when needed. Quote Link to comment Share on other sites More sharing options...
enpu Posted October 28, 2014 Share Posted October 28, 2014 Not really sure, what you are trying to achieve. Can you give me an example situation, where you would need additional config file? Quote Link to comment Share on other sites More sharing options...
ambidex Posted October 29, 2014 Author Share Posted October 29, 2014 Well, config might not be exactly the right term for this issue. I would like to add additional data files. For example, I've got a application which consists of a few different elements: - Main menu- - Game- - Information about project- - Trailer- - A map of the project I won't go into details about what these consist of, but the most important part is that the Game scene uses a lot of other assets then the rest of the scenes. What I'd also like to add as asset is a JSON file with the information about the level composition. This is something I would not like to include in the global config.js but I do like to add that as a separate pure JSON file for readability for my colleagues. Does that make any sense? Quote Link to comment Share on other sites More sharing options...
enpu Posted October 29, 2014 Share Posted October 29, 2014 You can load custom JSON files like this:http://www.pandajs.net/cheatsheet/42722846203d58158fcc.html Does that help you? Quote Link to comment Share on other sites More sharing options...
ambidex Posted October 29, 2014 Author Share Posted October 29, 2014 Woah, did I look over that? That's exactly what I meant. Thanks a ton! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.