Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #22885, references existing doc #38161

Merged
merged 3 commits into from
Feb 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions files/en-us/web/api/devicemotionevent/acceleration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ browser-compat: api.DeviceMotionEvent.acceleration

{{APIRef("Device Orientation Events")}}{{securecontext_header}}

The **`acceleration`** read-only property of the {{domxref("DeviceMotionEvent")}} interface returns the amount of acceleration recorded by
The **`acceleration`** read-only property of the {{domxref("DeviceMotionEvent")}} interface returns the acceleration recorded by
the device, in [meters per second squared (m/s²)](https://en.wikipedia.org/wiki/Meter_per_second_squared).
The acceleration value does not include the effect of
the gravity force, in contrast to {{DOMxRef("DeviceMotionEvent.accelerationIncludingGravity")}}.
This value does not include the effect of
the gravitational force, in contrast to {{DOMxRef("DeviceMotionEvent.accelerationIncludingGravity")}}.

> [!NOTE]
> If the hardware doesn't know how to remove gravity from the
> If the hardware does not know how to remove gravity from the
> acceleration data, this value may not be present in the
> {{DOMxRef("DeviceMotionEvent")}}. In this situation, you'll need to use
> {{DOMxRef("DeviceMotionEvent.accelerationIncludingGravity")}} instead.

## Value

The `acceleration` property is an object providing information about
acceleration on three axis. Each axis is represented with its own property:
acceleration on the three axes in the [Device coordinate frame](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained#device_coordinate_frame). Each axis is represented with its own property:

- `x`
- : Represents the acceleration upon the x axis which is the west to east axis
- : Represents the acceleration along the x axis
- `y`
- : Represents the acceleration upon the y axis which is the south to north axis
- : Represents the acceleration along the y axis
- `z`
- : Represents the acceleration upon the z axis which is the down to up axis
- : Represents the acceleration along the z axis

## Specifications

Expand Down