0.1.2 • Published 10 months ago

haptix v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

haptix

haptix: MacOS touchpad haptics

Installing haptix

Installing haptix currently requires a supported version of Node and Rust.

You can install the project with npm/pnpm/yarn.

$ npm install haptix
$ pnpm install haptix
$ yarn install haptix

How do I use it?

There's only one function!

const { perform, PerformanceTime, FeedbackPattern } = require("haptix");
perform(FeedbackPattern.Generic, PerformanceTime.Now);

Note that nothing will happen unless you're touching the touchpad.

Building haptix from source locally

After cloning this repo, simply run

$ npm run build

This command uses the cargo-cp-artifact utility to run the Rust build and copy the built library into ./index.node.

Available Scripts

In the project directory, you can run:

npm install

Installs the project, including running npm run build.

npm build

Builds the Node addon (index.node) from source.

Additional cargo build arguments may be passed to npm build and npm build-* commands. For example, to enable a cargo feature:

npm run build -- --feature=beetle

npm build-debug

Alias for npm build.

npm build-release

Same as npm build but, builds the module with the release profile. Release builds will compile slower, but run faster.

npm npm-test

Runs a JS demo of the library.

Other Links

This project was built using Node, Rust, and Neon.

To learn more about Neon, see the Neon documentation.

To learn more about Rust, see the Rust documentation.

To learn more about Node, see the Node documentation.

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago