Specifies the vibration feedback content.

Hierarchy

  • HapticsEffect

Constructors

Properties

Constructors

Properties

amplitude?: number

Specifies the strength of the vibration feedback. The higher the number, the stronger the vibration.
The specified value is clamped between 0 and 1.
If not specified or null is specified, vibration feedback will be played at the default strength.

How the strength of the vibration feedbacks feel may differ across devices.

duration?: number

Specifies the duration of the vibration feedback in seconds.
If a negative value, no value, or null is specified, the vibration feedback will be played for the default duration.

In some devices, the actual duration of the vibration feedback may be shorter than the specified value.

frequency?: number

Specifies the frequency of the vibration feedback.
The higher the number, the higher the frequency.
The specified value is clamped between 0 and 1.
If not specified or null is specified, vibration feedback will be played at the default frequency.

Some devices do not support frequency settings. In that case, frequency setting is ignored.

Notably, frequency settings are not supported in the following environments:

  • iOS
  • Android
  • Quest environment
  • PCVR environment, using Quest Link

Generated using TypeDoc