# @any-touch/press

> any-touch的识别器, 用来识别按压手势.

Latest version **2.2.0** (published 2022-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @any-touch/press
pnpm add @any-touch/press
yarn add @any-touch/press
bun add @any-touch/press
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-05-24 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | any86 |
| Maintainers | russell-ne |

## Links

- npm: https://www.npmjs.com/package/@any-touch/press
- npm.io page: https://npm.io/package/@any-touch/press

## Dependencies (2)

- [@any-touch/shared](https://npm.io/package/@any-touch/shared.md) ^2.2.0
- [@any-touch/compute](https://npm.io/package/@any-touch/compute.md) ^2.2.0

## Recent versions

- 2.2.0 (latest) — 2022-05-24
- 2.0.3-alpha.0 (next) — 2022-01-18
- 2.1.3 — 2022-05-24
- 2.1.2 — 2022-04-28
- 2.1.1 — 2022-04-08
- 2.1.0 — 2022-04-02
- 2.0.3 — 2022-03-30
- 2.0.3-2.0.3-alpha.1.0 — 2022-03-30
- 2.0.2 — 2022-01-06
- 2.0.2-alpha.1 — 2022-01-06
- 2.0.2-alpha.0 — 2022-01-06
- 2.0.1 — 2021-12-29
- 2.0.1-alpha.0 — 2021-12-28
- 2.0.0 — 2021-12-28
- 2.0.0-alpha.4 — 2021-12-02
- … 64 more at https://npm.io/package/@any-touch/press/versions

## README

# @any-touch/press
**按压**识别器.

## 安装
```shell
npm i -S @any-touch/press
```

## 快速开始
```javascript
// 只加载press识别器(按压)
import Core from '@any-touch/core';
import press from '@any-touch/press';
const at = new Core(el);
at.use(press, 参数)

// 按压
at.on('press', (event) => {
    // event包含位置/速度/方向等信息
});
```

## 参数
|名称|数据类型|默认值|说明|
|---|---|---|---|
|name|`String`|'press'|自定义事件名称|
|pointLength|`Number`|1|支持的触点数, 可支持多指按压|
|maxDistance| `Number`|9|触点允许移动的最大距离|
|minPressTime| `Number`|251|触发事件需要按压的最小时间|

---
_Source: https://npm.io/package/@any-touch/press · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
