Skip to content

hubgan/minecraft-threejs

Repository files navigation

Minecraft - ThreeJS

This project was developed as part of a course held at the Faculty of Computer Science, AGH University of Science and Technology (Akademia Górniczo-Hutnicza), Kraków, Poland.

A browser-based Minecraft-inspired sandbox built with TypeScript, Three.js, and Vite.

Features

  • Procedural chunked terrain.
  • Dynamic chunk loading around the player.
  • First-person pointer-lock controls with collision and gravity.
  • Block selection, mining progress, item drops, and block placement.
  • Inventory, hotbar, stack handling, and drag-and-drop item interactions.
  • 2x2 inventory crafting and 3x3 crafting-table recipes.
  • Wooden and stone tools with durability and mining speed differences.
  • Live debug and settings panel for fog, terrain, trees, clouds, render distance, seed, and player speed.

Preview

World overview

Mining a block

Inventory

Crafting

Tech Stack

  • TypeScript
  • Vite
  • Three.js

Getting Started

Install dependencies:

npm install

Start the development server:

npm run dev

Then open the local URL printed by Vite, usually:

http://localhost:5173

Controls

  • Click the game canvas to lock the pointer and start looking around.
  • W, A, S, D: move.
  • Space: jump.
  • R: reset the player position.
  • Left mouse: mine the selected block.
  • Right mouse: interact with blocks or place the selected hotbar block.
  • E: toggle the inventory.
  • Mouse wheel or 1-9: select a hotbar slot.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages