This project brings together many concepts of working with Three.js and React Three Fiber to create an in-browser game controlled by a keyboard.
It features a marble that can be directed via arrow and WASD keys. It can also jump with the space bar. The goal is to move as quickly as possible down a track with multiple, randomized obstacles.
When you first move, a timer begins. Upon reaching the end of the track, the timer stops and shows you your time. You can then restart to beat your previous record.
The work was undertaken as one of many steps in acquiring my Three.js certification through Three.js Journey.
A running demo of the project can be viewed at https://dvdjrnx.github.io/marble-race
- Clone the repository.
- Install the required dependencies by running
npm install
.
To start the project, run the following command:
npm run dev