03

Game 3d

Three.js Journey

Three.js Journey study project: a procedural course with spinner, limbo and axe obstacles, Rapier physics, and keyboard controls.

React Three Fiber experiment focused on a full gameplay loop (start / playing / end), a camera that follows the player, random level generation, and HTML UI over the canvas. Physics via @react-three/rapier (rigid body, jump with raycast) and global state with Zustand.

Technologies

  • Three.js
  • React Three Fiber
  • React Three Rapier
  • Drei
  • Zustand
  • Postprocessing
  • Vite

CASE STUDY

Behind the project

  1. 01

    Gameplay & physics

    The sphere responds to keyboard input; jumps only when grounded (downward raycast). Obstacles use rigid bodies/animation to challenge the run.

  2. 02

    Procedural level

    Each seed/count builds a random block sequence between start and end, with a continuous floor under the path.

  3. 03

    State & UI

    Zustand drives phase, block count, and restart; HTML UI keeps the player informed without leaving the 3D context.

ROLE & CONTRIBUTIONS

What is done

  • Build the player with RigidBody, movement, and grounded jump via raycast
  • Assemble the procedural level (BlockStart, Spinner, Limbo, Axe, BlockEnd)
  • Manage game phases and restart with Zustand
  • Add a smoothed follow camera for the sphere
  • Structure the experience into Game, Interface, Lights, and Debug modules

Project results

  • Hands-on 3D physics in the browser with Rapier
  • Complete game loop from start to finish/restart
  • Reusable base for other R3F + physics prototypes