Project Setup
Setting up a new project
To setup a new project, use degit to scaffold of thejsngin/new-project and then install the dependencies.
bash
# setup the project inside the dir `my-new-project`
npx degit thejsngin/new-project my-new-project
cd my-new-project
# install the dependencies
npm i
# serve your test project
npm run devYou should see a cube fall to rectangular plane.
Project structure
.
├── index.html
├── package-lock.json
├── package.json
├── src
| ├── index.d.ts
| ├── index.ts
| └── rootGameObject.jsnobj
└── vite.config.jsDependencies
@thejsngin/jsnginis the core jsngin package that is bundled with the game.@thejsngin/rollup-pluginis the rollup plugin that bundles.jsncmpand.jsnobjfiles. The current implementation uses Vite, however you can rollup with auxilary plugins for resolving node modules, wasm etc.@dimforge/rapier3dis a peerDependency ofstandard-assetsand is used as the default physics engine.threeis a peerDependency ofstandard-assetsand is used as for rendering.vite- the bundler being usedvite-plugin-top-level-awaitandvite-plugin-wasmare used to bundle@dimforge/rapier3d.