瀏覽代碼

[Doc/zh]: Added some Chinese translations (#22328)

* Update Box3.html

* Update Box2.html

* Update Box3.html

* Update Box3.html

* Update Box3.html

* Update Box3.html

* Update Box3.html

* Update Plane.html

* Update Plane.html

* Update Plane.html

* Update Plane.html

* Update Plane.html

* Update Sphere.html

* Update Sphere.html

* Update Sphere.html

* Update Spherical.html

* Update Spherical.html

* Update Spherical.html

* Update Triangle.html

* Update Frustum.html

* Update Frustum.html

* Update Frustum.html

* Update Color.html

* Update MathUtils.html

* Update Color.html

* Update Color.html

* Update MathUtils.html

* Update Plane.html

* Update Box3.html

* Update Box3.html

* Update MathUtils.html
puxiao 4 年之前
父節點
當前提交
374410aa84

+ 1 - 1
docs/api/zh/math/Box2.html

@@ -154,7 +154,7 @@
 			[page:Vector2 max]  - (必须) 表示该盒子的上边界(x, y)。 <br /><br />
 
 			设置这个盒子的上下(x, y)的界限。<br>
-			Please note that this method only copies the values from the given objects.
+			请注意,此方法仅复制给定对象的值。
 		</p>
 
 		<h3>[method:Box2 setFromCenterAndSize]( [param:Vector2 center], [param:Vector2 size] )</h3>

+ 11 - 11
docs/api/zh/math/Box3.html

@@ -52,7 +52,7 @@
 		<h3>[property:Vector3 min]</h3>
 		<p>
 			[page:Vector3] 表示包围盒的下边界。<br />
-			默认值是( - Infinity, - Infinity, - Infinity )。
+			默认值是( + Infinity, + Infinity, + Infinity )。
 		</p>
 
 		<h3>[property:Vector3 max]</h3>
@@ -77,7 +77,7 @@
 		[page:Vector3 point] - 需要做clamp 的坐标 [page:Vector3]。 <br>
 		[page:Vector3 target] — 结果将会被拷贝到这个对象中<br /><br />
 
-		这个点[page:Vector3 point] [link:https://en.wikipedia.org/wiki/Clamping_(graphics) Clamps](处于范围内) 处于包围盒边界范围内。<br />
+		使这个点[page:Vector3 point] [link:https://en.wikipedia.org/wiki/Clamping_(graphics) Clamps](处于范围内) 处于包围盒边界范围内。<br />
 		</p>
 
 		<h3>[method:Box3 clone]()</h3>
@@ -123,7 +123,7 @@
 		[page:Object3D object] - 包裹在包围盒中的3d对象 [page:Object3D]。<br /><br />
 
 		扩展此包围盒的边界,使得对象及其子对象在包围盒内,包括对象和子对象的世界坐标的变换。
-		The function may result in a larger box than strictly necessary.
+		该方法可能会导致一个比严格需要的更大的框。
 
 		</p>
 
@@ -171,7 +171,7 @@
 		[page:Vector3 point] - [page:Vector3].<br/>
 		[page:Vector3 target] — 如果指定了target ,结果将会被拷贝到target。<br /><br />
 
-		返回一个点为这个盒子的宽度和高度的比例。
+		返回一个点为这个盒子的宽度、高度和深度的比例。
 		</p>
 
 		<h3>[method:Vector3 getSize]( [param:Vector3 target] )</h3>
@@ -186,7 +186,7 @@
 		[page:Box3 box] - 与包围盒的交集<br /><br />
 
 		计算此包围盒和 [page:Box3 box] 的交集,将此框的上界设置为两个框的max的较小部分,
-		将此包围盒的下界设置为两个包围盒的min的较大部分。If there's no overlap, makes this box empty.
+		将此包围盒的下界设置为两个包围盒的min的较大部分。如果两个包围盒不相交,则清空此包围盒。
 		</p>
 
 		<h3>[method:Boolean intersectsBox]( [param:Box3 box] )</h3>
@@ -232,24 +232,24 @@
 		[page:Vector3 max] - [page:Vector3] 表示上边界每个纬度(x,y,z)的值。<br /><br />
 
 		设置包围盒上下边界每个纬度(x,y,z)的值。<br>
-		Please note that this method only copies the values from the given objects.
+		请注意,此方法仅复制给定对象的值。
 		</p>
 
-		<h3>[method:this setFromArray]( [param:Array array] ) [param:Box3 this]</h3>
+		<h3>[method:this setFromArray]( [param:Array array] )</h3>
 		<p>
-		array -- 数组当中的所有的点都将被包围盒包裹。<br /><br />
+		array - 数组当中的所有的点都将被包围盒包裹。<br /><br />
 
 		设置包围盒的上下边界使得数组 *array* 中的所有点的点都被包含在内。
 		</p>
 
-		<h3>[method:this setFromBufferAttribute]( [param:BufferAttribute attribute] ) [param:Box3 this]</h3>
+		<h3>[method:this setFromBufferAttribute]( [param:BufferAttribute attribute] )</h3>
 		<p>
 		[page:BufferAttribute attribute] - 位置的缓冲数据,包含在返回的包围盒内。<br /><br />
 
 		设置此包围盒的上边界和下边界,以包含 [page:BufferAttribute attribute] 中的所有位置数据。
 		</p>
 
-		<h3>[method:this setFromCenterAndSize]( [param:Vector3 center], [param:Vector3 size] ) [param:Box3 this]</h3>
+		<h3>[method:this setFromCenterAndSize]( [param:Vector3 center], [param:Vector3 size] )</h3>
 		<p>
 		[page:Vector3 center], - 包围盒所要设置的中心位置。 <br>
 		[page:Vector3 size] - 包围盒所要设置的x、y和z尺寸(宽/高/长)。<br /><br />
@@ -262,7 +262,7 @@
 		[page:Object3D object] - 用来计算包围盒的3D对象 [page:Object3D]。<br /><br />
 
 		计算和世界轴对齐的一个对象 [page:Object3D] (含其子对象)的包围盒,计算对象和子对象的世界坐标变换。
-		The function may result in a larger box than strictly necessary.
+		该方法可能会导致一个比严格需要的更大的框。
 
 		</p>
 

+ 7 - 7
docs/api/zh/math/Color.html

@@ -178,10 +178,10 @@
 
 		<h3>[method:this fromBufferAttribute]( [param:BufferAttribute attribute], [param:Integer index] )</h3>
 		<p>
-		[page:BufferAttribute attribute] - the source attribute.<br />
-		[page:Integer index] - index in the attribute.<br /><br />
+		[page:BufferAttribute attribute] - 数据源<br />
+		[page:Integer index] - 索引值<br /><br />
 
-		Sets this color's components from the [page:BufferAttribute attribute].
+		根据参数 [page:BufferAttribute attribute] 设置该颜色。
 		</p>
 
 		<h3>[method:Integer getHex]()</h3>
@@ -234,7 +234,7 @@
 		</p>
 
 		<h3>[method:Color multiply]( [param:Color color] ) </h3>
-		<p>将此颜色的RGB值乘以给定的[page: color color]的RGB值。</p>
+		<p>将此颜色的RGB值乘以给定的 [page:Color color] 的RGB值。</p>
 
 		<h3>[method:Color multiplyScalar]( [param:Number s] ) </h3>
 		<p>将此颜色的RGB值乘以给定的[page:Number s]的值。</p>
@@ -308,11 +308,11 @@
 
 		<h3>[method:Color setColorName]( [param:String style] ) </h3>
 		<p>
-		[page:String style] — color name ( from [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color names] ).<br /><br />
+		[page:String style] — 颜色名字的英文单词 ( 具体请查阅 [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color names] )<br /><br />
 
-		Sets this color from a color name. Faster than [page:.setStyle] method if you don't need the other CSS-style formats.<br/><br/>
+		通过颜色名字设置该颜色。如果你不使用其他 CSS 颜色样式形式,那么这种方式会略快于 [page:.setStyle] 方法。<br/><br/>
 
-		For convenience, the list of names is exposed in Color.NAMES as a hash: <code>Color.NAMES.aliceblue // returns 0xF0F8FF</code>
+		为了方便使用,颜色名称都可以通过 Color.NAMES 访问,例如:<code>Color.NAMES.aliceblue // returns 0xF0F8FF</code>
 		</p>
 
 		<h3>[method:Color sub]( [param:Color color] ) </h3>

+ 4 - 4
docs/api/zh/math/Frustum.html

@@ -47,7 +47,7 @@
 
 		<h3>[method:Boolean containsPoint]( [param:Vector3 point] )</h3>
 		<p>
-		[page:Vector3 point] - [page:Vector3] to test.<br /><br />
+		[page:Vector3 point] - [page:Vector3] 被检测的点。<br /><br />
 
 		检测该点 [page:Vector3 point] 是否在视锥体内。
 		</p>
@@ -88,13 +88,13 @@
 		<h3>[method:this set]( [param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5] )</h3>
 		<p>
 		从传入的平面设置当前视锥体。没有隐式的顺序。<br>
-		Note that this method only copies the values from the given objects.
+		请注意,此方法仅复制给定对象的值。
 		</p>
 
 		<h3>[method:this setFromProjectionMatrix]( [param:Matrix4 matrix] )</h3>
 		<p>
-		[page:Matrix4 matrix] - Projection [page:Matrix4] used to set the [page:.planes planes]<br /><br />
-		Sets the frustum planes from the projection matrix.
+		[page:Matrix4 matrix] - 投影矩阵 [page:Matrix4] 会被用来设置该视椎体的 [page:.planes planes]<br /><br />
+		根据投影矩阵 matrix 来设置当前视椎体的六个面。
 		</p>
 
 

+ 20 - 22
docs/api/zh/math/MathUtils.html

@@ -42,11 +42,11 @@
 
 		<h3>[method:Float inverseLerp]( [param:Float x], [param:Float y], [param:Float value] )</h3>
 		<p>
-		[page:Float x] - Start point.<br />
-		[page:Float y] - End point.<br />
-		[page:Float value] - A value between start and end.<br><br />
+		[page:Float x] - 起始点<br />
+		[page:Float y] - 终点<br />
+		[page:Float value] - 介于起始点和终点的值<br><br />
 
-		Returns the percentage in the closed interval [0, 1] of the given value between the start and end point.
+		返回参数 value 在起点 x 与终点 y 的闭区间 [0,1] 中的百分比。
 		</p>
 
 		<h3>[method:Float lerp]( [param:Float x], [param:Float y], [param:Float t] )</h3>
@@ -61,13 +61,12 @@
 
 		<h3>[method:Float damp]( [param:Float x], [param:Float y], [param:Float lambda], [param:Float dt] )</h3>
 		<p>
-		[page:Float x] - Current point. <br />
-		[page:Float y] - Target point. <br />
-		[page:Float lambda] - A higher lambda value will make the movement more sudden, and a lower value will make the movement more gradual. <br />
-		[page:Float dt] - Delta time in seconds.<br><br />
+		[page:Float x] - 当前点<br />
+		[page:Float y] - 目标点<br />
+		[page:Float lambda] - 较高的参数 lambda 值会使运动更加突然,而较低的值会使运动更加平缓。<br />
+		[page:Float dt] - 以秒为单位的增量时间<br><br />
 
-		Smoothly interpolate a number from [page:Float x] toward [page:Float y] in a spring-like manner using the [page:Float dt] to maintain frame rate independent movement.
-		For details, see [link:http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ Frame rate independent damping using lerp].
+		使用 [page:Float dt] 以类似弹簧的方式从 [page:Float x] 向 [page:Float y] 平滑地插入一个数字,以保持与帧速率无关的运动。有关详细信息,请参阅 [link:http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ Frame rate independent damping using lerp].
 		</p>
 
 		<h3>[method:Float mapLinear]( [param:Float x], [param:Float a1], [param:Float a2], [param:Float b1], [param:Float b2] )</h3>
@@ -83,10 +82,10 @@
 
 		<h3>[method:Float pingpong]( [param:Float x], [param:Float length] )</h3>
 		<p>
-		[page:Float x] — The value to pingpong.<br />
-		[page:Float length] — The positive value the function will pingpong to. Default is 1.<br /><br />
+		[page:Float x] — pingpong 的值<br />
+		[page:Float length] — 函数将 pingpong 传递到的正值。默认值为 1。<br /><br />
 
-		Returns a value that alternates between 0 and [param:Float length].</p>
+		返回一个介于 0 和 [param:Float length] 之间的值。</p>
 
 		<h3>[method:Integer ceilPowerOfTwo]( [param:Number n] )</h3>
 		<p>返回大于等于 [page:Number n] 的2的最小次幂。</p>
@@ -131,15 +130,14 @@
 
 		<h3>[method:null setQuaternionFromProperEuler]( [param:Quaternion q], [param:Float a], [param:Float b], [param:Float c], [param:String order] )</h3>
 		<p>
-		[page:Quaternion q] - the quaternion to be set<br />
-		[page:Float a] - the rotation applied to the first axis, in radians <br />
-		[page:Float b] - the rotation applied to the second axis, in radians <br />
-		[page:Float c] - the rotation applied to the third axis, in radians <br />
-		[page:String order] - a string specifying the axes order: 'XYX', 'XZX', 'YXY', 'YZY', 'ZXZ', or 'ZYZ'<br /><br />
-
-		Sets quaternion [page:Quaternion q] from the [link:http://en.wikipedia.org/wiki/Euler_angles intrinsic Proper Euler Angles] defined by angles [page:Float a], [page:Float b], and [page:Float c], and order [page:String order].<br />
-
-		Rotations are applied to the axes in the order specified by [page:String order]: rotation by angle [page:Float a] is applied first, then by angle [page:Float b], then by angle [page:Float c]. Angles are in radians.
+		[page:Quaternion q] - 将被设置的的四元数。<br />
+		[page:Float a] - 应用于第一个轴的旋转,以弧度为单位。<br />
+		[page:Float b] - 应用于第二个轴的旋转,以弧度为单位。<br />
+		[page:Float c] - 应用于第三个轴的旋转,以弧度为单位。<br />
+		[page:String order] - 指定轴旋转顺序的字符串:'XYX', 'XZX', 'YXY', 'YZY', 'ZXZ', 或 'ZYZ'<br /><br />
+
+		根据 [page:Float a]、[page:Float b]、[page:Float c]、[page:String order] 组成的欧拉角 [link:http://en.wikipedia.org/wiki/Euler_angles intrinsic Proper Euler Angles] 来设置四元数 [page:Quaternion q]。<br />
+		按照 [page:String order] 指定的轴旋转顺序:先旋转角度 [page:Float a],再旋转角度 [page:Float b],最后旋转角度 [page:Float c]。角度以弧度为单位。
 		</p>
 
 		<h2>Source</h2>

+ 3 - 3
docs/api/zh/math/Plane.html

@@ -122,7 +122,7 @@
 			[page:Vector3 normal] - 单位长度的向量表示平面的法向量。<br />
 			[page:Float constant] - 原点到平面有符号距离。默认值为 *0*。<br /><br />
 
-			设置平面 [page:.normal normal] 的法线和常量 [page:.constant constant] 属性值 by copying the values from the given normal
+			设置平面 [page:.normal normal] 的法线和常量 [page:.constant constant] 属性值。
 		</p>
 
 		<h3>[method:Plane setComponents]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
@@ -144,12 +144,12 @@
 		 根据给定的三个点确定平面。如果三个点共线将会抛出错误。通过右手螺旋规则确定(向量叉乘)法向量 [page:.normal normal]。
 		</p>
 
-		<h3>[method:Plane setFromNormalAndCoplanarPoint]( [param:Vector3 normal], [param:Vector3 point] ) [param:Vector3 this]</h3>
+		<h3>[method:Plane setFromNormalAndCoplanarPoint]( [param:Vector3 normal], [param:Vector3 point] )</h3>
 		<p>
 		[page:Vector3 normal] - 平面单位法向量<br />
 		[page:Vector3 point] - 平面上的点<br /><br />
 
-		通过平面上的一点以及法线确定原点到平面的最短距离(常量)
+		通过参数提供的法线 normal 和 平面上的一个点 point 来设置该平面
 		</p>
 
 		<h3>[method:Plane translate]( [param:Vector3 offset] )</h3>

+ 10 - 11
docs/api/zh/math/Sphere.html

@@ -29,7 +29,7 @@
 		<p>A [page:Vector3]定义了球心的位置,默认值位于(0, 0, 0)。</p>
 
 		<h3>[property:Float radius]</h3>
-		<p>球的半径,默认值为0。</p>
+		<p>球的半径,默认值为-1。</p>
 
 		<h2>方法</h2>
 
@@ -53,7 +53,7 @@
 
 		<h3>[method:Boolean containsPoint]( [param:Vector3 point] )</h3>
 		<p>
-		[page:Vector3 point] - the [page:Vector3] to be checked<br /><br />
+		[page:Vector3 point] - [page:Vector3] 要被检查的点<br /><br />
 
 		检查球体中是否包含所传入的[page:Vector3 point]点,包括球的表面。
 		</p>
@@ -66,24 +66,23 @@
 		<h3>[method:Float distanceToPoint]( [param:Vector3 point] )</h3>
 		<p>
 		返回球的边界到所传入的[page:Vector3 point]点的最近距离。
-		若这个点,则距离将为负值。
+		若这个点位于球内,则距离将为负值。
 		</p>
 
 		<h3>[method:this expandByPoint]( [param:Vector3 point] )</h3>
 		<p>
-		[page:Vector3 point] - [page:Vector3] that should be included in the sphere.<br /><br />
+		[page:Vector3 point] - [page:Vector3] 将被包含在球内的点<br /><br />
 
-		Expands the boundaries of this sphere to include [page:Vector3 point].
+		扩展该球的边界以包含此点 [page:Vector3 point]。
 		</p>
 
 		<h3>[method:Boolean isEmpty]()</h3>
 		<p>
-		检查球是否为空(the radius set to a negative number).
-		Spheres with a radius of 0 contain only their center point and are not considered to be empty.
+		检查球是否为空(球半径为负值)。半径为 0 的球体仅包含其中心点,并不会被视为空。
 		</p>
 
 		<h3>[method:Sphere makeEmpty]()</h3>
-		<p>Makes the sphere empty by setting [page:.center center] to (0, 0, 0) and [page:.radius radius] to -1.</p>
+		<p>将该球修改为空,即中心点 [page:.center center] 为 (0,0,0),半径 [page:.radius radius] 为 -1。</p>
 
 		<h3>[method:Boolean equals]( [param:Sphere sphere] )</h3>
 		<p>
@@ -124,7 +123,7 @@
 			[page:Float radius] - 球的半径。<br /><br />
 
 		设置球的[page:.center center]和[page:.radius radius]属性。<br>
-		Please note that this method only copies the values from the given center.
+		请注意此,方法使用复制的方式来设置中心值。
 		</p>
 
 		<h3>[method:Sphere setFromPoints]( [param:Array points], [param:Vector3 optionalCenter] )</h3>
@@ -143,9 +142,9 @@
 
 		<h3>[method:this union]( [param:Sphere sphere] )</h3>
 		<p>
-		[page:Sphere sphere] - Bounding sphere that will be unioned with this sphere.<br /><br />
+		[page:Sphere sphere] - 将与该球体即将结合的边界球体。<br /><br />
 
-		Expands this sphere to enclose both the original sphere and the given sphere.
+		扩展此球体以包含原始球体和给定球体。
 		</p>
 
 		<h2>源代码</h2>

+ 4 - 4
docs/api/zh/math/Spherical.html

@@ -19,10 +19,10 @@
 		<p>
 		[page:Float radius] - 半径值,或者说从该点到原点的
 		[link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance](欧几里得距离,即直线距离)。默认值为*1.0*。<br />
-		[page:Float phi] - 与 y (up) 轴的极坐标角(以弧度为单位)。 默认值为 *0*。<br />
-		[page:Float theta] - 绕 y (up) 轴的赤道角(以弧度为单位)。 默认值为 *0*。<br /><br />
+		[page:Float phi] - 与 y (up) 轴的极角(以弧度为单位)。 默认值为 *0*。<br />
+		[page:Float theta] - 绕 y (up) 轴的赤道角(方位角)(以弧度为单位)。 默认值为 *0*。<br /><br />
 
-		极点(φ phi)位于正 y 轴和负 y 轴上。赤道(θ theta)从正 z 开始。
+		极角(phi)位于正 y 轴和负 y 轴上。赤道角(方位角)(theta)从正 z 开始。
 		</p>
 
 
@@ -51,7 +51,7 @@
 
 		<h3>[method:Spherical makeSafe]()</h3>
 		<p>
-		将极角 [page:.phi phi] 的值限制在0.000001 和 pi - 0.000001 之间。
+		将极角 [page:.phi phi] 的值限制在0.000001 和 π - 0.000001 之间。
 		</p>
 
 		<h3>[method:Spherical set]( [param:Float radius], [param:Float phi], [param:Float theta] )</h3>

+ 1 - 1
docs/api/zh/math/Triangle.html

@@ -120,7 +120,7 @@
 		<h3>[method:Triangle set]( [param:Vector3 a], [param:Vector3 b], [param:Vector3 c] ) [param:Triangle this]</h3>
 		<p>
 			将三角形的[page:.a a]、[page:.b b]和[page:.c c]属性设置为所传入的[page:Vector3 vector3]。<br>
-			Please note that this method only copies the values from the given objects.
+			请注意,此方法仅复制给定对象的值。
 		</p>
 
 		<h3>[method:Triangle setFromPointsAndIndices]( [param:Array points], [param:Integer i0], [param:Integer i1], [param:Integer i2] ) [param:Triangle this]</h3>