This reference is for Processing 2.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.
| Name |
mouseWheel() |
| Examples |
void setup() {
size(100, 100);
}
void draw() {}
void mouseWheel(MouseEvent event) {
float e = event.getAmount();
println(e);
}
|
| Description |
The event.getAmount() method returns negative values if the mouse wheel if rotated up or away from the user and positive in the other direction. On OS X with "natural" scrolling enabled, the values are opposite.
|
| Syntax | mouseWheel(event) |
| Parameters |
| event |
MouseEvent: the MouseEvent |
|
| Returns | void |
Updated on October 26, 2013 08:58:30pm PDT