onMouseMove(action: (pos: Vec2, delta: Vec2)=>void): KEventController
Register an event that runs whenever user moves the mouse.
param
action- The function that is run what the user moves the mouse.
// runs when the mouse has moved onMouseMove((p, d) => { bean.pos = p; // set bean position to mouse position });
returns
The event controller.
since
v2000.1