Hashasm Posted February 10, 2017 Share Posted February 10, 2017 instead of loading the tiledmap from resources.js using src, how can i load it directly from database?can someone help me here?? Quote Link to comment Share on other sites More sharing options...
obiot Posted February 10, 2017 Share Posted February 10, 2017 what do you mean from a database ? note sure it is then what you expect as an answer, but you can use me.loader.load() to manually load an asset : http://melonjs.github.io/melonJS/docs/me.loader.html#load Quote Link to comment Share on other sites More sharing options...
Hashasm Posted February 13, 2017 Author Share Posted February 13, 2017 for example instead of using the tilemap json file,if i load the json from a db directly. Quote Link to comment Share on other sites More sharing options...
Parasyte Posted February 13, 2017 Share Posted February 13, 2017 It's undocumented, but you can use obiot's suggestion like this: me.loader.load({ "name" : "myLevel", "type" : "tmx", "data" : JSON.parse(mapSourceFromDB) }); 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.