stuyam / pressure

:point_down::boom: JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
https://pressurejs.com
MIT License
2.92k stars 97 forks source link

question - pressure vs duration #78

Closed knoxcard closed 5 years ago

knoxcard commented 5 years ago

Is this really measuring pressure? or is it simpy duration?

harder the press = longer the duration

stuyam commented 5 years ago

@knoxcard is depends on the device and browser you are using. The hardware and browser both need to support giving force values from the trackpad or screen. I they don't support it then pressure.js falls back to using duration. We refer to the duration settings as the Polyfill since it is fallback support: https://github.com/stuyam/pressure#polyfill-speed-up