A Minecraft clone built using Three.js, designed to showcase procedural world generation, player controls, and dynamic chunk loading. This project implements basic game mechanics like jumping, gravity, and block collision detection, all in a 3D environment. 🏞️
- 🌍 Infinite Procedural World Generation: Generate a limitless world with chunks loaded dynamically as the player moves.
- 🕹️ First-Person Player Controls: Navigate through the world in first-person view with mouse and keyboard controls.
- ⬆️ Jumping & Gravity: The player can jump and experience gravity.
- 🛑 Block Collision Detection: Detect and prevent the player from moving through blocks.
- 👾 Interaction with Villagers: Trigger interactions with villagers using the 'F' key when near them.
- Three.js: 3D rendering engine for creating the Minecraft-like world.
- Pure TypeScript: Strongly typed JavaScript for better maintainability and scalability.
- WebGL: Low-level API for rendering 3D graphics, used by Three.js for high-performance rendering.
-
Clone the repository:
git clone https://github.com/SajanGhuman/Minecraft-3JS.git
-
Navigate into the project directory:
cd Minecraft-3JS
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
This will start the project on http://localhost:3000.
How to Play 🎮
- W, A, S, D: Move the player forward, left, backward, and right.
- Spacebar: Jump.
- Mouse: Look around the world.
- F: Interact with villagers (when near them).
- Esc: Lock/unlock mouse pointer to stay in first-person mode.
Contributing 🤝
Feel free to fork the repository, submit issues, and create pull requests. Contributions are welcome! 🙌