jgbarah / aframe-playground

A playground for learning about A-frame
http://jgbarah.github.io/aframe-playground
GNU General Public License v3.0
75 stars 48 forks source link

Code not working in Browzer #2

Open nickXR1995 opened 2 years ago

nickXR1995 commented 2 years ago

Hello Sir,

I have copy pasted the code provided by you (https://github.com/jgbarah/aframe-playground/blob/master/physics-01/fall.html) into notepad++, saved as an HTML file and tried to open in chrome. It does not work,

But i am able to run the code directly via the link provided by you.(https://jgbarah.github.io/aframe-playground/physics-01/fall.html) in browser

Could you tell why this is happening ? anything else to be added to notepad++ ?

jgbarah commented 2 years ago

Hi!

Please, have in mind that you need to serve the HTML (and all related content) via HTTP. For that, you can for example run a simple Python HTTP server, as:

python3 -m http.server

in the same directory where you have your HTML file and related content.

You have a more complete explanation of the matter in the Introduction section of the A-Frame tutorial, or in Setting up the environment in this tutorial.

Please, let me know if you need some more details.