New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-gamepad

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gamepad - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

controllers/n64/retrolink.json

3

package.json
{
"name": "node-gamepad",
"description": "node-gamepad is a package for node that allows you to effortlessly interface your node applications with a variety of gamepad controllers.",
"version": "0.1.2",
"version": "0.1.3",
"homepage": "https://github.com/carldanley/node-gamepad",

@@ -23,2 +23,3 @@ "main": "index.js",

"dependencies": {
"colors": "^0.6.2",
"node-hid": ">= 0.3.1"

@@ -25,0 +26,0 @@ },

@@ -13,14 +13,16 @@ # node-gamepad

1. SNES
1. PS3
1. snes/tomee
1. snes/retrolink
1. ps3/dualshock3
1. n64/retrolink
## How to Use
Plug in a supported controller and run a variation of the code below:
Plug in a supported controller and run a variation of the code below (with an actual supported controller):
### For PS3
### Code Example
```js
var GamePad = require( 'node-gamepad' );
var controller = new GamePad( 'ps3/dualshock3' );
var controller = new GamePad( 'supported/controller/here' );
controller.connect();

@@ -36,17 +38,2 @@

### For SNES
```js
var GamePad = require( 'node-gamepad' );
var controller = new GamePad( 'snes/tomee' );
controller.connect();
controller.on( 'up:press', function() {
console.log( 'up' );
} );
controller.on( 'down:press', function() {
console.log( 'down' );
} );
```
## Supported Events

@@ -69,2 +56,6 @@

## Contributing Controllers
You can add controller configuration files to the controllers directory. They are namespaced by `platform/vendor.json`. Each configuration file contains the pins/values mapped to the name of each button, joystick or status. You can use the [hid-mapper](https://www.npmjs.org/package/hid-mapper) tool which will help you create all the necessary mappings to save to your configuration file.
## License

@@ -71,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc