2. mousePressed()函数:
此函数在每次鼠标按钮被按下后被调用。当一个按钮被按下时,函数中的代码只运行一次。“鼠标按钮被按下”这个状态是用来触发一个动作的。
3. mouseClicked()函数:
-----------------------------------------------------------------------
Reference:
1. https://processing.org/reference/libraries/
2. 一个很好的鼠标动画示例:https://processing.org/examples/mousefunctions.html
Processing中mousePressed()和mousePressed的区别以及几种鼠标事件的概括。
原文:https://www.cnblogs.com/binaryguy/p/13947858.html