I worked on a project[0] very similar to this just recently. It's definitely not as nice as this, but it's got the added advantage of being able to use javascript events to-spec, and the only lines in your game code are these:
iPhone = new Controller();
iPhone.on('touchstart', function(event) { /*...*/ }
That's the entire API ;)
I'm in two minds over the use of QR codes here. I had two solutions to the problem of pairing browsers: as I do it now, I ask for a pairing code. Another, more hacky (but possibly nicer) solution is to assume that if a controller and a parent browser have the same external IP, you can assume that they want to pair up.
Anyway, kudos to the developers - it's a really cool idea, I think. If my code can help out at all, please go right ahead :)
(also sorry for hijacking your thread)
Comments
I worked on a project[0] very similar to this just recently. It's definitely not as nice as this, but it's got the added advantage of being able to use javascript events to-spec, and the only lines in your game code are these:
That's the entire API ;)I'm in two minds over the use of QR codes here. I had two solutions to the problem of pairing browsers: as I do it now, I ask for a pairing code. Another, more hacky (but possibly nicer) solution is to assume that if a controller and a parent browser have the same external IP, you can assume that they want to pair up.
Anyway, kudos to the developers - it's a really cool idea, I think. If my code can help out at all, please go right ahead :) (also sorry for hijacking your thread)
[0] https://github.com/CarlQLange/Controller.js