/three-boilerplate

ThreeJS FPS boilerplate, basic character movements, shooting animations, etc.

Primary LanguageTypeScript

ThreeJS FPS boilerplate

Technologies used

  • Vite
  • Vitest
  • Typescript
  • Electron

Features

  • FPS controls (WASD)
  • Orbit controls (Mouse)
  • Object collisions
  • Shooting animations (for each weapon)
  • Player flashlight (F)
  • Multiple weapons (Pistol, Shotgun, Rifle, etc)
  • Sounds (WIP)
  • Particle effects (WIP)
  • UI (WIP)

How to run

# Browser
$ npm run dev

# Build - Transpile to JS
$ npm run build


# Electron
$ npm run electron
# or
$ npm run start

# Build binaries
$ npm run make
$ npm run package

image

Workflow actions

Once it is cloned make sure you enable permissions

Settings > Actions > General make sure in Workflow permissions Read and Write is granted

image

Configure template source and update change

# Add remote source
git remote add template https://github.com/n1md7/three-boilerplate.git
# Pull changes
git pull template master
# Merge into the current branch
git merge template/master --allow-unrelated-histories