Skip to content

Commit 4e7dbbd

Browse files
authored
Merge pull request #17165 from gogoend/zh_doc
Docs: Sync the Zh doc with En doc, and fix some expressions and grammars.
2 parents 8efec88 + 17e7106 commit 4e7dbbd

File tree

139 files changed

+499
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+499
-388
lines changed

docs/api/en/cameras/OrthographicCamera.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h3>[method:null updateProjectionMatrix]()</h3>
130130
Updates the camera projection matrix. Must be called after any change of parameters.
131131
</p>
132132

133-
<h3>[method:Object toJSON](param:object meta])</h3>
133+
<h3>[method:Object toJSON]([param:object meta])</h3>
134134
<p>
135135
meta -- object containing metadata such as textures or images in objects' descendants.<br />
136136
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].

docs/api/en/cameras/PerspectiveCamera.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h3>[method:null updateProjectionMatrix]()</h3>
190190
Updates the camera projection matrix. Must be called after any change of parameters.
191191
</p>
192192

193-
<h3>[method:Object toJSON](param:object meta])</h3>
193+
<h3>[method:Object toJSON]([param:object meta])</h3>
194194
<p>
195195
meta -- object containing metadata such as textures or images in objects' descendants.<br />
196196
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].

docs/api/zh/cameras/ArrayCamera.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1>摄像机阵列([name])</h1>
1515
<p class="desc">
1616

1717
[name] 用于更加高效地使用一组已经预定义的摄像机来渲染一个场景。这将能够更好地提升VR场景的渲染性能。<br />
18-
一个 [name] 的实例中总是包含着一组子摄像机,应当为每一个子摄像机定义*viewport*(边界)这个属性,这一属性决定了由该子摄像机所渲染的视口区域的大小。
18+
一个 [name] 的实例中总是包含着一组子摄像机,应当为每一个子摄像机定义*viewport*(视口)这个属性,这一属性决定了由该子摄像机所渲染的视口区域的大小。
1919
</p>
2020

2121
<h2>示例</h2>
@@ -31,15 +31,15 @@ <h3>[name]( [param:Array array] )</h3>
3131

3232

3333
<h2>属性</h2>
34-
<p>请参阅基类[page:PerspectiveCamera]的公共属性</p>
34+
<p>共有属性请参见其基类[page:PerspectiveCamera]。</p>
3535

3636
<h3>[property:Array cameras]</h3>
3737
<p>
3838
摄像机数组。
3939
</p>
4040

4141
<h2>方法</h2>
42-
<p>请参阅基类[page:PerspectiveCamera]的公共方法</p>
42+
<p>共有方法请参见其基类[page:PerspectiveCamera]。</p>
4343

4444
<h2>源码</h2>
4545

docs/api/zh/cameras/Camera.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h3>[name]()</h3>
3131

3232
<h2>属性</h2>
3333

34-
<p>请参阅其基类[page:Object3D]来查看共有属性。</p>
34+
<p>共有属性请参见其基类[page:Object3D]</p>
3535

3636
<h3>[property:Boolean isCamera]</h3>
3737
<p>
@@ -64,7 +64,7 @@ <h3>[property:Matrix4 projectionMatrixInverse]</h3>
6464

6565

6666
<h2>方法</h2>
67-
<p>请参阅其基类[page:Object3D]来查看其共有方法</p>
67+
<p>共有方法请参见其基类[page:Object3D]。</p>
6868

6969
<h3>[method:Camera clone]( )</h3>
7070
<p>

docs/api/zh/cameras/CubeCamera.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h2>示例</h2>
2626
scene.add( cubeCamera );
2727

2828
// Create car
29-
var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget } );
29+
var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget.texture } );
3030
var car = new Mesh( carGeometry, chromeMaterial );
3131
scene.add( car );
3232

