The smallest of templates to start an Next.js + Babylon.js app

A truly minimal demo/template that should get you started immediately and then you can add only things you need.

Installed npm is the only requirement; should just work under any OS:

git clone [URL] babylonjs-nextjs
cd babylonjs-nextjs
npm install
npm run dev

# open http://localhost:3000/

This is a stripped down version of Babylon + Next.js Setup Optimized for SEO, Load Speed & Developer Experience. Unlike that one, it’s up-to-date with currently-latest versions of

    "@babylonjs/core": "^5.43.0",
    "next": "^13.1.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
2 Likes

Hello and welcome!

It is great that this outdated template can be live again!
Would be so nice to have also at least one button to change Babylon scene parameter with React :slight_smile:

have you gotten @babylonjs/inspector to work using nextjs? Getting this import error

Module not found: ESM packages (@babylonjs/core) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals

Import trace for requested module:
./node_modules/.pnpm/@babylonjs+inspector@5.44.0_xkxs5uboflny42ao47wht7y3nu/node_modules/@babylonjs/inspector/dist/babylon.inspector.bundle.max.js