abhivaidya Posted September 12, 2017 Share Posted September 12, 2017 Hello All, I am just evaluating BabylonJS for a client project and since this is a large corporation, I will have to deploy the files (especially the meshes) as common file formats (eg. .js or .json). The reason being, I am assuming (also with some experience in dealing with such clients) that if I deploy a project with files with custom extensions (like .babylon), they wont load and they wont add it to the mimetype to load such files. Hence, can I customize or rename the extension to something else, like ones mentioned above, for easy deployment? Regards Quote Link to comment Share on other sites More sharing options...
jerome Posted September 12, 2017 Share Posted September 12, 2017 Unless you have to deal with MIME type restrictions (the MIME type is usually written by the server in the http response headers), from the browser point of view, an extension of a file name has strictly no importance. So renaming a .babylon file to .json should work out of the box. Quote Link to comment Share on other sites More sharing options...
RaananW Posted September 12, 2017 Share Posted September 12, 2017 Hi marcus, the .babylon file is not more than a json file renamed to .babylon for the sake of proper definition. If you register the standard babylon loader to load .json files instead of .babylon files, it should be working. It should anyhow work, as the default loader will trigger (for example, like this: https://playground.babylonjs.com/#81WPUC) . This is important if you register more than one loader. Quote Link to comment Share on other sites More sharing options...
abhivaidya Posted September 12, 2017 Author Share Posted September 12, 2017 1 hour ago, RaananW said: Hi marcus, the .babylon file is not more than a json file renamed to .babylon for the sake of proper definition. If you register the standard babylon loader to load .json files instead of .babylon files, it should be working. It should anyhow work, as the default loader will trigger (for example, like this: https://playground.babylonjs.com/#81WPUC) . This is important if you register more than one loader. That works like a charm! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 12, 2017 Share Posted September 12, 2017 That's a good news 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.