示例 移动设备运动

移动设备运动

当展示绘图的移动设备发生移动时,deviceMoved() 函数会被触发。在这个例子中,accelerationXaccelerationYaccelerationZ 的值可以用来设置一个圆的位置和大小。这个功能仅适用于移动设备。

Creative Commons BY-NC-SA license badge

移动设备运动: 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!