当展示绘图的移动设备发生移动时,deviceMoved() 函数会被触发。在这个例子中,accelerationX、accelerationY 和 accelerationZ 的值可以用来设置一个圆的位置和大小。这个功能仅适用于移动设备。
移动设备运动: Revised by Kasey Lichtlyter. 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!