Browse Source

joystick event

main
Hendrik Langer 4 years ago
parent
commit
71356dc47a
  1. 5
      raspberry/roberto/views/frontend/templates/gamepad.js

5
raspberry/roberto/views/frontend/templates/gamepad.js

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

Loading…
Cancel
Save