Browse Source

Update WebXRManager.html (#25794)

Update the Chinese translation of WebXRManager's documentation.
幽离 2 years ago
parent
commit
cef5a13843
1 changed files with 45 additions and 46 deletions
  1. 45 46
      docs/api/zh/renderers/webxr/WebXRManager.html

+ 45 - 46
docs/api/zh/renderers/webxr/WebXRManager.html

@@ -11,129 +11,128 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-
-			This class represents an abstraction of the WebXR Device API and is internally used by [page:WebGLRenderer].
-			[name] also provides a public interface that allows users to enable/disable XR and perform XR related tasks like
-			for instance retrieving controllers.
+			此类表示WebXR设备API的抽象,并由[page:WebGLRenderer]在内部使用。
+			[name]还提供了一个公共接口,允许用户启用/禁用XR并执行XR相关任务,例如检索控制器。
 		</p>
 
 		<h2>Properties</h2>
 
 		<h3>[property:Boolean cameraAutoUpdate]</h3>
 		<p>
-		Whether the manager's XR camera should be automatically updated or not. Default is *true*.
+			manager的XR摄像头是否应自动更新。默认为*true*。
 		</p>
 
 		<h3>[property:Boolean enabled]</h3>
 		<p>
-		This flag notifies the renderer to be ready for XR rendering. Default is *false*. Set it to *true* if you are going
-		to use XR in your app.
+			此标志通知渲染器准备好进行XR渲染。默认为假。
+			如果您要在应用中使用XR,请将其设置为*true*。
 		</p>
 
 		<h3>[property:Boolean isPresenting]</h3>
 		<p>
-		Whether XR presentation is active or not. Default is *false*. This flag is read-only and automatically set by [name].
+			XR演示是否处于活动状态。默认为*false*。该标志是只读的,由[name]自动设置。
 		</p>
 
-		<h2>Methods</h2>
+		<h2>方法(Methods)</h2>
 
 		<h3>[method:ArrayCamera getCamera]()</h3>
 		<p>
-		Returns an instance of [page:ArrayCamera] which represents the XR camera of the active XR session.
-		For each view it holds a separate camera object in its [page:ArrayCamera.cameras cameras] property.
+			返回表示活动XR会话的XR相机的[page:ArrayCamera]实例。
+			对于每个视图,它在其[page:ArrayCamera.cameras cameras]属性中包含一个单独的相机对象。
 		</p>
 		<p>
-		The camera's *fov* is currently not used and does not reflect the fov of the XR camera. If you need the fov on app level,
-		you have to compute in manually from the XR camera's projection matrices.
+			当前未使用相机的*fov*,不反映 XR 相机的 fov。
+			如果您需要应用级别的fov,则必须从XR相机的投影矩阵中手动计算。
 		</p>
 
 		<h3>[method:Group getController]( [param:Integer index] )</h3>
 		<p>
-		[page:Integer index] — The index of the controller. <br /><br />
-
-		Returns a [page:Group] representing the so called *target ray* space of the XR controller.
-		Use this space for visualizing 3D objects that support the user in pointing tasks like UI interaction.
+		[page:Integer index] — 控制器的索引。<br /><br />
+		
+		返回表示XR控制器所谓的*目标光线*空间的[page:Group 组]。使用此空间可视化3D对象,支持用户完成UI交互等指向任务。
 		</p>
 
 		<h3>[method:Group getControllerGrip]( [param:Integer index] )</h3>
 		<p>
-		[page:Integer index] — The index of the controller. <br /><br />
+		[page:Integer index] — 控制器的索引。<br /><br />
+
+		返回一个[page:Group 组],代表所谓的XR控制器的*抓地力*空间。如果用户要握住其他3D对象(如光剑),请使用此空间。
 
-		Returns a [page:Group] representing the so called *grip* space of the XR controller.
-		Use this space if the user is going to hold other 3D objects like a lightsaber.
 		</p>
 
 		<p>
-		Note: If you want to show something in the user's hand AND offer a pointing ray at the same time, you'll want to attached the handheld object to the
-		group returned by [page:.getControllerGrip]()  and the ray to the group returned by [page:.getController](). The idea is to have two different groups
-		in two different coordinate spaces for the same WebXR controller.
+			注意:如果你想显示用户手中的东西并同时提供指向光线,
+			你需要将手持对象附加到[page:.getControllerGrip]()返回的组,
+			并将光线附加到[page:.getController]()返回的组. 
+			这个想法是在同一个WebXR控制器的两个不同坐标空间中有两个不同的组。
 		</p>
 
 		<h3>[method:Group getHand]( [param:Integer index] )</h3>
 		<p>
-		[page:Integer index] — The index of the controller. <br /><br />
+		[page:Integer index] — 控制器的索引。 <br /><br />
 
-		Returns a [page:Group] representing the so called *hand* or *joint* space of the XR controller.
-		Use this space for visualizing the user's hands when no physical controllers are used.
+			返回代表XR控制器所谓的*手或关节*空间的[page:Group 组]。在不使用物理控制器时,使用此空间可视化用户的手。
 		</p>
 
 		<h3>[method:Set getPlanes]()</h3>
 		<p>
-		Returns the set of planes detected by WebXR's plane detection API.
+		返回由 WebXR 的平面检测 API 检测到的平面集。
 		</p>
 
 		<h3>[method:String getReferenceSpace]()</h3>
 		<p>
-		Returns the reference space.
+		返回参考空间。
 		</p>
 
 		<h3>[method:XRSession getSession]()</h3>
 		<p>
-		Returns the *XRSession* object which allows a more fine-grained management of active WebXR sessions on application level.
+		返回*XRSession*对象,它允许在应用程序级别更细粒度地管理活动的WebXR会话。
 		</p>
 
 		<h3>[method:undefined setFramebufferScaleFactor]( [param:Float factor], [param:Boolean limited] )</h3>
 		<p>
-		[page:Float factor] — The framebuffer scale factor to set.<br />
-		[page:Boolean limited] — Whether the framebuffer scale factor should be reduced to the native limit if the value ends up being higher than the device's capabilities. Default is `false`.<br /><br />
+		[page:Float factor] — 要设置的帧缓冲区比例因子。<br />
+		[page:Boolean limited] — 如果值最终高于设备的能力,是否应将帧缓冲区比例因子减小到本机限制。默认为`false`。<br /><br />
 
-		Specifies the scaling factor to use when determining the size of the framebuffer when rendering to a XR device.
-		The value is relative to the default XR device display resolution. Default is *1*. A value of *0.5* would specify
-		a framebuffer with 50% of the display's native resolution.
+			指定在渲染到XR设备时确定帧缓冲区大小时要使用的比例因子。
+			该值是相对于默认XR设备显示分辨率的。默认为*1*。值0.5将指定具有显示器原始分辨率50%的帧缓冲区。
+			
 		</p>
 
 		<p>
-		Note: It is not possible to change the framebuffer scale factor while presenting XR content.
+		注意:在呈现XR内容时无法更改帧缓冲区比例因子。
 		</p>
 
 		<h3>[method:undefined setReferenceSpace]( [param:XRReferenceSpace referenceSpace] )</h3>
 		<p>
-		[page:XRReferenceSpace referenceSpace] — A custom reference space.<br /><br />
+		[page:XRReferenceSpace referenceSpace] — 自定义参考空间。<br /><br />
 
-		Can be used to configure a custom reference space which overwrites the default reference space.
+		可用于配置覆盖默认参考空间的自定义参考空间。
 		</p>
 
 		<h3>[method:undefined setReferenceSpaceType]( [param:String referenceSpaceType] )</h3>
 		<p>
-		[page:String referenceSpaceType] — The reference space type to set.<br /><br />
+		[page:String referenceSpaceType] — 要设置的参考空间类型。<br /><br />
 
-		Can be used to configure a spatial relationship with the user's physical environment. Depending on how the user moves in 3D space, setting an
-		appropriate reference space can improve tracking. Default is *local-floor*.
-		Please check out the [link:https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType MDN] for possible values and their use cases.
+		可用于配置与用户物理环境的空间关系。
+		根据用户在3D空间中的移动方式,设置适当的参考空间可以改进跟踪。
+		默认为*本层空间*。
+		请查看[link:https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType MDN]以了解可能的值及其用例。
 		</p>
 
 		<h3>[method:undefined updateCamera]( [param:PerspectiveCamera camera] )</h3>
 		<p>
-		Updates the state of the XR camera. Use this method on app level if you set [page:.cameraAutoUpdate] to *false*.
-		The method requires the non-XR camera of the scene as a parameter. The passed in camera's transformation is automatically
-		adjusted to the position of the XR camera when calling this method.
+			更新 XR 相机的状态。
+			如果您将[page:.cameraAutoUpdate]设置为*false*,请在应用级别使用此方法。
+			该方法需要场景的非 XR 相机作为参数。
+			调用此方法时,传入的相机变换会自动调整到 XR 相机的位置。
 		</p>
 
 		<p>
-		Note: It is not possible to change the reference space type while presenting XR content.
+		注意:在呈现 XR 内容时无法更改参考空间类型。
 		</p>
 
-		<h2>Source</h2>
+		<h2>源代码(Source)</h2>
 
 		<p>
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]