vibrationManager¶
Overview¶
A singleton that manages vibration feedback through the web vibration API. navigator.vibrate is required to use this file. See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate for more information and a list of supported platforms. If not defined, this file will do nothing.
Vibration can be started with vibrationManager.startVibrate() to begin continuous vibration. Stop with vibrationManager.stopVibrate.
Vibration patterns can also be defined similarly to navigator.vibrate(). vibrationManager.startVibrate() can take an array of intervals that define the uptime/downtime of the vibration motor. See that function for more information.
Since the manager works with intervals of time, it must be stepped every animation frame with vibrationManager.step().
@author Jesse Greenberg
Class Intensity¶
enum for intensity levels
Static Properties¶
HIGH : Intensity¶
(readonly)
LOW : Intensity¶
(readonly)
enumeration : Enumeration¶
(readonly)
Gets a list of keys, values and mapping between them. For use in EnumerationProperty and PhET-iO
Source Code¶
See the source for vibrationManager.ts in the tappi repository.