dorkhub

three-fps

Three.js first-person shooter example game.

mohsenheydari
JavaScript22974 forksMITupdated 4 years ago
git clone https://github.com/mohsenheydari/three-fps.gitmohsenheydari/three-fps

Three FPS Demo

Three.js FPS game using ammo.js and three-pathfinding with ES6 and Webpack.

The project features an entity/component system, FPS controller using ammo.js rigidbody, NPC with root-motion animations and a basic AI.

Please note that the project is still under development.

Online Demo

Install

Before you begin, make sure you are comfortable with terminal commands and have Node and NPM installed. Then either install via a download or with Git.

Install via Download

First download the zip of the project and extract it. Then in terminal at that folder type npm install to set things up. To get going run: npm start.

Install with Git

In terminal clone the project into a directory of your choice then delete the git folder to start fresh.

git clone --depth=1 https://github.com/mohsenheydari/three-fps.git three-fps
cd three-fps
rm -rf .git
npm install

Running the development server

To see the changes you make to the project go to the project's folder in terminal and type...

npm start

This command will bundle the project code and start a development server at http://localhost:8080/. Visit this in your web browser.

Editing the code

The first file you should open is ./src/entry.js. In it you will find the main application class. This class is reponsible for initializing the libraries and loading art assets, it also handles the main game loop.

Building the project for the web

Running npm run build in terminal will bundle your project into the folder ./build/. You can upload this directory to a web server. For more complex results read this guide.

About the models

Art assets used in this project:

Thanks to

License

MIT

more like this

lottery

🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀

JavaScript4.6k

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags