Mouse_v4 Op
Get mouse/touchscreen/pointer coordinates and events
Get mouse/touchscreen/pointer coordinates and events
Summary (oneliner)
Full Name
- Ops.Devices.Mouse.Mouse_v4
- Core Op - visible for everyone
- MIT
- cgl
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Example Patch Mouse, Screen Pos To3d & Trigger Extender Example
Using the ScreenPosTo3d op we can convert the mouse coordinates to 3D coordinates. For this you need to disable the Flip Y port of the Mouse op.
Using the ArrayPushValue3X op we add the (converted) x and z coordinates (together with z=0) to the array and draw it with the SimpleSpline op.
INPUT PORTS
Coordinates index (Number: integer) -1 to 1 Pixel Display Pixel 0 to 1
Area index (Number: integer)
flip y (Number: boolean)
right click prevent default (Number: boolean)
Events index (Number: integer) Pointer Touch Mouse
Passive Events (Number: boolean)
Element (Object)
Active (Number: boolean)
OUTPUT PORTS
x (Number)
y (Number)
click (Trigger)
click right (Trigger)
Button is down (booleanNumber)
Mouse is hovering (booleanNumber)
Movement X (Number)
Movement Y (Number)
Event (Object)