pointermove

Studio

pointermove

("pointermove", (PointerPresentEvent) => void): this;

Emitted for every depressed pointer that intersects this object when it moves.

Returns

this

Handler Function

When the pointermove event is fired, attached handler functions are called with a single argument, a PointerPresentEvent.

Example

symbol.nodes.Plane.on("pointermove", (e) => {
    // Runs when pointermove occurs on the Plane node
    // The argument e contains useful info about this event:

    // Stores the screenPosition of the pointer [x,y]
    var pointerScreenPosition = e.screenPosition;

    // Stores the localPosition of the pointer [x,y,z], in the plane's local coordinate system
    var pointerLocalPosition = e.localPosition;

    // Stores the ID of the pointer as a number, starting at 0
    var pointerNumber = e.pointerId;

    // Stores whether or not the pointer is currently down, as a boolean
    var isPointerDown = e.pointerDown;

    // Stores whether or not the pointer is the primary pointer (the first to touch down), as a boolean
    var isPointerPrimary = e.isPrimary;
});
Open in new window