Content-Length: 362324 | pFad | http://github.com/NativeScript/plugins/commit/16237feda0428af90e4b131a225fbcfd4399b849

D1 chore(haptics): README update (#452) · NativeScript/plugins@16237fe · GitHub
Skip to content

Commit 16237fe

Browse files
authored
chore(haptics): README update (#452)
1 parent 40f1aed commit 16237fe

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Diff for: packages/haptics/README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# @nativescript/haptics
22

3+
A plugin that allows you to add haptics to your app.
4+
35
> Playing haptics can engage people's sense of touch and bring their familiarity with the physical world into your app or game.
46
~ Developer docs
57

68

79
Thanks to [Eddy Verbruggen](EddyVerbruggen) for providing [nativescript-taptic-engine](https://github.com/EddyVerbruggen/nativescript-taptic-engine) as this continues its evolution by streamlining the API and adding Android support, inspired by [react-native-haptic-feedback](https://github.com/junina-de/react-native-haptic-feedback).
810

9-
## Table of Contents
11+
## Contents
12+
1013
* [Installation](#installation)
14+
* [Use @nativescript/haptics](#use-nativescripthaptics)
1115
* [API](#api)
1216
* [isSupported()](#issupported)
1317
* [is6SAnd6SPlusSupported()](#is6sand6splussupported)
@@ -26,13 +30,19 @@ Thanks to [Eddy Verbruggen](EddyVerbruggen) for providing [nativescript-taptic-e
2630
npm install @nativescript/haptics
2731
```
2832

33+
## Use @nativescript/haptics
34+
35+
Find an example of `@nativescript/haptics` usage [here](https://stackblitz.com/edit/nativescript-stackblitz-templates-jlvtwm?file=app/main-view-model.ts) on StackBlitz.
36+
2937
## API
3038

39+
The plugin provides the API below.
40+
3141
### isSupported()
3242
```ts
3343
isHapticsSupported: boolean = Haptics.isSupported()
3444
```
35-
Checks if Haptics is supported.
45+
Checks if haptics is supported on the device.
3646

3747
---
3848
### is6SAnd6SPlusSupported()
@@ -84,7 +94,7 @@ There are 3 impact types:
8494

8595
### HapticsFallback
8696

87-
To use the haptics fallbacks, first check if there is support:
97+
To use the haptics fallbacks, check if there is support:
8898

8999
```ts
90100
if (!Haptics.isSupported() && Haptics.is6SAnd6SPlusSupported()) {
@@ -110,15 +120,15 @@ import { HapticsFallback } from "@nativescript/haptics";
110120

111121
HapticsFallback.strongBoom();
112122
```
113-
This triggers the 'Pop' effect of 'Peek & Pop', which is a bit more profound than the 'Peek' effect.
123+
This triggers the `Pop` effect of `Peek & Pop`, which is a bit more profound than the `Peek` effect.
114124

115125
### burst()
116126
```ts
117127
import { HapticsFallback } from "@nativescript/haptics";
118128

119129
HapticsFallback.burst();
120130
```
121-
This triggers the 'Nope' effect you get when force-touching a home icon that doesn't have any action. It's a short burst of 3-ish 'weak booms'.
131+
This triggers the `Nope` effect you get when force-touching a home icon that doesn't have any action. It's a short burst of 3-ish 'weak booms'.
122132

123133
## Changelog
124134
* 3.0.0 Moved to @nativescript/haptics and added Android support. Adjusted naming conventions.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/plugins/commit/16237feda0428af90e4b131a225fbcfd4399b849

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy