{"id":13337671,"url":"https://github.com/KairuiLiu/ThreeCraft","last_synced_at":"2025-03-11T07:30:36.735Z","repository":{"id":38372376,"uuid":"485414134","full_name":"KairuiLiu/ThreeCraft","owner":"KairuiLiu","description":"⛏ MineCraft release based on three.js","archived":false,"fork":false,"pushed_at":"2022-08-05T06:42:35.000Z","size":18041,"stargazers_count":26,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-04T16:48:01.701Z","etag":null,"topics":["javascript-game","minecraft","threejs","threejs-webgl-game","typescript"],"latest_commit_sha":null,"homepage":"https://mc.liukairui.me/en","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KairuiLiu.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-25T14:51:09.000Z","updated_at":"2023-02-27T11:51:30.000Z","dependencies_parsed_at":"2022-07-12T17:28:08.896Z","dependency_job_id":null,"html_url":"https://github.com/KairuiLiu/ThreeCraft","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KairuiLiu%2FThreeCraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KairuiLiu%2FThreeCraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KairuiLiu%2FThreeCraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KairuiLiu%2FThreeCraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KairuiLiu","download_url":"https://codeload.github.com/KairuiLiu/ThreeCraft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213069705,"owners_count":15532842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-game","minecraft","threejs","threejs-webgl-game","typescript"],"created_at":"2024-07-29T19:14:53.726Z","updated_at":"2024-10-23T16:31:24.255Z","avatar_url":"https://github.com/KairuiLiu.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./doc/img/logo.png\" width=\"128\" height=\"128\"/\u003e\n\n  \u003ch2\u003eThreeCraft\u003c/h2\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003e⛏ 基于Three.js的MineCraft网页版实现\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003cimg alt=\"Threejs\" src=\"https://img.shields.io/badge/Three.js-000000?style=flat-square\u0026logo=Three.js\u0026logoColor=white\"/\u003e\n    \u003cimg alt=\"Socket.io\" src=\"https://img.shields.io/badge/Socket.io-010101?style=flat-square\u0026logo=Socket.io\u0026logoColor=white\"/\u003e\n    \u003cimg alt=\"TypeScript\" src=\"https://img.shields.io/badge/TypeScript-3178C6?style=flat-square\u0026logo=TypeScript\u0026logoColor=white\"/\u003e\n    \u003cimg alt=\"Vite\" src=\"https://img.shields.io/badge/Vite-646CFF?style=flat-square\u0026logo=Vite\u0026logoColor=white\"/\u003e\n\n  \u003c/p\u003e\n\n  \u003ch4\u003e\n    \u003ca href=\"https://mc.liukairui.me\"\u003e在线体验\u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/KairuiLiu/ThreeCraft/blob/master/README.md\"\u003eEnglish\u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/KairuiLiu/ThreeCraft/blob/master/README-CN.md\"\u003e简体中文\u003c/a\u003e\n  \u003c/h4\u003e\n\u003c/div\u003e\n\n### ✨ 特性\n\n- 多人联机游戏支持\n- 高效的碰撞检测方法\n- 多种存档与读档方式\n- 高效的多线程动态无限地图生成与局部刷新方法\n- 30 种人物皮肤随机出现(多人模式下)\n- 5 种游戏场景随机出现(经典 / 冰雪 / 月下沙滩瓜田 / 南瓜田 / 奇异)\n- 多端多操控模式支持(PC 端, 移动端, VR 端, PS4/5 手柄支持, Xbox 手柄支持)\n- 多种参数可调(视角 / 雾气 / 场景大小 / 操纵范围 / 音量 / 线程数 / 操作灵敏度 / 语言 / 操作模式 / 十字准星颜色 / 背包模式 / 作弊模式)\n- 双语言支持(中文 / 英文)\n- 原版音效\n- PWA 支持\n\n### 🎮️ 操作方法\n\n- **PC 端**\n\n  - **空格键**: 跳跃\n  - **E 键**: 开关背包\n  - **Q 键**: 切换作弊模式\n  - **鼠标移动**: 变换朝向\n  - **WSAD 键**: 前后左右移动\n  - **数字键**: 切换手持方块\n  - **滚轮滚动**: 切换手持方块\n  - **点击物品框**: 切换手持方块\n  - **Shift 键**: 作弊模式时下降\n  - **鼠标左/右击**: 摧毁/创建方块\n  - **ESC 键**: 取消鼠标锁定/显示菜单\n\n- **移动端**\n\n  - **拖动屏幕**: 变换朝向\n  - **点击物品框**: 切换手持方块\n  - **点击激活的物品框**: 打开背包\n\n- **Xbox 手柄(使用 Xbox one 测试)**\n\n  \u003cimg src=\"./doc/img/xbox-cn.png\" height=\"200px\"/\u003e\n\n- **PS 手柄(使用 PS4 测试)**\n\n  \u003cimg src=\"./doc/img/ps-cn.png\" height=\"200px\"/\u003e\n\n- **VR 端**\n\n  - **转动头显**: 变换朝向\n  - **使用遥控器**: 摧毁方块\n\n### 🛠️ 安装\n\n- 前端\n\n  ```bash\n  # 安装pnpm\n  \u003e npm install -g pnpm\n\n  # 安装全部依赖\n  \u003e pnpm install\n\n  # 安装某个依赖\n  \u003e pnpm install xxx  -D/-S\n\n  # 运行\n  \u003e pnpm dev\n\n  # 打包\n  \u003e pnpm build\n  ```\n\n- 后端\n\n  ```bash\n  # 进入后端目录\n  \u003e cd server\n\n  # 安装全部依赖\n  \u003e pnpm install\n\n  # 编译TS代码\n  \u003e tsc\n\n  # 执行后端程序(如果不需要PM2等进程管理工具)\n  \u003e node ./dist/index.js\n\n  # 安装PM2\n  \u003e pnpm install -g pm2\n\n  # 注册PM2监视\n  \u003e pm2 start --watch ./dist/index.js\n\n  # 如需反向代理, 请将 /socket.io 代理到 localhost:9000 并配置同源策略\n  ```\n\n  程序运行后会输出如下提示\n\n  ```\n  ThreeCraft v1.0.2 game server running at:\n  \u003e Local:        http://localhost:9000\n  \u003e Network:      http://xxx.xxx.xxx.xxx:9000\n\n  YOU MUST ENTER THE ADDRESS LIKE http://xxx.xxx.xxx.xxx:9000 IN GAME, NO PART CAN BE OMITTED!\n  ```\n\n  在游戏中连接服务器时候请务必输全`http://xxx.xxx.xxx.xxx:9000`, 不要省略`http://`或`:9000`\n\n  如果前端运行在 https 上, 那么后端也应该运行在 https 上. 可能需要一些反向代理工具实现 https\n\n### 📃 文档\n\n- [开题报告.pdf](./doc/opening-report/build/slides-export.pdf)\n- [总体设计.md](./doc/overall-design)\n- [结题报告.md](./doc/final-report)\n\n### 🥰 参考\n\n- 项目整体结构参考了 [vyse12138/minecraft-threejs](https://github.com/vyse12138/minecraft-threejs), 这个项目很棒. 非常感谢这个项目!\n- 移动端游戏手柄的实现参考了[bobboteck/JoyStick](https://github.com/bobboteck/JoyStick).\n- 项目的后端整体结构参考了 [Merlin218/UNO-server](https://github.com/Merlin218/UNO-server/). 非常感谢这个项目!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKairuiLiu%2FThreeCraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKairuiLiu%2FThreeCraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKairuiLiu%2FThreeCraft/lists"}