Skip to content

huizhiLLL/Smart-Cube-Games

 
 

Repository files navigation

Smart Cube Games logo

Smart Cube Games

一个基于 Web Bluetooth 的 GAN 智能魔方网页交互项目

TypeScript Web Bluetooth

功能

  • 自动扫描选择连接 GAN 智能魔方
  • 魔方转动控制网页游戏
  • 支持 2048、俄罗斯方块

使用

  1. 确保你的浏览器支持并启用 Web Bluetooth API(推荐使用 Chrome/Edge 浏览器)
  2. 连接 GAN 智能魔方
  3. 转动魔方即可开始

注意

  1. 浏览器中启用 Web Bluetooth API 的方法:
  • Chrome: chrome://flags/#enable-experimental-web-platform-features
  • Edge: edge://flags/#enable-experimental-web-platform-features
  1. 移动端可能需要预先获取智能魔方的MAC地址进行连接

方法如下:

  • Chrome: chrome://bluetooth-internals/#devices
  • Edge: edge://bluetooth-internals/#devices

已知问题

  • 从俄罗斯方块切回2048时,会出现交互无反应的情况,需要刷新网页重新连接魔方

致谢

About

基于 gan-web-bluetooth 将 GAN 智能魔方化作 web 游戏手柄

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • CSS 40.3%
  • JavaScript 26.2%
  • TypeScript 25.3%
  • HTML 8.2%