1.1.8 • Published 3 years ago

@fezzle/joystick v1.1.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

joystick

A joystick for the web


Installation:

npm

npm install joystick
import { Joystick } from "@fezzle/joystick";

script tag

<script src="https://cdn.jsdelivr.net/npm/@fezzle/joystick"></script>

Use:

// create a new joystick instance
const joystick = new Joystick();

// add it to the dom tree
document.body.appendChild(joystick.dom);

// position it on the bottom left
joystick.style.cssText = "position: fixed; bottom: 30px; left:30px;";

joystick.on("move", (angle) => {
  console.log('Joystick angle:', angle);
}
1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago