Sign in to follow this  
abhivaidya

File format for enterprise deployment

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.