Hey Babylon community! ![]()
We just shipped an official project scaffolder for Babylon.js.
One command. Ready-to-run project. No yak shaving.
npm create babylonjs
That’s it. The CLI asks you four questions — project name, ES6 vs UMD, TypeScript vs JavaScript, and your bundler of choice (Vite, Webpack, Rollup, or none at all) — and spits out a fully wired project with a working starter scene, proper imports, a render loop, resize handling, and even a production build script.
The generated scene already loads a glTF model, sets up a camera that auto-frames it, and adds environment lighting. So your first npm run dev actually looks good, not just “grey sphere with ground” good.
The combinations it handles:
-
ES6 (tree-shakeable
@babylonjs/core) or UMD (the good ol’BABYLON.*namespace) -
TypeScript or JavaScript
-
Vite / Webpack / Rollup — or just a plain HTML file with CDN script tags if you don’t want a build step at all
We also wrote up a full documentation page that covers all the options, the template matrix, how to do a production build, and when to pick ES6 vs UMD: doc.babylonjs.com/setup/createBabylonJS
Big thanks to everyone who nudged us to get this done. Would love to hear how it goes — drop a comment if you run into anything weird or if there’s a template combo you wish existed!
Happy building ![]()