这是一个基于 Web 技术(HTML5, CSS3, JavaScript)开发的体感切水果游戏。通过计算机视觉技术捕捉玩家的手势,让你体验“徒手”切水果的快感!
由于游戏需要访问摄像头权限,且使用了 ES Modules 和跨域资源,建议通过本地 HTTP 服务器运行,而不是直接双击打开 index.html。
如果你安装了 Python,可以在项目根目录下运行:
python -m http.server 8000
然后打开浏览器访问:http://localhost:8000
如果你使用 VS Code,安装 "Live Server" 插件,右键 index.html 选择 "Open with Live Server"。
npm install -g http-server
http-server .
cut-fruit/
├── index.html # 游戏入口
├── style.css # 样式定义
├── script.js # 核心游戏逻辑
├── README.md # 项目说明
└── img/ # 图片资源
├── apple.png
├── ban.png
├── orange.png
└── watermelon.png