@@ -60,7 +60,7 @@ <h3>[name]( [param:Number near], [param:Number far], [param:Number cubeResolutio
6060

6161

6262
<h2>属性</h2>
63-
<p>请参阅其基类[page:Object3D]来查看共有属性</p>
63+
<p>共有属性请参见其基类[page:Object3D]。</p>
6464

6565
<h3>[property:WebGLRenderTargetCube renderTarget]</h3>
6666
<p>
@@ -69,7 +69,7 @@ <h3>[property:WebGLRenderTargetCube renderTarget]</h3>
6969
</p>
7070

7171
<h2>方法</h2>
72-
<p>请参阅其基类[page:Object3D]来查看其共有方法</p>
72+
<p>共有方法请参见其基类[page:Object3D]。</p>
7373

7474

7575

docs/api/zh/cameras/OrthographicCamera.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h3>[name]( [param:Number left], [param:Number right], [param:Number top], [para
6363

6464
<h2>属性</h2>
6565
<p>
66-
请参阅其基类[page:Camera]来查看其共有属性
66+
共有属性请参见其基类[page:Camera]。
6767
<br>
6868
请注意,在大多数属性发生改变之后,你将需要调用[page:OrthographicCamera.updateProjectionMatrix .updateProjectionMatrix]来使得这些改变生效。
6969
</p>
@@ -111,7 +111,7 @@ <h3>[property:number zoom]</h3>
111111
获取或者设置摄像机的缩放倍数,其默认值为*1*。</p>
112112

113113
<h2>方法</h2>
114-
<p>请参阅其基类[page:Camera]来查看其共有方法</p>
114+
<p>共有方法请参见其基类[page:Camera]。</p>
115115

116116
<h3>[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )</h3>
117117
<p>
@@ -138,9 +138,10 @@ <h3>[method:null updateProjectionMatrix]()</h3>
138138

139139
</p>
140140

141-
<h3>[method:JSON toJSON]()</h3>
141+
<h3>[method:Object toJSON]([param:object meta])</h3>
142142
<p>
143-
使用JSON格式来返回摄像机数据。
143+
meta -- 包含有元数据的对象,例如对象后代中的纹理或图像<br />
144+
将摄像机转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
144145
</p>
145146

146147

docs/api/zh/cameras/PerspectiveCamera.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h3>[name]( [param:Number fov], [param:Number aspect], [param:Number near], [par
4949

5050
<h2>属性</h2>
5151
<p>
52-
请参阅其基类 [page:Camera] 来查看共有属性<br>
52+
共有属性请参见其基类 [page:Camera] 。<br>
5353
请注意,在大多数属性发生改变之后,你将需要调用[page:PerspectiveCamera.updateProjectionMatrix .updateProjectionMatrix]来使得这些改变生效。
5454
</p>
5555

@@ -107,7 +107,7 @@ <h3>[property:number zoom]</h3>
107107

108108

109109
<h2>方法</h2>
110-
<p>请参阅其基类[page:Camera]来查看共有属性</p>
110+
<p>共有方法请参见其基类[page:Camera]。</p>
111111

112112
<h3>[method:null clearViewOffset]()</h3>
113113
<p>清除任何由[page:PerspectiveCamera.setViewOffset .setViewOffset]设置的偏移量。</p>
@@ -184,16 +184,14 @@ <h3>[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeigh
184184

185185
<h3>[method:null updateProjectionMatrix]()</h3>
186186
<p>
187-
188187
更新摄像机投影矩阵。在任何参数被改变以后必须被调用。
189-
190188
</p>
191189

192-
<h3>[method:JSON toJSON]()</h3>
190+
<h3>[method:Object toJSON]([param:object meta])</h3>
193191
<p>
194-
195-
使用JSON格式来返回摄像机数据
196-
</p>
192+
meta -- 包含有元数据的对象,例如对象后代中的纹理或图像<br />
193+
将摄像机转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)
194+
</p>
197195

198196
<h2>源代码</h2>
199197

docs/api/zh/constants/Materials.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,51 @@ <h2>纹理结合操作</h2>
9494
[page:Constant MixOperation] 使用反射率来混和两种颜色。uses reflectivity to blend between the two colors.<br />
9595
[page:Constant AddOperation] 用于对两种颜色进行相加。</p>
9696

97+
<h2>Stencil Functions</h2>
98+
<code>
99+
THREE.NeverStencilFunc
100+
THREE.LessStencilFunc
101+
THREE.EqualStencilFunc
102+
THREE.LessEqualStencilFunc
103+
THREE.GreaterStencilFunc
104+
THREE.NotEqualStencilFunc
105+
THREE.GreaterEqualStencilFunc
106+
THREE.AlwaysStencilFunc
107+
</code>
108+
<p>
109+
Which stencil function the material uses to determine whether or not to perform a stencil operation.<br />
110+
[page:Materials NeverStencilFunc] will never return true.<br />
111+
[page:Materials LessStencilFunc] will return true if the stencil reference value is less than the current stencil value.<br />
112+
[page:Materials EqualStencilFunc] will return true if the stencil reference value is equal to the current stencil value.<br />
113+
[page:Materials LessEqualStencilFunc] will return true if the stencil reference value is less than or equal to the current stencil value.<br />
114+
[page:Materials GreaterStencilFunc] will return true if the stencil reference value is greater than the current stencil value.<br />
115+
[page:Materials NotEqualStencilFunc] will return true if the stencil reference value is not equal to the current stencil value.<br />
116+
[page:Materials GreaterEqualStencilFunc] will return true if the stencil reference value is greater than or equal to the current stencil value.<br />
117+
[page:Materials AlwaysStencilFunc] will always return true.<br />
118+
</p>
119+
120+
<h2>Stencil Operations</h2>
121+
<code>
122+
THREE.ZeroStencilOp
123+
THREE.KeepStencilOp
124+
THREE.ReplaceStencilOp
125+
THREE.IncrementStencilOp
126+
THREE.DecrementStencilOp
127+
THREE.IncrementWrapStencilOp
128+
THREE.DecrementWrapStencilOp
129+
THREE.InvertStencilOp
130+
</code>
131+
<p>
132+
Which stencil operation the material will perform on the stencil buffer pixel if the provided stencil function passes.<br />
133+
[page:Materials ZeroStencilOp] will set the stencil value to 0.<br />
134+
[page:Materials KeepStencilOp] will not change the current stencil value.<br />
135+
[page:Materials ReplaceStencilOp] will replace the stencil value with the specified stencil reference value.<br />
136+
[page:Materials IncrementStencilOp] will increment the current stencil value by 1.<br />
137+
[page:Materials DecrementStencilOp] will decrement the current stencil value by 1.<br />
138+
[page:Materials IncrementWrapStencilOp] will increment the current stencil value by 1. If the value increments past 255 it will be set to 0.<br />
139+
[page:Materials DecrementWrapStencilOp] will increment the current stencil value by 1. If the value decrements below 0 it will be set to 255.<br />
140+
[page:Materials InvertStencilOp] will perform a bitwise iversion of the current stencil value.<br />
141+
</p>
97142

98143
<h2>源代码</h2>
99144

docs/api/zh/constants/Textures.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,32 @@ <h2>缩小滤镜
8484
Minification Filters</h2>
8585
<code>
8686
THREE.NearestFilter
87-
THREE.NearestMipMapNearestFilter
88-
THREE.NearestMipMapLinearFilter
87+
THREE.NearestMipmapNearestFilter
88+
THREE.NearestMipmapLinearFilter
8989
THREE.LinearFilter
90-
THREE.LinearMipMapNearestFilter
91-
THREE.LinearMipMapLinearFilter
92-
</code>
90+
THREE.LinearMipmapNearestFilter
91+
THREE.LinearMipmapLinearFilter
92+
</code>
9393

9494
<p>
9595
这些常量用于纹理的[page:Texture.minFilter minFilter]属性,它们定义了当被纹理化的像素映射到大于1纹理元素(texel)的区域时,将要使用的纹理缩小函数。<br /><br />
9696

9797
除了[page:constant NearestFilter] 和 [page:constant LinearFilter],
9898
下面的四个函数也可以用于缩小:<br /><br />
9999

100-
[page:constant NearestMipMapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
100+
[page:constant NearestMipmapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
101101
NearestFilter](最靠近像素中心的纹理元素)为标准来生成纹理值。
102102
<br /><br />
103103

104-
[page:constant NearestMipMapLinearFilter]选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
104+
[page:constant NearestMipmapLinearFilter]选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
105105
NearestFilter]为标准来从每个mipmap中生成纹理值。最终的纹理值是这两个值的加权平均值。
106106
<br /><br />
107107

108-
[page:constant LinearMipMapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
108+
[page:constant LinearMipmapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
109109
LinearFilter](最靠近像素中心的四个纹理元素的加权平均值)为标准来生成纹理值。
110110
<br /><br />
111111

112-
[page:constant LinearMipMapLinearFilter]是默认值,它选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
112+
[page:constant LinearMipmapLinearFilter]是默认值,它选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
113113
LinearFilter]为标准来从每个mipmap中生成纹理值。最终的纹理值是这两个值的加权平均值。<br /><br />
114114

115115
请查看示例:[example:webgl_materials_texture_filters materials / texture / filters]。

docs/api/zh/core/Clock.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<h1>[name]</h1>
1212
<p class="desc">
1313
该对象用于跟踪时间。如果[link:https://developer.mozilla.org/en-US/docs/Web/API/Performance/now performance.now]可用,则
14-
Clock 对象通过该方法实现,否则通过歉精准的[link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now]实现
14+
Clock 对象通过该方法实现,否则回落到使用略欠精准的[link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now]来实现
1515
</p>
1616

1717

0 commit comments

Comments
 (0)