Skip to content

Running The HTML Files Locally In Your Web Browser

John Sadie edited this page Jun 21, 2016 · 3 revisions

After checking out the source codes from the ifc-ar-flood GitHub repository, you need to view the HTML files via a http server in order to see them as intended. This is to prevent errors such as permission-denied error when using WebRTC and cross-origin errors when loading textures.

I recommend installing node.js and its http-server module to get a fast http server running.

  • Download and install node.js
  • Install the http-server module for node.js by typing this in the node.js command prompt: npm install http-server -g
  • Run the http-server module for any directory of your choice (again, in the node.js command prompt): http-server C:\path\to\directory
  • View the web page via the http server by using this URL in the browser: http://localhost:8080/thePageYouWantToView.html

For more information, please refer to this excellent document from Three.js: https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally