如果我通过蓝牙将我的 Wii Remote 连接到我的带有 Wiican 和 Wmgui 的 Ubuntu 笔记本电脑,那么向浏览器交互显示 Wii Remote 的基本程序是什么?
我已经能够让 Xbox 游戏 handle 与 chrome 一起使用,这并不难。但这在 Wii 上可能吗?首先是向上、向下、向左、向右工作和按钮,然后可能是加速度计输入!
我想我想要开始的组合: http://stemkoski.github.io/Three.js/Mesh-Movement.html -移动 和 https://github.com/s-haha-n/GameTPS/blob/master/sample.html -我的示例 Xbox 游戏 handle 输出页面。
对于这样的事情我应该从哪里开始呢? Gamepad.js 会直接与 Wii Remote 配合使用吗?
最佳答案
如果能用本地服务器就可以
- 从 nodejs 模块捕获事件,例如 https://github.com/bramp/nodewii
- 通过 socket.io 将这些事件转发到浏览器(nodewii seems to do that 也是)
- 在客户端使用这些事件来为您的 three.js 场景制作动画。像
socket.on( 'button', function( data ) { mesh.material.opacity = 1 - mesh.material.opacity; })
虽然不确定事件是否顺利,但尝试一定很有趣。
关于javascript - 如何让 Wii Remote 与 Three.js 通信?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22032094/