Skip to content

Commit 7012eae

Browse files
authored
Merge pull request #15190 from nicholas-yangding/translation-zh
translate math part
2 parents 5360a81 + da040d6 commit 7012eae

File tree

11 files changed

+557
-634
lines changed

11 files changed

+557
-634
lines changed

docs/api/zh/math/Box3.html

Lines changed: 92 additions & 105 deletions
Large diffs are not rendered by default.

docs/api/zh/math/Color.html

Lines changed: 96 additions & 103 deletions
Large diffs are not rendered by default.

docs/api/zh/math/Cylindrical.html

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,25 @@
88
<link type="text/css" rel="stylesheet" href="page.css" />
99
</head>
1010
<body>
11-
<h1>[name]</h1>
11+
<h1>圆柱体[name]</h1>
1212

1313
<p class="desc">
1414
A point's [link:https://en.wikipedia.org/wiki/Cylindrical_coordinate_system cylindrical coordinates].
1515
</p>
1616

1717

18-
<h2>Constructor</h2>
18+
<h2>构造器(Constructor</h2>
1919

2020
<h3>[name]( [param:Float radius], [param:Float theta], [param:Float y] )</h3>
2121
<p>
22-
[page:Float radius] - distance from the origin to a point in the x-z plane.
23-
Default is *1.0*.<br />
24-
[page:Float theta] - counterclockwise angle in the x-z plane measured in radians
25-
from the positive z-axis. Default is *0*.<br />
26-
[page:Float y] - height above the x-z plane. Default is *0*.
22+
[page:Float radius] - 从原点到x-z平面上一点的距离
23+
默认值为 *1.0*.<br />
24+
[page:Float theta] - 在x-z平面内的逆时针角度,以z轴正方向的计算弧度。默认值为0。<br />
25+
[page:Float y] - x-z平面以上的高度 默认值为 *0*.
2726
</p>
2827

2928

30-
<h2>Properties</h2>
29+
<h2>属性(Properties</h2>
3130

3231
<h3>[property:Float radius]</h3>
3332

@@ -40,33 +39,32 @@ <h2>Methods</h2>
4039

4140
<h3>[method:Cylindrical clone]()</h3>
4241
<p>
43-
Returns a new cylindrical with the same [page:.radius radius], [page:.theta theta]
44-
and [page:.y y] properties as this one.
42+
返回一个与当前拥有相同 [page:.radius radius], [page:.theta theta] 和 [page:.y y] 属性的圆柱体。
4543
</p>
4644

4745
<h3>[method:Cylindrical copy]( [param:Cylindrical other] )</h3>
4846
<p>
49-
Copies the values of the passed Cylindrical's [page:.radius radius], [page:.theta theta]
50-
and [page:.y y] properties to this cylindrical.
47+
将传入的圆柱体对象的 [page:.radius radius], [page:.theta theta] 和 [page:.y y] 属性赋给当前对象。
5148
</p>
5249

5350
<h3>[method:Cylindrical set]( [param:Float radius], [param:Float theta], [param:Float y] )</h3>
54-
<p>Sets values of this cylindrical's [page:.radius radius], [page:.theta theta]
55-
and [page:.y y] properties.</p>
51+
<p>设置该对象的 [page:.radius radius], [page:.theta theta]
52+
[page:.y y] 属性。</p>
5653

5754
<h3>[method:Cylindrical setFromVector3]( [param:Vector3 vec3] )</h3>
5855
<p>
59-
Sets values of this cylindrical's [page:.radius radius], [page:.theta theta]
60-
and [page:.y y] properties from the [page:Vector3 Vector3].
56+
从 [page:Vector3 Vector3] 中取x,y,z,并调用setFromCartesianCoords来设置圆柱体的
57+
[page:.radius radius]、[page:.theta theta] 和 [page:.y y] 的属性值。
58+
6159
</p>
6260

6361
<h3>[method:Cylindrical setFromCartesianCoords]( [param:Float x], [param:Float y], [param:Float z] )</h3>
6462
<p>
65-
Sets values of this cylindrical's [page:.radius radius], [page:.theta theta]
66-
and [page:.y y] properties from Cartesian coordinates.
63+
使用笛卡尔坐标来设置该圆柱体的 [page:.radius radius], [page:.theta theta]
64+
and [page:.y y] 属性值。
6765
</p>
6866

69-
<h2>Source</h2>
67+
<h2>源码(Source</h2>
7068

7169
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
7270
</body>

docs/api/zh/math/Euler.html

Lines changed: 64 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -11,181 +11,170 @@
1111
<h1>[name]</h1>
1212

1313
<p class="desc">
14-
A class representing [link:http://en.wikipedia.org/wiki/Euler_angles Euler Angles].<br /><br />
15-
16-
Euler angles describe a rotational transformation by rotating an object on its various
17-
axes in specified amounts per axis, and a specified axis order.
14+
表示 [link:http://en.wikipedia.org/wiki/Euler_angles Euler] 的类。<br /><br />
15+
欧拉角描述一个旋转变换,通过指定轴顺序和其各个轴向上的指定旋转角度来旋转一个物体。
1816
</p>
1917

20-
<h2>Example</h2>
18+
<h2>示例(Example</h2>
2119

2220
<code>var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
2321
var b = new THREE.Vector3( 1, 0, 1 );
2422
b.applyEuler(a);
2523
</code>
2624

2725

28-
<h2>Constructor</h2>
26+
<h2>构造器(Constructor</h2>
2927

3028

3129
<h3>[name]( [param:Float x], [param:Float y], [param:Float z], [param:String order] )</h3>
3230
<p>
33-
[page:Float x] - (optional) the angle of the x axis in radians. Default is *0*.<br />
34-
[page:Float y] - (optional) the angle of the y axis in radians. Default is *0*.<br />
35-
[page:Float z] - (optional) the angle of the z axis in radians. Default is *0*.<br />
36-
[page:String order] - (optional) a string representing the order that the rotations are applied,
37-
defaults to 'XYZ' (must be upper case).<br /><br />
31+
[page:Float x] - (optional) 用弧度表示x轴旋转量。 默认值是 *0*。<br />
32+
[page:Float y] - (optional) 用弧度表示y轴旋转量。 默认值是 *0*。<br />
33+
[page:Float z] - (optional) 用弧度表示z轴旋转量。 默认值是 *0*。<br />
34+
[page:String order] - (optional) 表示旋转顺序的字符串,默认为'XYZ'(必须是大写)。<br /><br />
3835

3936
</p>
4037

4138

42-
<h2>Properties</h2>
39+
<h2>属性(Properties</h2>
4340

4441
<h3>[property:Boolean isEuler]</h3>
4542
<p>
46-
Used to check whether this or derived classes are Eulers. Default is *true*.<br /><br />
47-
48-
You should not change this, as it used internally for optimisation.
43+
用于判定此对象或者此类的派生对象是否是欧拉角。默认值为 *true*<br /><br />
44+
45+
不应该改变该值,因为它在内部用于优化。
4946
</p>
5047

5148
<h3>[property:String order]</h3>
5249
<p>
53-
The order in which to apply rotations. Default is 'XYZ', which means that the object will first be
54-
rotated around its X axis, then its Y axis and finally its Z axis. Other possibilities are:
55-
'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. These must be in upper case.<br /><br />
50+
order值应用于旋转顺序。默认值为 'XYZ',这意味着对象将首先是
51+
绕X轴旋转,然后是Y轴,最后是Z轴。其他可能性包括:
52+
'YZX', 'ZXY', 'XZY', 'YXZ'和'ZYX'。这些必须是大写字母。<br /><br />
53+
Three.js 使用<em>intrinsic</em> Tait-Bryan angles(Yaw、Pitch、Roll)。
54+
这意味着旋转是在<em>本地</em>坐标系下进行的。也就是说,对于“XYZ”订单,首先是围绕local-X轴旋转(与world- x轴相同),
55+
然后是local-Y(现在可能与world y轴不同),然后是local-Z(可能与world z轴不同)。<br /><br />
5656

57-
Three.js uses <em>intrinsic</em> Tait-Bryan angles. This means that rotations are performed with respect
58-
to the <em>local</em> coordinate system. That is, for order 'XYZ', the rotation is first around the local-X
59-
axis (which is the same as the world-X axis), then around local-Y (which may now be different from the
60-
world Y-axis), then local-Z (which may be different from the world Z-axis).<br /><br />
61-
62-
If the order is changed, [page:.onChangeCallback onChangeCallback] will be called.
57+
如果order值被改变,[page:.onChangeCallback onChangeCallback] 会被调用。
6358
</p>
6459

6560
<h3>[property:Float x]</h3>
6661
<p>
67-
The current value of the x component.<br /><br />
62+
当前x分量的值。<br /><br />
6863

69-
If this is changed, [page:.onChangeCallback onChangeCallback] will be called.
64+
如果这个值发生变化,[page:.onChangeCallback onChangeCallback] 会被调用。
7065
</p>
7166

7267
<h3>[property:Float y]</h3>
7368
<p>
74-
The current value of the y component.<br /><br />
69+
当前y分量的值。<br /><br />
7570

76-
If this is changed, [page:.onChangeCallback onChangeCallback] will be called.
71+
如果这个值发生变化,[page:.onChangeCallback onChangeCallback] 会被调用。
7772
</p>
7873

7974
<h3>[property:Float z]</h3>
8075
<p>
81-
The current value of the z component.<br /><br />
76+
当前z分量的值。<br /><br />
8277

83-
If this is changed, [page:.onChangeCallback onChangeCallback] will be called.
78+
如果这个值发生变化,[page:.onChangeCallback onChangeCallback] 会被调用。
8479
</p>
8580

86-
<h2>Methods</h2>
81+
<h2>方法(Methods</h2>
8782

8883
<h3>[method:Euler copy]( [param:Euler euler] )</h3>
89-
<p>Copies value of [page:Euler euler] to this euler.</p>
84+
<p>[page:Euler euler] 的属性拷贝到当前对象。</p>
9085

9186
<h3>[method:Euler clone]()</h3>
92-
<p>Returns a new Euler with the same parameters as this one.</p>
87+
<p>返回一个与当前参数相同的新欧拉角。</p>
9388

9489
<h3>[method:Boolean equals]( [param:Euler euler] )</h3>
95-
<p>Checks for strict equality of this euler and [page:Euler euler].</p>
90+
<p>检查 [page:Euler euler] 是否与当前对象相同。</p>
9691

9792
<h3>[method:Euler fromArray]( [param:Array array] )</h3>
9893
<p>
99-
[page:Array array] of length 3 or 4. The optional 4th argument corresponds to the [page:.order order].<br /><br />
100-
101-
Assigns this euler's [page:.x x] angle to array[0]. <br />
102-
Assigns this euler's [page:.y y] angle to array[1]. <br />
103-
Assigns this euler's [page:.z z] angle to array[2]. <br />
104-
Optionally assigns this euler's [page:.order order] to array[3].
94+
长度为3或4的一个 [page:Array array] 。array[3] 是一个可选的 [page:.order order] 参数。<br /><br />
95+
96+
将欧拉角的x分量设置为 array[0] <br />
97+
将欧拉角的x分量设置为 array[1] <br />
98+
将欧拉角的x分量设置为 array[2] <br />
99+
将array[3]设置给欧拉角的 [page:.order order] 。可选。
105100
</p>
106101

107102
<h3>[method:Euler onChange]( [param:Function onChangeCallback] )</h3>
108103
<p>
109-
[page:Function onChangeCallback] - set the value of the onChangeCallback() function.
104+
[page:Function onChangeCallback] - onChangeCallback() 函数赋值。
110105
</p>
111106

112107
<h3>[method:Euler onChangeCallback]( )</h3>
113108
<p>
114-
By default this is an empty function, however it can be set via [page:.onChange onChange]().<br />
115-
It gets called after changing the [page:.x x], [page:.y y], [page:.z z] or [page:.order order] properties,
116-
and also after calling most setter functions (see those for details).
109+
默认情况下,这个函数为空,但是它可以通过[page:.onChange onChange]()来设置。<br />
110+
在更改 [page:.x x], [page:.y y], [page:.z z] [page:.order order] 属性之后调用它,
111+
在调用大多数setter函数之后也会调用它(详细信息请参阅那些函数)。
117112
</p>
118113

119114
<h3>[method:Euler reorder]( [param:String newOrder] )</h3>
120115
<p>
121-
Resets the euler angle with a new order by creating a quaternion from this euler angle
122-
and then setting this euler angle with the quaternion and the new order. <br /><br />
116+
通过这个欧拉角创建一个四元数,然后用这个四元数和新顺序设置这个欧拉角。 <br /><br />
123117

124-
<em>WARNING</em>: this discards revolution information.
118+
<em>警告</em>: 这将弃用旋转信息。
125119
</p>
126120

127121
<h3>[method:Euler set]( [param:Float x], [param:Float y], [param:Float z], [param:String order] )</h3>
128122
<p>
129-
[page:.x x] - the angle of the x axis in radians.<br />
130-
[page:.y y] - the angle of the y axis in radians.<br />
131-
[page:.z z] - the angle of the z axis in radians.<br />
132-
[page:.order order] - (optional) a string representing the order that the rotations are applied.<br /><br />
123+
[page:.x x] - 用弧度表示x轴旋转量。<br />
124+
[page:.y y] - 用弧度表示y轴旋转量。<br />
125+
[page:.z z] - 用弧度表示z轴旋转量。<br />
126+
[page:.order order] - (optional) 表示旋转顺序的字符串。<br /><br />
133127

134-
Sets the angles of this euler transform and optionally the [page:.order order] and then call [page:.onChangeCallback onChangeCallback]().
128+
设置该欧拉变换的角度和旋转顺序 [page:.order order] ,然后调用 [page:.onChangeCallback onChangeCallback]()
135129
</p>
136130

137131
<h3>[method:Euler setFromRotationMatrix]( [param:Matrix4 m], [param:String order], [param:Boolean update] )</h3>
138132
<p>
139-
[page:Matrix4 m] - a [page:Matrix4] of which the upper 3x3 of matrix is a pure
140-
[link:https://en.wikipedia.org/wiki/Rotation_matrix rotation matrix] (i.e. unscaled).<br />
141-
[page:.order order] - (optional) a string representing the order that the rotations are applied.<br />
142-
[page:Boolean update] - (optional) whether to call [page:.onChangeCallback onChangeCallback]() after applying
143-
the matrix.<br /><br />
133+
[page:Matrix4 m] - [page:Matrix4] 矩阵上面的3x3部分是一个纯旋转矩阵[link:https://en.wikipedia.org/wiki/Rotation_matrix rotation matrix]
134+
(也就是不发生缩放)<br />
135+
[page:.order order] - (可选参数) 表示旋转顺序的字符串。<br />
136+
[page:Boolean update] - (可选参数) 表示设置完变换矩阵后是否调用 [page:.onChangeCallback onChangeCallback]。<br /><br />
144137

145-
Sets the angles of this euler transform from a pure rotation matrix based on the orientation
146-
specified by order.
138+
使用基于 [page:.order order] 顺序的纯旋转矩阵来设置当前欧拉角。
147139
</p>
148140

149141
<h3>[method:Euler setFromQuaternion]( [param:Quaternion q], [param:String order], [param:Boolean update] )</h3>
150142
<p>
151-
[page:Quaternion q] - a normalized quaternion.<br />
152-
[page:.order order] - (optional) a string representing the order that the rotations are applied.<br />
153-
[page:Boolean update] - (optional) whether to call [page:.onChangeCallback onChangeCallback]() after applying
154-
the matrix.<br /><br />
143+
[page:Quaternion q] - 归一化的四元数。<br />
144+
[page:.order order] - (可选参数) 表示旋转顺序的字符串。<br />
145+
[page:Boolean update] - (可选参数) 表示设置完变换矩阵后是否调用 [page:.onChangeCallback onChangeCallback]。<br /><br />
155146

156-
Sets the angles of this euler transform from a normalized quaternion based on the orientation
157-
specified by [page:.order order].
147+
根据 [page:.order order] 指定的方向,使用归一化四元数设置这个欧拉变换的角度。
158148
</p>
159149

160150

161151
<h3>[method:Euler setFromVector3]( [param:Vector3 vector], [param:String order] )</h3>
162152
<p>
163153
[page:Vector3 vector] - [page:Vector3].<br />
164-
[page:.order order] - (optional) a string representing the order that the rotations are applied.<br /><br />
154+
[page:.order order] - (可选参数) 表示旋转顺序的字符串。<br /><br />
165155

166-
Set the [page:.x x], [page:.y y] and [page:.z z], and optionally update the [page:.order order]. [page:.onChangeCallback onChangeCallback]()
167-
is called after these changes are made.
156+
设置 [page:.x x], [page:.y y] and [page:.z z] 并且选择性更新 [page:.order order]
157+
更改完成之后调用 [page:.onChangeCallback onChangeCallback]()。
168158
</p>
169159

170160

171161
<h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
172162
<p>
173-
[page:Array array] - (optional) array to store the euler in.<br />
174-
[page:Integer offset] (optional) offset in the array.<br />
163+
[page:Array array] - (可选参数) 存储欧拉角的数组。<br />
164+
[page:Integer offset] (可选参数) 数组的偏移量。<br />
175165

176-
Returns an array of the form [[page:.x x], [page:.y y], [page:.z z], [page:.order order ]].
166+
返回一个数组:[[page:.x x], [page:.y y], [page:.z z], [page:.order order ]]
177167
</p>
178168

179169
<h3>[method:Vector3 toVector3]( [param:Vector3 optionalResult] )</h3>
180170
<p>
181-
[page:Vector3 optionalResult] — (optional) If specified, the result will be copied into this Vector,
182-
otherwise a new one will be created. <br /><br />
171+
[page:Vector3 optionalResult] — (可选参数) 如果指定了该参数结果将会被复制给该参数,否者会创建一个新的 Vector3 <br /><br />
183172

184-
Returns the Euler's [page:.x x], [page:.y y] and [page:.z z] properties as a [page:Vector3].
173+
以 [page:Vector3] 的形式返回欧拉角的 [page:.x x], [page:.y y] [page:.z z]
185174
</p>
186175

187176

188-
<h2>Source</h2>
177+
<h2>源码(Source</h2>
189178

190179
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
191180
</body>

0 commit comments

Comments
 (0)