Using .bin file from a different location and name than .json
11 May 2016 23:06
I have a file upload system, where the files are renamed to a md5 hash to avoid naming conflicts. My problem is that the .bin file has to be the same name as the .json file (also same location). Is there some way to specify the .bin file location? I am loading the .json using this code:
let m_app = b4w.require("app");
let m_data = b4w.require("data");
m_app.init({
canvas_container_id: "canvas_cont",
callback: init_cb,
physics_enabled: false,
media_auto_activation: false
});
function init_cb(canvas_elem, success) {
m_data.load("../"+jsonFile, load_cb);
}
function load_cb(root) {
m_app.enable_camera_controls();
}
13 May 2016 16:06
13 May 2016 19:28