この例では、カーソルの位置に円を描画しますが、円は長方形の中に制約されます。これは、マウスの座標を constrain() 関数に渡すことで実現しています。
制約: Revised by Caleb Foss. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: 2023 code, pre-2023 code. You can suggest improvements by contributing to the current website!