canvas: expose touch pressure (as event.force) in the touch script.

This commit is contained in:
jean-emmanuel 2021-12-19 17:41:17 +01:00
parent cb68a80309
commit 447729443f
3 changed files with 9 additions and 1 deletions

View file

@ -42,6 +42,7 @@ This script has access to the same variables and functions as the `script` prope
- `movementX`, `movementY`: movement of the pointer in pixels since the last event
- `pointerId`: unique identifier used to differenciate fingers in multitouch situation
- `altKey`, `ctrlKey`, `shiftKey`: keyboard modifier states
- `force`: amount of pressure applied to the touch surface between `0` and `1` (see [Touch.force](https://developer.mozilla.org/en-US/docs/Web/API/Touch/force)). Equals `0` if the API is not supported or if no pressure information is found.
### `draw`