Demos
Ranges
rangeX: 2
rangeY: 2
rangeRot: 1
1
rangeX: 10
rangeY: 10
rangeRot: 4
2
rangeX: 4
rangeY: 0
rangeRot: 0
3
rangeX: 0
rangeY: 0
rangeRot: 5
4
Rumble Speeds
0
5
50
6
100
7
200
8
Event Types
Hover
9
Click
10
Mousedown
11
Constant
12
Absolute Positioning (Fixed positioning uses the same concept)
posX: 'left'
posY: 'top'
13
posX: 'right'
posY: 'top'
14
posX: 'left'
posY: 'bottom'
15
posX: 'right'
posY: 'bottom'
16
Documentation
Options/Defaults
Option | Default | Description |
---|---|---|
rangeX | 2 | Set the horizontal rumble range (pixels) |
rangeY | 2 | Set the vertical rumble range (pixels) |
rangeRot | 1 | Set the rotation range (degrees) |
rumbleSpeed | 10 | Set the speed/frequency in milliseconds of the rumble (lower number = faster) |
rumbleEvent | 'hover' | Set the event that triggers the rumble ('hover', 'click', 'mousedown', 'constant') |
posX | 'left' | If using jRumble on a fixed or absolute positioned element, choose 'left' or 'right' to match your CSS |
posY | 'top' | If using jRumble on a fixed or absolute positioned element, choose 'top' or 'bottom' to match your CSS |