aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/vrpose/index.html
blob: de93cd165f3cbb1c232096264b1c4639ca1fbb1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: VRPose
slug: Web/API/VRPose
tags:
  - API
  - Experimental
  - Landing
  - NeedsTranslation
  - Reference
  - TopicStub
  - VR
  - VRPose
  - Virtual Reality
  - WebVR
translation_of: Web/API/VRPose
---
<div>{{APIRef("WebVR API")}}{{SeeCompatTable}}</div>

<p>The <strong><code>VRPose</code></strong> interface of the <a href="/en-US/docs/Web/API/WebVR_API">WebVR API</a> represents the state of a VR sensor at a given timestamp (which includes orientation, position, velocity, and acceleration information.)</p>

<p>This interface is accessible through the {{domxref("VRDisplay.getPose()")}} and {{domxref("VRDisplay.getFrameData()")}} methods. {{domxref("VRDisplay.getPose()")}} is deprecated.</p>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("VRPose.position")}} {{readonlyInline}}</dt>
 <dd>Returns the position of the {{domxref("VRDisplay")}} at the current {{domxref("VRPose.timestamp")}} as a 3D vector</dd>
 <dt>{{domxref("VRPose.linearVelocity")}} {{readonlyInline}}</dt>
 <dd>Returns the linear velocity of the {{domxref("VRDisplay")}} at the current {{domxref("VRPose.timestamp")}}, in meters per second.</dd>
 <dt>{{domxref("VRPose.linearAcceleration")}} {{readonlyInline}}</dt>
 <dd>Returns the linear acceleration of the {{domxref("VRDisplay")}} at the current {{domxref("VRPose.timestamp")}}, in meters per second per second.</dd>
 <dt>{{domxref("VRPose.orientation")}} {{readonlyInline}}</dt>
 <dd>Returns the orientation of the sensor at the current {{domxref("VRPose.timestamp")}}, as a quarternion value.</dd>
 <dt>{{domxref("VRPose.angularVelocity")}} {{readonlyInline}}</dt>
 <dd>Returns the angular velocity of the {{domxref("VRDisplay")}} at the current {{domxref("VRPose.timestamp")}}, in radians per second.</dd>
 <dt>{{domxref("VRPose.angularAcceleration")}} {{readonlyInline}}</dt>
 <dd>Returns the angular acceleration of the {{domxref("VRDisplay")}} at the current {{domxref("VRPose.timestamp")}}, in meters per second per second.</dd>
</dl>

<h3 id="Obsolete_properties">Obsolete properties</h3>

<dl>
 <dt>{{domxref("VRPose.timeStamp")}} {{readonlyInline}} {{obsolete_inline}}</dt>
 <dd>Returns the current time stamp of the system — a monotonically increasing value useful for determining if position data has been updated, and what order updates have occured in. <strong>This version of <code>timestamp</code> has been removed from the spec — instead, timestamps are now returned when {{domxref("VRDisplay.getFrameData()")}} is called — see {{domxref("VRFrameData.timestamp")}}.</strong></dd>
</dl>

<h2 id="Examples">Examples</h2>

<p>{{page("/Web/API/VRDisplay/getFrameData", "Examples")}}</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('WebVR 1.1', '#interface-vrpose', 'VRPose')}}</td>
   <td>{{Spec2('WebVR 1.1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Web/API/WebVR_API">WebVR API homepage</a></li>
 <li><a href="http://mozvr.com/">MozVr.com</a> — demos, downloads, and other resources from the Mozilla VR team.</li>
</ul>