Slither.io PS4 Playstation Controller Support

3
ADS




slither-io-ps4-playstation-controller-support-520x245

Hello friends Slither.io PS4 Playstation Controller Support my added Dualshoch 4 support to Slither.io details and codes;
// Tested in Chrome.
// Left stick to steer, X to accelerate
(function() {
if(!(“getGamepads”innavigator)) {
return;
}
varpollPad = function() {
varps4 = navigator.getGamepads()[0];
if(ps4) {
varx = ps4.axes[0], y = ps4.axes[1];
if(Math.sqrt(x*x+y*y) < 0.1) x = y = 0; // deadzone radius
xm = 100 * x;
ym = 100 * y;
setAcceleration(ps4.buttons[0].value);
varb = mc.getContext(“2d”);
b.save();
b.beginPath();
b.strokeStyle = ps4.buttons[0].value ? “white”: “lightGreen”;
b.arc(xm + mc.width/2, ym+mc.height/2, 8, 0, Math.PI * 2);
b.stroke();
b.restore();
}
window.requestAnimationFrame(pollPad);
};
pollPad();
})();

 



Share.

3 Comments

  1. I must say you have high quality content here. Your blog can go viral.
    You need initial traffic only. How to get it?
    Search for: Miftolo’s tools go viral

  2. BrettHansman on

    I see your website needs some unique articles.
    Writing manually is time consuming, but there is solution for this hard task.
    Just search for; Miftolo’s tools rewriter

Leave A Reply