Left

X: 50 Y: 50

Right

X: 50 Y: 50

Multiple joysticks

Adding multiple joystick can be as easy as invoking the method twice on different elements on the page.

import joystick from '../index.js';

joystick("#joystick1");
joystick("#joystick2");