multipleWindow3dScene icon indicating copy to clipboard operation
multipleWindow3dScene copied to clipboard

How do we run this?

Open MrYossu opened this issue 8 months ago • 16 comments

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

MrYossu avatar Nov 23 '23 17:11 MrYossu

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

nigelreign avatar Nov 23 '23 18:11 nigelreign

Great thanks, will give it a go

MrYossu avatar Nov 23 '23 18:11 MrYossu

You need to install http-server globally. With npm install -g http-server

b3n-j3ffr3y avatar Nov 23 '23 18:11 b3n-j3ffr3y

哈哈哈哈 如果是用的vscode , 安装了live-serve插件, 直接 ctrl+l 再按o就好了

hhhyw avatar Nov 24 '23 02:11 hhhyw

python -m http.server 9000

yunfengsa avatar Nov 24 '23 06:11 yunfengsa

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.

Molaryy avatar Nov 24 '23 09:11 Molaryy

If you are using Visual Studio Code you can install the extension Live Server and use it with the index.html file

julianfere avatar Nov 24 '23 23:11 julianfere

run npx http-server

Danielg212 avatar Nov 25 '23 22:11 Danielg212

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

liushengrui527 avatar Nov 26 '23 12:11 liushengrui527

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.

liudonghua123 avatar Nov 27 '23 06:11 liudonghua123

Easier way, use the website created by the creator himself: https://bgstaal.github.io/multipleWindow3dScene/

ok-coder1 avatar Nov 27 '23 11:11 ok-coder1

BTW, close this issue.

ok-coder1 avatar Nov 27 '23 11:11 ok-coder1

  1. If you are new firstly download, Node JS by searching on the browser and downloading (.msi) file

  2. 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.

  3. Then open cmd and Clone the repository

  4. ->Install http-server:

"    npm install http-server
"
  1. ->Navigate to the project directory:
"
       cd multipleWindow3dScene
"
  1. ->Start the local server:
"
       http-server
"
  1. ->Open the project in your browser:
"
  Open browser and search for 
    http://127.0.0.1:8080
    http://192.168.1.10:8080
"

Mujtaba-12390 avatar Nov 29 '23 02:11 Mujtaba-12390

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ó:

  1. If you are new firstly download, Node JS by searching on the browser and downloading (.msi) file
  2. 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.
  3. Then open cmd and Clone the repository
  4. 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: @.***>

Lobohombo avatar Nov 30 '23 15:11 Lobohombo

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

vxedit avatar Dec 31 '23 11:12 vxedit

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

NilsBaumgartner1994 avatar Mar 07 '24 00:03 NilsBaumgartner1994