https://github.com/r1tsuu/ts-minecraft
Minecraft Clone with TypeScript / THREE.js
https://github.com/r1tsuu/ts-minecraft
game minecraft-clone threejs threejs-example typescript
Last synced: 2 months ago
JSON representation
Minecraft Clone with TypeScript / THREE.js
- Host: GitHub
- URL: https://github.com/r1tsuu/ts-minecraft
- Owner: r1tsuu
- Created: 2025-12-21T01:48:39.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-01-01T19:57:41.000Z (3 months ago)
- Last Synced: 2026-01-03T02:28:22.807Z (3 months ago)
- Topics: game, minecraft-clone, threejs, threejs-example, typescript
- Language: TypeScript
- Homepage: https://r1tsuu.github.io/ts-minecraft/
- Size: 2.87 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minecraft Clone with TypeScript, THREE.js
### [Visit](https://r1tsuu.github.io/ts-minecraft/)
## Implemented:
- Partial [ECS pattern](./src/shared/World.ts) without "components" - they are stored inside [entities](./src/shared/entities/Entity.ts). New game logic can easily be added with `createSystemFactory`, example - [chunk rendering](./src/client/systems/ChunkRenderingSystem.ts)
- Client - Server architecture through [Event Bus](./src/shared//MinecraftEventBus.ts), currently the "server" is executed via a [web worker](./src/singleplayer/SinglePlayerWorker.ts).
- Infinite world generation with terrain, trees, caves, ores
- Chunk rendering via chunk mesh generation - very fast.
- Movement, collission, raycasting/highlighting, block placement / block removal
- Simple inventory
- Created worlds are persisted currently to the [OPFS](./src/singleplayer/PrivateFileSystemWorldStorage.ts)
## TODO:
- Much more stuff
- Possibly support running the game straight up from Bun without a web browser using C/Rust FFI for OpenGL/GLFW
## Core Utilities
This project heavily relies on several functional programming utilities:
- **[Maybe.ts](./src/shared/Maybe.ts)** - Optional value type for null safety, eliminating null/undefined checks.
- **[Pipe.ts](./src/shared/Pipe.ts)** - Functional composition utility for chaining operations
- **[AsyncPipe.ts](./src/shared/AsyncPipe.ts)** - Asynchronous version of Pipe for handling promises
- **[HashMap.ts](./src/shared/HashMap.ts)** - Type-safe hash map implementation with functional methods
Using normal `Map`, `undefined`, or `null` is discouraged in this project.