diff --git a/libraries/shared/src/PointerEvent.cpp b/libraries/shared/src/PointerEvent.cpp
index e35832391d..f4da41bcbc 100644
--- a/libraries/shared/src/PointerEvent.cpp
+++ b/libraries/shared/src/PointerEvent.cpp
@@ -41,6 +41,64 @@ PointerEvent::PointerEvent(EventType type, uint32_t id,
;
}
+/**jsdoc
+ * A PointerEvent defines a 2D or 3D mouse or similar pointer event.
+ * @typedef {object} PointerEvent
+ * @property {string} type - The type of event: "Press"
, "DoublePress"
, "Release"
, or
+ * "Move"
.
+ * @property {number} id - Integer number used to identify the pointer: 0
= hardware mouse, 1
= left
+ * controller, 2
= right controller.
+ * @property {Vec2} pos2D - The 2D position of the event on the intersected overlay or entity XY plane.
+ * @property {Vec3) pos3D - The 3D position of the event on the intersected overlay or entity.
+ * @property {Vec3} normal - The surface normal at the intersection point.
+ * @property {Vec3} direction - The direction of the intersection ray.
+ * @property {string} button - The name of the button pressed: None
, Primary
, Secondary
,
+ * or Tertiary
.
+ * @property {boolean} isPrimaryButton - true
if the button pressed was the primary button, otherwise
+ * undefined
;
+ * @property {boolean} isLeftButton - true
if the button pressed was the primary button, otherwise
+ * undefined
;
+ * @property {boolean} isSecondaryButton - true
if the button pressed was the secondary button, otherwise
+ * undefined
;
+ * @property {boolean} isRightButton - true
if the button pressed was the secondary button, otherwise
+ * undefined
;
+ * @property {boolean} isTertiaryButton - true
if the button pressed was the tertiary button, otherwise
+ * undefined
;
+ * @property {boolean} isMiddleButton - true
if the button pressed was the tertiary button, otherwise
+ * undefined
;
+ * @property {boolean} isPrimaryHeld - true
if the primary button is currently being pressed, otherwise
+ * false
+ * @property {boolean} isSecondaryHeld - true
if the secondary button is currently being pressed, otherwise
+ * false
+ * @property {boolean} isTertiaryHeld - true
if the tertiary button is currently being pressed, otherwise
+ * false
+ * @property {KeyboardModifiers} keyboardModifiers - Integer value being and with bits set according to which keyboard modifier
+ * keys are were pressed when the event was generated.
+ */
+/**jsdoc
+ *
A KeyboardModifiers value is used to specify which modifier keys on the keyboard are pressed. The value is the sum + * (bitwise OR) of the relevant combination of values from the following table:
+ *Key | Hexadecimal value | Decimal value | Description |
---|---|---|---|
Shift | 0x02000000 | 33554432 |
+ * A Shift key on the keyboard is pressed. |
Control | 0x04000000 | 67108864 |
+ * A Control key on the keyboard is pressed. |
Alt | 0x08000000 | 134217728 |
+ * An Alt key on the keyboard is pressed. |
Meta | 0x10000000 | 268435456 |
+ * A Meta or Windows key on the keyboard is pressed. |
Keypad | 0x20000000 | 536870912 |
+ * A keypad button is pressed. |
Group | 0x40000000 | 1073741824 |
+ * X11 operating system only: An AltGr / Mode_switch key on the keyboard is pressed. |