Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist [haptics] handle no actuators May 25, 2019
examples/basic update title and links Dec 1, 2018
tests [haptics] hi Oct 19, 2017
.npmignore [haptics] hi Oct 19, 2017
.travis.yml [haptics] hi Oct 19, 2017
LICENSE [haptics] hi Oct 19, 2017 npm run readme to update readmes with versions Feb 18, 2019
index.html update title and links Dec 1, 2018
index.js [haptics] handle no actuators May 25, 2019
package.json [haptics] bump May 25, 2019


Version License

A controller haptics (vibrations) component for A-Frame. Supported by experimental Gamepad Extensions. Read about browser support.



Property Description Default Value
actuatorIndex Index of the actuator from the gamepad's array of actuators. 0
dur Duration of vibration pulse (milliseconds). 100
enabled Whether the component should pulse on the event. true
events Array of events to listen for to trigger a pulse (e.g., triggerdown, triggerup) []
eventsFrom Target entity to listen for events if other than the controller entity. this.el
force Intensity of pulse (from 0 to 1) 1


Name Description
pulse Manually trigger pulse (can pass in force and duration as arguments, defaults data-defined duration and force).

// function pulse (force, duration)
this.el.components.haptics.pulse(0.5, 200);



Install and use by directly including the browser files:

  <title>My A-Frame Scene</title>
  <script src=""></script>
  <script src=""></script>

    <a-entity hand-controls="left"  haptics="events: triggerdown; dur: 1000; force: 0.5"></a-entity>
    <a-entity hand-controls="right" haptics="events: triggerdown; dur: 500; force: 1.0"></a-entity>


Install via npm:

npm install aframe-haptics-component

Then require and use.

You can’t perform that action at this time.