multipleWindow3dScene
multipleWindow3dScene copied to clipboard
How do we run this?
Sorry if this is a dumb question, but how do we run this code?
I tried loading the html file in a browser, but got errors in the browser console...
Access to script at 'file:///D:/multipleWindow3dScene-main/main.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome-untrusted, https, edge. main.js:1
Failed to load resource: net::ERR_FAILED
Please advise (in simple terms!) how we run this amazing code.
Thanks
HOW TO RUN THE PROJECT
Install http-server:
npm install http-server
Navigate to the project directory:
cd multipleWindow3dScene
Start the local server:
http-server
Open the project in your browser:
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://192.168.1.10:8080
Great thanks, will give it a go
You need to install http-server globally. With npm install -g http-server
哈哈哈哈 如果是用的vscode , 安装了live-serve插件, 直接 ctrl+l 再按o就好了
python -m http.server 9000
If you are using vscode, you can install the extension Live Server, go to your inde.html and at the bottom of your window you will find a button Go live, then go to http://localhost:5500/index.html and you will get your page :D.
If you are using Visual Studio Code you can install the extension Live Server and use it with the index.html file
run npx http-server
npm install http-server
cd multipleWindow3dScene
http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://192.168.1.10:8080
I use npx serve .
, but only a simple cube shown in the page, nothing errors in the console of devtools.
See also https://github.com/bgstaal/multipleWindow3dScene/issues/17#issuecomment-1827209984.
Easier way, use the website created by the creator himself: https://bgstaal.github.io/multipleWindow3dScene/
BTW, close this issue.
-
If you are new firstly download, Node JS by searching on the browser and downloading (.msi) file
-
After downloading successfully, Search Enviorment Variable on Start and click "Enviorment Variable" and then click New.. Afterward save your Node Js location into it. In my case ("C:\Program Files\nodejs") and click save.
-
Then open cmd and Clone the repository
-
->Install http-server:
" npm install http-server
"
- ->Navigate to the project directory:
"
cd multipleWindow3dScene
"
- ->Start the local server:
"
http-server
"
- ->Open the project in your browser:
"
Open browser and search for
http://127.0.0.1:8080
http://192.168.1.10:8080
"
Espero que los siguientes datos sean para la vejez de México en mi idioma gracias
Único dueñoDarioRodolfo
El mar., 28 de noviembre de 2023 20:37, Muhammad Mujtaba Raza < @.***> escribió:
- If you are new firstly download, Node JS by searching on the browser and downloading (.msi) file
- After downloading successfully, Search Enviorment Variable on Start and click "Enviorment Variable" and then click New.. Afterward save your Node Js location into it. In my case ("C:\Program Files\nodejs") and click save.
- Then open cmd and Clone the repository
- Install http-server:
" npm install http-server " 5) ## Navigate to the project directory: " cd multipleWindow3dScene " 6) ## Start the local server: " http-server " 7) ## Open the project in your browser: " Open browser and search for http://127.0.0.1:8080 http://192.168.1.10:8080 "
— Reply to this email directly, view it on GitHub https://github.com/bgstaal/multipleWindow3dScene/issues/2#issuecomment-1831119150, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEJM2TMCEAGDQS2HK6522GLYG2NXFAVCNFSM6AAAAAA7YDORKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZRGEYTSMJVGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
python -m http.server 9000
i also tried with python python -m http.server http://localhost:8000/ but its loading a cube if i open in sec window with http://localhost:8000/ it adds another rotating cube over it
npm install http-server cd multipleWindow3dScene http-server Starting up http-server, serving ./ Available on: http://127.0.0.1:8080 http://192.168.1.10:8080
Worked like a charm on mac