Jump to content

file based Babylon js? Babylon js without a webserver


chicagobob123
 Share

Recommended Posts

Can you run babylon js in a browser without using webserver just file based?

OK let me be less fuzzy, Tired been a long day. 

Failed to load file:///C:/inetpub/wwwroot/mb/models/SC_001.babylon.manifest: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Looks like its some sort of access denied thing ?

This the error I get when I try to access a file in a folder as a file based system. 

Link to comment
Share on other sites

The CORS request is a pre-flight request made by the browser.  If you look in dev tools there will be a pre-request to test which cross origins are allowed.  There are ways to disable it on startup of your browser - not sure if they still work (google for --disable-web-security), but best way is to run a simple webserver like a node-based one.  A good setup is babel and a webserver for development.

If you really wanted to then you could dig into where the request was being made and some stuff like fetch has a 'no-cors':
https://developer.mozilla.org/en-US/docs/Web/API/Request/mode

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...