Skip to content

Commit 1978da5

Browse files
authored
Docs: Improve Chinese translation. (mrdoob#27032)
* Docs: Improve Chinese translation. * Update several Chinese documentation pages * Update BoxGeometry.html * Update BoxGeometry.html
1 parent 4b48a81 commit 1978da5

File tree

4 files changed

+65
-55
lines changed

4 files changed

+65
-55
lines changed

docs/api/zh/geometries/BoxGeometry.html

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
<h1>立方缓冲几何体([name])</h1>
1313

14-
<p class="desc">[name]是四边形的原始几何类,它通常使用构造函数所提供的“width”、“height”、“depth”参数来创建立方体或者不规则四边形。</p>
14+
<p class="desc">
15+
[name] 是四边形的原始几何类,它通常使用构造函数所提供的 “width”、“height”、“depth” 参数来创建立方体或者不规则四边形。
16+
</p>
1517

1618
<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
1719

@@ -33,36 +35,37 @@ <h1>立方缓冲几何体([name])</h1>
3335

3436
<h2>代码示例</h2>
3537

36-
<code>const geometry = new THREE.BoxGeometry( 1, 1, 1 );
37-
const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
38-
const cube = new THREE.Mesh( geometry, material );
38+
<code>
39+
const geometry = new THREE.BoxGeometry( 1, 1, 1 );
40+
const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
41+
const cube = new THREE.Mesh( geometry, material );
3942
scene.add( cube );
4043
</code>
4144

42-
<h2>构造器</h2>
45+
<h2>构造函数(Constructor)</h2>
4346

4447
<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
4548
<p>
46-
width — X轴上面的宽度,默认值为1<br />
47-
height — Y轴上面的高度,默认值为1<br />
48-
depth — Z轴上面的深度,默认值为1<br />
49-
widthSegments — (可选)宽度的分段数,默认值是1<br />
50-
heightSegments — (可选)高度的分段数,默认值是1<br />
51-
depthSegments — (可选)深度的分段数,默认值是1
49+
width — X 轴上面的宽度,默认值为 `1`<br />
50+
height — Y 轴上面的高度,默认值为 `1`<br />
51+
depth — Z 轴上面的深度,默认值为 `1`<br />
52+
widthSegments — (可选)宽度的分段数,默认值是 `1`<br />
53+
heightSegments — (可选)高度的分段数,默认值是 `1`<br />
54+
depthSegments — (可选)深度的分段数,默认值是 `1`
5255
</p>
5356

54-
<h2>属性</h2>
55-
<p>共有属性请参见其基类[page:BufferGeometry]。</p>
57+
<h2>属性(Properties)</h2>
58+
<p>共有属性请参见其基类 [page:BufferGeometry]。</p>
5659

5760
<h3>[property:Object parameters]</h3>
5861
<p>
5962
一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
6063
</p>
6164

62-
<h2>方法(Methods)</h2>
63-
<p>共有方法请参见其基类[page:BufferGeometry]。</p>
65+
<h2>方法Methods</h2>
66+
<p>共有方法请参见其基类 [page:BufferGeometry]。</p>
6467

65-
<h2>源代码</h2>
68+
<h2>源码(Source)</h2>
6669

6770
<p>
6871
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/zh/geometries/PlaneGeometry.html

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ <h1>平面缓冲几何体([name])</h1>
1313

1414
<p class="desc">一个用于生成平面几何体的类。</p>
1515

16-
<iframe id="scene" src="scenes/geometry-browser.html#PlaneGeometry"></iframe>
16+
<iframe
17+
id="scene"
18+
src="scenes/geometry-browser.html#PlaneGeometry"
19+
></iframe>
1720

1821
<script>
1922

@@ -30,37 +33,39 @@ <h1>平面缓冲几何体([name])</h1>
3033
}
3134

3235
</script>
33-
3436
<h2>代码示例</h2>
3537

36-
<code>const geometry = new THREE.PlaneGeometry( 1, 1 );
37-
const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
38-
const plane = new THREE.Mesh( geometry, material );
39-
scene.add( plane );
38+
<code>
39+
const geometry = new THREE.PlaneGeometry( 1, 1 );
40+
const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
41+
const plane = new THREE.Mesh( geometry, material );
42+
scene.add( plane );
4043
</code>
4144

42-
<h2>构造器</h2>
45+
<h2>构造函数(Constructor)</h2>
4346

