简体   繁体   中英

How do I get a Wii Remote to communicate with Three.js?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM