MultiplePointerPresentEvent
MultiplePointerPresentEvent = { [id: number]: PointerPresentEvent };
A dictionary of PointerPresentEvents used to track multiple pointers on the screen at the same time.
Member List
Member | Type | Description |
---|---|---|
id | number | The index of the PointerPresentEvent to return. |
Example
symbol.nodes.Plane.on("pointersmove", (e) => {
// Runs when pointersmove occurs on the Plane node
// The argument e contains useful info about this event:
// Stores the screenPosition of the first PointerPresentEvent [x,y]
var firstScreenPosition = e[0].screenPosition;
// Stores the localPosition of the first PointerPresentEvent [x,y,z]
var firstLocalPosition = e[0].localPosition;
// Stores the ID of the first pointer as a number, starting at 0
var pointerNumber = e[0].pointerId;
// Stores whether or not the first pointer is currently down, as a boolean
var isPointerDown = e[0].pointerDown;
// Stores whether or not the first pointer is the primary pointer (the first to touch down), as a boolean
var isPointerPrimary = e[0].isPrimary;
});