From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/vreyeparameters/index.html | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 files/ko/web/api/vreyeparameters/index.html (limited to 'files/ko/web/api/vreyeparameters/index.html') diff --git a/files/ko/web/api/vreyeparameters/index.html b/files/ko/web/api/vreyeparameters/index.html new file mode 100644 index 0000000000..79f25639ba --- /dev/null +++ b/files/ko/web/api/vreyeparameters/index.html @@ -0,0 +1,88 @@ +--- +title: VREyeParameters +slug: Web/API/VREyeParameters +tags: + - API + - Experimental + - Landing + - Reference + - VR + - Virtual Reality + - WebVR +translation_of: Web/API/VREyeParameters +--- +
{{APIRef("WebVR API")}}{{SeeCompatTable}}
+ +

WebVR API의 VREyeParameters 인터페이스는 시야 정보 필드를 포함하여 특정한 눈에 대한 장면을 정확하게 렌더링 하는 데 필요한 모든 정보를 나타냅니다.

+ +

{{domxref("VRDisplay.getEyeParameters()")}} 방법을 통해 액세스 할 수 있습니다.

+ +
+

The values in this interface should not be used to compute view or projection matrices. In order to ensure the widest possible hardware compatibility use the matrices provided by {{domxref("VRFrameData")}}.

+
+ +

속성

+ +
+
{{domxref("VREyeParameters.offset")}} {{readonlyInline}}
+
사용자 눈 사이의 중심점에서 눈 중심까지의 거리를 미터 단위로 나타냅니다.
+
{{domxref("VREyeParameters.fieldOfView")}} {{readonlyInline}}
+
현재 눈에 보이는 시야를 설명하며,사용자가 동공 사이의 거리(m/s)를 조절할 때 달라질 수 있습니다.(IPD).
+
{{domxref("VREyeParameters.renderWidth")}} {{readonlyInline}}
+
각 눈 뷰포트의 권장 렌더 타겟 폭을 픽셀 단위로 설명합니다.
+
{{domxref("VREyeParameters.renderHeight")}} {{readonlyInline}}
+
각 눈 뷰포트의 권장 렌더 타겟 높이를 픽셀 단위로 나타냅니다..
+
+ +

예제

+ +
navigator.getVRDisplays().then(function(displays) {
+  // If a display is available, use it to present the scene
+  vrDisplay = displays[0];
+  console.log('Display found');
+  // Starting the presentation when the button is clicked:
+  //   It can only be called in response to a user gesture
+  btn.addEventListener('click', function() {
+    vrDisplay.requestPresent([{ source: canvas }]).then(function() {
+      console.log('Presenting to WebVR display');
+
+      // Set the canvas size to the size of the vrDisplay viewport
+
+      var leftEye = vrDisplay.getEyeParameters('left');
+      var rightEye = vrDisplay.getEyeParameters('right');
+
+      canvas.width = Math.max(leftEye.renderWidth, rightEye.renderWidth) * 2;
+      canvas.height = Math.max(leftEye.renderHeight, rightEye.renderHeight);
+
+      drawVRScene();
+    });
+  });
+});
+ +

명세

+ + + + + + + + + + + + + + +
명세상태설명
{{SpecName('WebVR 1.1', '#vreyeparameters', 'VREyeParameters')}}{{Spec2('WebVR 1.1')}}최초 정의
+ +

브라우저 호환성

+ +

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

+ +

같이 보기

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