CPC G06F 3/016 (2013.01) | 20 Claims |
1. A method of using a haptics library to determine whether to provide predefined haptic responses or parametrically-defined haptic responses, the method comprising:
receiving a first desired semantic attribute for a haptic response to be provided while a user is using a first application that is executing on an electronic device;
in accordance with a first determination, made by the haptics library that is distinct from the first application and that is configured to provide data used to generate haptic responses to a plurality of applications executing on the electronic device, that the electronic device should use a parametrically-defined haptic response instead of a predefined haptic response to deliver a haptic response having the first desired semantic attribute:
selecting, by the haptics library and using a first function that takes at least the first desired semantic attribute as an input, respective values for a first set of haptic-response parameters; and
providing instructions to cause a haptic generator of the electronic device to deliver a first parametrically-defined haptic response having the first desired semantic attribute using the respective values for the first set of haptic-response parameters;
receiving a second desired semantic attribute, distinct from the first desired semantic attribute, for a haptic response to be provided while the user is using a second application that is executing on the electronic device; and
in accordance with a second determination, made by the haptics library, that the electronic device should use a second parametrically-defined haptic response instead of the predefined haptic response to deliver a haptic response having the second desired semantic attribute:
selecting, by the haptics library and using a second function that takes at least the second desired semantic attribute as an input, new respective values for a second set of haptic-response parameters, the new respective values being distinct from the respective values; and
providing instructions to cause the haptic generator of the electronic device to deliver the second parametrically-defined haptic response having the second desired semantic attribute using the respective values for the second set of haptic-response parameters.
|