diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/vrpose/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/vrpose/index.html')
-rw-r--r-- | files/zh-cn/web/api/vrpose/index.html | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/vrpose/index.html b/files/zh-cn/web/api/vrpose/index.html new file mode 100644 index 0000000000..0cb8562b69 --- /dev/null +++ b/files/zh-cn/web/api/vrpose/index.html @@ -0,0 +1,126 @@ +--- +title: VRPose +slug: Web/API/VRPose +tags: + - VR + - VRPose + - 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><a href="/en-US/docs/Web/API/WebVR_API">WebVR API</a> 中的 <strong><code>VRPose</code></strong> 接口表示在一个给定的时间戳中,一个VR传感器的状态(包括了方向、位置、速度和加速度信息)。</p> + +<p>This interface is accessible through the {{domxref("VRDisplay.getPose()")}} and {{domxref("VRDisplay.getImmediatePose()")}} methods.</p> + +<p>这个接口能通过 {{domxref("VRDisplay.getPose()")}} 和 {{domxref("VRDisplay.getImmediatePose()")}} 方法访问</p> + +<h2 id="Properties">Properties</h2> + +<dl> + <dt>{{domxref("VRPose.timeStamp")}} {{readonlyInline}}</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.</dd> + <dd>返回当前系统的时间戳。此单调递增的值可以有助于确定位置数据是否有更新,以及更新的顺序。</dd> + <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> + <dd>以三维向量的形式返回当前时间戳 {{domxref("VRPose.timestamp")}} 时 {{domxref("VRDisplay")}} 的位置信息。</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> + <dd>返回当前时间戳 {{domxref("VRPose.timestamp")}} 时 {{domxref("VRDisplay")}} 的线速度,单位为米/秒。</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> + <dd>返回当前时间戳 {{domxref("VRPose.timestamp")}} 时 {{domxref("VRDisplay")}} 的线加速度,单位为米/平方秒。</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> + <dd>以四元数的形式返回当前时间戳 {{domxref("VRPose.timestamp")}} 时传感器的方向,</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> + <dd>返回当前时间戳 {{domxref("VRPose.timestamp")}} 时 {{domxref("VRDisplay")}} 的角速度,单位为弧度/秒。</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> + <dd>返回当前时间戳 {{domxref("VRPose.timestamp")}} 时 {{domxref("VRDisplay")}} 的角加速度,单位为弧度/平方秒。</dd> +</dl> + +<h2 id="Examples">Examples</h2> + +<pre>TBD.</pre> + +<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', '#interface-vrpose', 'VRPose')}}</td> + <td>{{Spec2('WebVR')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari (WebKit)</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + <th>Chrome for Android</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatNo}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<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> |