2.1.3 • Published 5 years ago
libpointing v2.1.3
libpointing
Libpointing Node.js bindings
Description
Libpointing is an open-source cross-platform library that provides direct access to HID pointing devices and supports the design of pointing transfer functions.
Installation
- Install libpointing
- npm install libpointing
Works on Windows, macOS and Linux.
Example
var pointing = require('libpointing');
if (process.argv.length < 5)
console.log("Usage: node", process.argv[1], "[inputdeviceURI [outputdeviceURI [transferfunctionURI]]]")
var input = new pointing.PointingDevice((process.argv[2]) ? process.argv[2] : "any:")
var output = new pointing.DisplayDevice((process.argv[3]) ? process.argv[3] : "any:");
var tFunc = new pointing.TransferFunction((process.argv[4]) ? process.argv[4] : "system:", input, output);
input.setPointingCallback(function(timestamp, dx, dy, buttons) {
var pixels = tFunc.applyi(dx, dy, timestamp);
console.log(timestamp, dx, dy, buttons, " -> ", pixels.dx, pixels.dy);
});
var manager = new pointing.PointingDeviceManager().addDeviceUpdateCallback(
function(deviceDescriptor, wasAdded) {
console.log(deviceDescriptor, wasAdded);
}
);
License
This software may be used and distributed according to the terms of the GNU General Public License version 2 or any later version.
2.1.3
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.6
7 years ago
1.0.5
8 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
0.9.7
9 years ago
0.9.6
9 years ago
0.9.5
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.8.5
10 years ago
0.8.6
10 years ago
0.8.7
10 years ago
0.8.8
10 years ago
0.8.9
10 years ago
0.9.0
10 years ago
0.9.1
10 years ago
0.9.2
10 years ago