VOOZH about

URL: https://www.geeksforgeeks.org/javascript/p5-js-accelerationy-variable/

⇱ p5.js accelerationY variable - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

p5.js accelerationY variable

Last Updated : 10 May, 2021

The accelerationY system variable is responsible for the acceleration of the device(tablets or mobile phones) along the y-axis. It can be used with the draw() function to accelerate the device in the y-axis of the coordinate system.

Its Value is represented as meters per second squared.

Syntax:

accelerationY

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment