
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
    ![npm d
Web-based haptic control library for bHaptics devices. A variety of haptic events can be played in your browser.
Play haptic event exported from bHaptics developer portal
Play single-frame feedback with intensity-mapped dot values
Play directional feedback across the surface of a device
npm install tact-js
# or
yarn add tact-js
# or
pnpm add tact-js
import Tact from 'tact-js';
// Initialize the library
Tact.init({
appId: '<APP_ID>',
apiKey: '<API_KEY>',
});
import Tact, { PositionType } from 'tact-js';
// Play an event
Tact.play({ eventKey: key });
import Tact, { PositionType } from 'tact-js';
// Play a dot
Tact.playDot({
position: PositionType.Vest, // e.g., Vest, Head, ForearmL, ForearmR etc.
motorValues: [100, 0, ... , 0], // 0 ~ 100
});
import Tact, { PositionType } from 'tact-js';
// Play a path
Tact.playPath({
position: PositionType.Vest, // e.g., Vest, Head, ForearmL, ForearmR etc.
x: [0.4, 0.42, ... , 1], // 0 ~ 1
y: [0.5, 0.52, ... , 1], // 0 ~ 1
intensity: [100, 89, ... , 49], // 0 ~ 100
});
Tact.init(params: InitParams): voidparams:
appId: string - Your application IDapiKey: string - Your API keyremote?: string - (Optional) Remote IP address and Port number of the bHaptics Player (ex. "192.168.0.123:15881")Tact.play(params: PlayParams): voidparams:
eventKey: string - Event keystartTime?: number - Start time in millisecondsintensityRatio?: number - Intensity ratiodurationRatio?: number - Duration ratiooffsetX?: number - Offset XoffsetY?: number - Offset YTact.playDot(params: PlayDotParams): voidparams:
position: PositionType - Position typemotorValues: number[] - Motor valuesduration?: number - Duration in millisecondsTact.playPath(params: PlayPathParams): voidparams:
position: PositionType - Position typex: number[] - X valuesy: number[] - Y valuesintensity: number[] - Intensity valuesduration?: number - Duration in millisecondsIf you are using Vite, you may need to add the following to your vite.config.js file:
export default defineConfig({
// ...
optimizeDeps: {
exclude: ['tact-js'],
},
// ...
});
demo/ directory for a minimal setup examplebHaptics License
FAQs
    
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.