How to Run Playground Locally?

Can someone tell me how to load the playground locally?

Which of the npm/nx scripts should I run?

When I run watch-and-serve:dev, I’m able to go to http://localhost:1337 where I can make the blue character run, walk, etc.

I believe it is described here - Start Contributing to Babylon.js | Babylon.js Documentation.

Run the playground

Using VS Code:

  • In the Run and Debug Menu, choose “Launch Playground” (Or “Playground development”, in case you are making changes to the Playground code itself), OR
  • Open the Command Palette, type “Run Task”, select “Playground Serve for core (Dev)” (Or if you are just developing the playground itself, select “Playground Serve (Dev)”)

Using command line:

  • run npm run watch:dev (If you want to make changes to the dev packages. Otherwise run npm run build:dev)
  • Run npm run serve -w @tools/babylon-server in a new terminal window
  • Run npm run serve -w @tools/playground in a new terminal window

Shortcuts?

  • Run npx build-tools --command dev-watch --watch-assets --watch-declarations --serve (watch and serve in one command)
  • Run npm run serve -w @tools/playground in a new terminal window

Open http://localhost:1338 in your browser.

4 Likes

Thanks labris

1 Like

It really helped :kissing_heart:

1 Like