onMouseRelease(action: (m: MouseButton)=>void): KEventController
Register an event that runs when user releases mouse.
param
action- The function that is run what the user clicks a provided mouse button.
// spawn bean where right mouse is released onMouseRelease("right", (m) => { debug.log(`${m} released, spawning bean...`); add([ pos(mousePos()), sprite("bean"), anchor("center"), ]); });
returns
The event controller.
since
v3001.0