5

If I connect my Wii Remote via bluetooth to my Ubuntu laptop with Wiican and like Wmgui, what'd be a basic program to show Wii Remote to browser interaction?

I've been able to get a Xbox Gamepad to work with chrome, that's not hard. But is this possible with the Wii? First to get up, down, left, right to work and buttons, then possibly accelerometer input!

I guess I'd want a combination of this to start: http://stemkoski.github.io/Three.js/Mesh-Movement.html -movement and https://github.com/s-haha-n/GameTPS/blob/master/sample.html -my sample Xbox gamepad output page.

Where should I start for something like this? Would the Gamepad.js just work off the bat with the Wii Remote?

madam_madman
  • 79
  • 1
  • 10
  • 2
    Wiimote + Three.js? (ง ͠° ͟ل͜ ͡°)ง – Derek 朕會功夫 Feb 26 '14 at 05:00
  • I don't follow... Do you like this? Or not? Lol – madam_madman Feb 26 '14 at 05:11
  • I mean this is a very cool idea, but I can't really tell if it's possible in JavaScript. The native [Gamepad API](https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html) can handle gamepads that are supported by the client system, but if the system does not support it you can't really do anything about it. After all, JavaScript is designed to run in a sandbox, not interacting with hardwares. – Derek 朕會功夫 Feb 26 '14 at 05:26
  • Wiimote requires bluetooth. Why shouldn't we go with cellphones? Same (and much more) functionality and accessible everywhere. Maybe something like *cellphone app<-->WiFi<-->Computer<-->Browser*? Would an `adhoc` connection work? – Farzad Feb 26 '14 at 06:01
  • Now I'm dreaming of a racing game done in browser and the user plays it with the cellphone like a gamepad ... – Farzad Feb 26 '14 at 06:05

1 Answers1

3

If you can use a local server, you can

socket.on( 'button', function( data ) {
  mesh.material.opacity = 1 - mesh.material.opacity;
})

Not sure about the events smoothness however, but it must be quite fun to try.

vincent
  • 1,525
  • 12
  • 18
  • Thanks ! But I have seen that nodewii is compatible only with linux...How can we do if we are on Windows for example... – TOPKAT May 13 '17 at 20:51
  • 1
    nodewii and other libcwiid-based libs seems a no-go on windows. I would try to use another lib to produce events over websockets. Maybe something liked here https://touchmote.codeplex.com ? – vincent May 18 '17 at 07:47