Full Tutorial at: https://www.willieliwa.com/posts/projectsetup
If you need a fast, reliable, and lightweight way to create 3D browser games you've landed on the right post. With BabylonJS, a powerful 3D engine; Vite, one of the latest fast and lightweight build tools; and TypeScript, arguably a better version of JavaScript, we can create decent-sized WebGL games with realistic graphics, physics, skeletal animation, and post-processing effects just to name a few of the features.
They've made it nice and straightforward to install Vite with a helpful CLI:
Run the following commands:
Pick the optionsVanilla
andTypeScript
for this project. Replacedevlon
with the name of your game.
npm create vite@latest devlon cd devlon npm install
Your generated project folder should look like this:
your-awesome-game-name/ ├── index.html ├── node_modules ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── src │ ├── counter.ts │ ├── main.ts │ ├── style.css │ ├── typescript.svg │ └── vite-env.d.ts └── tsconfig.json
You can test it out right now by running:
npm run dev
We can continue on to our next step if this runs without any errors.
npm install --save babylon
We only need BabyonJS core for now, but we install the loaders and GUI package in another tutorial in this series.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.