|
@ -98,9 +98,14 @@ if (haveEvents) { |
|
|
var joystick = nipplejs.create({ |
|
|
var joystick = nipplejs.create({ |
|
|
zone: document.getElementById('controls'), |
|
|
zone: document.getElementById('controls'), |
|
|
mode: 'static', |
|
|
mode: 'static', |
|
|
|
|
|
//catchDistance: 150,
|
|
|
position: {left: '50%', top: '50%'}, |
|
|
position: {left: '50%', top: '50%'}, |
|
|
color: 'blue' |
|
|
color: 'blue' |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
joystick.on('move', function(evt, data) { |
|
|
|
|
|
console.log(data); |
|
|
|
|
|
}); |
|
|
/* |
|
|
/* |
|
|
setInterval(function(){ |
|
|
setInterval(function(){ |
|
|
if (joystick) { |
|
|
if (joystick) { |
|
|