Pixi Virtual Joystick
🕹 Virtual Touch Joystick for pixi.js
Install / Use
npx skills add endel/pixi-virtual-joystickInstalls into whichever agent you are using.
README
🕹 pixi-virtual-joystick
Virtual Touch Joystick for pixi.js, tested on both Pixi v5 and Pixi v6.
<img src="screenshot.gif?raw=1" />Usage
import { Joystick } from "pixi-virtual-joystick";
const joystick = new Joystick({
outer: PIXI.Sprite.from("outer"), // ("images/joystick.png")
inner: PIXI.Sprite.from("inner"), // ("images/joystick-handle.png")
outerScale: { x: 0.5, y: 0.5 },
innerScale: { x: 0.8, y: 0.8 },
onChange: (data) => {
console.log(data.angle); // Angle from 0 to 360
console.log(data.direction); // 'left', 'top', 'bottom', 'right', 'top_left', 'top_right', 'bottom_left' or 'bottom_right'.
console.log(data.power); // Power from 0 to 1
},
onStart: () => {
console.log('start')
},
onEnd: () => {
console.log('end')
},
});
app.stage.addChild(joystick);
Similar alternatives
- nipplejs (more features, DOM-based)
- react-nipple
License
Endel Dreyer © MIT
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