44-
<h3>[name]([param:Float width], [param:Float height], [param:Integer widthSegments], [param:Integer heightSegments])</h3>
47+
<h3>
48+
[name]([param:Float width], [param:Float height], [param:Integer widthSegments], [param:Integer heightSegments])
49+
</h3>
4550
<p>
46-
width — 平面沿着X轴的宽度。默认值是1<br />
47-
height — 平面沿着Y轴的高度。默认值是1<br />
48-
widthSegments — (可选)平面的宽度分段数,默认值是1<br />
49-
heightSegments — (可选)平面的高度分段数,默认值是1
51+
width — 平面沿着 X 轴的宽度。默认值是 `1`<br />
52+
height — 平面沿着 Y 轴的高度。默认值是 `1`<br />
53+
widthSegments — (可选)平面的宽度分段数,默认值是 `1`<br />
54+
heightSegments — (可选)平面的高度分段数,默认值是 `1`
5055
</p>
5156

52-
<h2>属性</h2>
53-
<p>共有属性请参见其基类[page:BufferGeometry]。</p>
57+
<h2>属性(Properties)</h2>
58+
<p>共有属性请参见其基类 [page:BufferGeometry]。</p>
5459

55-
<h3>.parameters</h3>
60+
<h3>[property:Object parameters]</h3>
5661
<p>
5762
一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
5863
</p>
5964

60-
<h2>方法(Methods)</h2>
65+
<h2>方法Methods</h2>
6166
<p>共有方法请参见其基类[page:BufferGeometry]。</p>
6267

63-
<h2>源代码</h2>
68+
<h2>源码(Source)</h2>
6469

6570
<p>
6671
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/zh/helpers/AxesHelper.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,16 @@ <h2>例子</h2>
2929
[example:webgl_loader_nrrd WebGL / loader / nrrd]
3030
</p>
3131

32-
<h2>构造函数</h2>
33-
34-
32+
<h2>构造函数(Constructor)</h2>
3533
<h3>[name]( [param:Number size] )</h3>
3634
<p>
37-
[page:Number size] -- (可选的) 表示代表轴的线段长度. 默认为 *1*.
35+
[page:Number size] -- (可选的) 表示代表轴的线段长度. 默认为 `1`.
3836
</p>
3937

40-
<h2>属性</h2>
38+
<h2>属性(Properties)</h2>
4139
<p>请到基类 [page:LineSegments] 页面查看公共属性.</p>
4240

43-
<h2>方法</h2>
41+
<h2>方法(Methods)</h2>
4442
<p>请到基类 [page:LineSegments] 页面查看公共方法.</p>
4543

4644
<h3>
@@ -55,8 +53,7 @@ <h3>[method:undefined dispose]()</h3>
5553
释放此实例分配的GPU相关资源。每当应用程序中不再使用此实例时,请调用此方法。
5654
</p>
5755

58-
<h2>源码</h2>
59-
56+
<h2>源码(Source)</h2>
6057
<p>
6158
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
6259
</p>

docs/manual/zh/introduction/WebGL-compatibility-check.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,28 @@
99
<body>
1010
<h1>WebGL兼容性检查([name])</h1>
1111
<p>
12-
虽然这个问题现在已经变得越来不明显,但不可否定的是,某些设备以及浏览器直到现在仍然不支持WebGL。<br>以下的方法可以帮助你检测当前用户所使用的环境是否支持WebGL,如果不支持,将会向用户提示一条信息。
12+
虽然这个问题现在已经变得越来不明显,但不可否定的是,某些设备以及浏览器直到现在仍然不支持WebGL。
13+
<br>以下的方法可以帮助你检测当前用户所使用的环境是否支持WebGL,如果不支持,将会向用户提示一条信息。
1314
</p>
14-
1515
<p>
1616
请将[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/capabilities/WebGL.js]引入到你的文件,并在尝试开始渲染之前先运行该文件。
17-
</p>
18-
19-
<code>
20-
if (WebGL.isWebGLAvailable()) {
21-
// Initiate function or other initializations here
22-
animate();
23-
} else {
24-
const warning = WebGL.getWebGLErrorMessage();
25-
document.getElementById('container').appendChild(warning);
26-
}
27-
</code>
28-
17+
导入 WebGL 兼容检测模块,并在尝试渲染任何内容之前运行以下程序。
18+
</p>
2919

20+
<code>
21+
import WebGL from 'three/addons/capabilities/WebGL.js';
22+
23+
if ( WebGL.isWebGLAvailable() ) {
24+
25+
// Initiate function or other initializations here
26+
animate();
27+
28+
} else {
29+
30+
const warning = WebGL.getWebGLErrorMessage();
31+
document.getElementById( 'container' ).appendChild( warning );
32+
33+
}
34+
</code>
3035
</body>
3136
</html>

0 commit comments

Comments
 (0)