This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

haptix
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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.

Package Sidebar

Install

npm i haptix

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

2.15 MB

Total Files

220

Last publish

Collaborators

  • arilotter