]> git.proxmox.com Git - rustc.git/blob - vendor/web-sys/webidls/enabled/GamepadPose.webidl
New upstream version 1.71.1+dfsg1
[rustc.git] / vendor / web-sys / webidls / enabled / GamepadPose.webidl
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * The origin of this IDL file is
7 * https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
8 */
9
10 [Pref="dom.gamepad.extensions.enabled"]
11 interface GamepadPose
12 {
13 readonly attribute boolean hasOrientation;
14 readonly attribute boolean hasPosition;
15
16 /**
17 * position, linearVelocity, and linearAcceleration are 3-component vectors.
18 * position is relative to a sitting space. Transforming this point with
19 * VRStageParameters.sittingToStandingTransform converts this to standing space.
20 */
21 [Constant, Throws] readonly attribute Float32Array? position;
22 [Constant, Throws] readonly attribute Float32Array? linearVelocity;
23 [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
24
25 /* orientation is a 4-entry array representing the components of a quaternion. */
26 [Constant, Throws] readonly attribute Float32Array? orientation;
27 /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
28 [Constant, Throws] readonly attribute Float32Array? angularVelocity;
29 [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
30 };