0.0.6 • Published 1 year ago

buttplug-client v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

buttplug-client

a simple buttplug.io nodejs implementation

buttplug.io protocol implementation for server-side javascript (nodejs) and interfacing with buttplug server applications like Intiface Desktop

  • Interface with buttplug.io servers
  • Easily program lovense and similiar products (Hush, Edge, Lush, etc.)

Basic Usage

var buttplugclient = require("buttplug-client").ButtplugClient()

buttplugclient.on("ready", function(ServerInfo) {
    console.log(ServerInfo)
})

buttplugclient.on("DeviceAdded", function(device) {
    // turn on all the motors at max power
    console.log(device)
})

buttplugclient.connect("ws://localhost:12345")

setInterval(() => {
    // get first device
    var device = buttplugclient.Devices[0]
    if (device) {
        let p = (Math.sin(Date.now()/500)/2.5)+0.5
        for (let i = 0; i < device.VibrateMotorCount; i++) {
            device.Vibrate(i,p)
        }
    }
}, 200);
0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago