From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/api/vrpose/index.html | 77 +++++++++++++++++++++++++++++ files/ru/web/api/vrpose/position/index.html | 68 +++++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 files/ru/web/api/vrpose/index.html create mode 100644 files/ru/web/api/vrpose/position/index.html (limited to 'files/ru/web/api/vrpose') diff --git a/files/ru/web/api/vrpose/index.html b/files/ru/web/api/vrpose/index.html new file mode 100644 index 0000000000..8e09aaf928 --- /dev/null +++ b/files/ru/web/api/vrpose/index.html @@ -0,0 +1,77 @@ +--- +title: VRPose +slug: Web/API/VRPose +tags: + - API + - Experimental + - Landing + - NeedsTranslation + - Reference + - TopicStub + - VR + - VRPose + - Virtual Reality + - WebVR +translation_of: Web/API/VRPose +--- +
{{APIRef("WebVR API")}}{{SeeCompatTable}}
+ +

The VRPose interface of the WebVR API represents the state of a VR sensor at a given timestamp (which includes orientation, position, velocity, and acceleration information.)

+ +

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

+ +

Properties

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

Obsolete properties

+ +
+
{{domxref("VRPose.timeStamp")}} {{readonlyInline}} {{obsolete_inline}}
+
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. This version of timestamp has been removed from the spec — instead, timestamps are now returned when {{domxref("VRDisplay.getFrameData()")}} is called — see {{domxref("VRFrameData.timestamp")}}.
+
+ +

Examples

+ +

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

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WebVR 1.1', '#interface-vrpose', 'VRPose')}}{{Spec2('WebVR 1.1')}}Initial definition
+ +

Browser compatibility

+ +

{{Compat("api.VRPose")}}

+ +

See also

+ + diff --git a/files/ru/web/api/vrpose/position/index.html b/files/ru/web/api/vrpose/position/index.html new file mode 100644 index 0000000000..2db5c476d2 --- /dev/null +++ b/files/ru/web/api/vrpose/position/index.html @@ -0,0 +1,68 @@ +--- +title: VRPose.position +slug: Web/API/VRPose/position +tags: + - Виртуальная реальность +translation_of: Web/API/VRPose/position +--- +
{{APIRef("WebVR API")}}{{SeeCompatTable}}
+ +

Постоянное свойство position (только для чтения) интерфейса {{domxref ("VRPose")}} возвращает позицию {{domxref ("VRDisplay")}} в текущем {{domxref ("VRPose.timestamp")}} как 3D вектор.

+ +

Система координат выглядит следующим образом:

+ + + +

Местоположения измеряются в метрах от исходной точки - эта точка является либо положением, в котором датчик был впервые считан, либо положением датчика в точке, которую {{domxref ("VRDisplay.resetPose ()")}} в последний раз вызывали.

+ +
+

Примечание: По умолчанию все позиции даны как имеющие горизонтальное расположение. Преобразование этой точки с помощью параметра {{domxref ("VRStageParameters.sittingToStandingTransform")}} - например, когда вы работаете с дисплеем комнаты - преобразует это в вертикальное расположение.

+
+ +

Синтаксис

+ +
var myPosition = VRPose.position;
+ +

Значение

+ +

Значение (типа Float)  {{domxref("Float32Array")}}, или ноль, если датчик VR не может предоставить данные о местоположении.

+ +
+

Примечание: Пользовательские агенты могут предоставлять эмулированные значения положения с помощью таких методов, как моделирование шеи; при этом они все равно должны сообщать параметр {{domxref ("VRDisplayCapabilities.hasPosition")}} как ложные.

+
+ +

Пример

+ +

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

+ +

Спецификация

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WebVR 1.1', '#dom-vrpose-position', 'position')}}{{Spec2('WebVR 1.1')}}Initial definition
+ +

Совместимость браузера

+ +

{{Compat("api.VRPose.position")}}

+ +

Дополнительно

+ + -- cgit v1.2.3-54-g00ecf