Răsfoiți Sursa

Docs: Improve Chinese translation. (#27032)

* Docs: Improve Chinese translation.

* Update several Chinese documentation pages

* Update BoxGeometry.html

* Update BoxGeometry.html
ReBeX 1 an în urmă
părinte
comite
1978da5500

+ 19 - 16
docs/api/zh/geometries/BoxGeometry.html

@@ -11,7 +11,9 @@
 
 
 		<h1>立方缓冲几何体([name])</h1>
 		<h1>立方缓冲几何体([name])</h1>
 
 
-		<p class="desc">[name]是四边形的原始几何类,它通常使用构造函数所提供的“width”、“height”、“depth”参数来创建立方体或者不规则四边形。</p>
+		<p class="desc">
+			[name] 是四边形的原始几何类,它通常使用构造函数所提供的 “width”、“height”、“depth” 参数来创建立方体或者不规则四边形。
+		</p>
 
 
 		<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
 		<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
 
 
@@ -33,36 +35,37 @@
 
 
 		<h2>代码示例</h2>
 		<h2>代码示例</h2>
 
 
-		<code>const geometry = new THREE.BoxGeometry( 1, 1, 1 );
-		const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
-		const cube = new THREE.Mesh( geometry, material );
+		<code>
+		const geometry = new THREE.BoxGeometry( 1, 1, 1 ); 
+		const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); 
+		const cube = new THREE.Mesh( geometry, material ); 
 		scene.add( cube );
 		scene.add( cube );
 		</code>
 		</code>
 
 
-		<h2>构造</h2>
+		<h2>构造函数(Constructor)</h2>
 
 
 		<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
 		<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
 		<p>
 		<p>
-		width — X轴上面的宽度,默认值为1。<br />
-		height — Y轴上面的高度,默认值为1。<br />
-		depth — Z轴上面的深度,默认值为1。<br />
-		widthSegments — (可选)宽度的分段数,默认值是1。<br />
-		heightSegments — (可选)高度的分段数,默认值是1。<br />
-		depthSegments — (可选)深度的分段数,默认值是1。
+		width — X 轴上面的宽度,默认值为 `1`。<br />
+		height — Y 轴上面的高度,默认值为 `1`。<br />
+		depth — Z 轴上面的深度,默认值为 `1`。<br />
+		widthSegments — (可选)宽度的分段数,默认值是 `1`。<br />
+		heightSegments — (可选)高度的分段数,默认值是 `1`。<br />
+		depthSegments — (可选)深度的分段数,默认值是 `1`
 		</p>
 		</p>
 
 
-		<h2>属性</h2>
-		<p>共有属性请参见其基类[page:BufferGeometry]。</p>
+		<h2>属性(Properties)</h2>
+		<p>共有属性请参见其基类 [page:BufferGeometry]。</p>
 
 
 		<h3>[property:Object parameters]</h3>
 		<h3>[property:Object parameters]</h3>
 		<p>
 		<p>
 			一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
 			一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
 		</p>
 		</p>
 
 
-		<h2>方法(Methods)</h2>
-		<p>共有方法请参见其基类[page:BufferGeometry]。</p>
+		<h2>方法(Methods)</h2>
+		<p>共有方法请参见其基类 [page:BufferGeometry]。</p>
 
 
-		<h2>源码</h2>
+		<h2>源码(Source)</h2>
 
 
 		<p>
 		<p>
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 22 - 17
docs/api/zh/geometries/PlaneGeometry.html

@@ -13,7 +13,10 @@
 
 
 		<p class="desc">一个用于生成平面几何体的类。</p>
 		<p class="desc">一个用于生成平面几何体的类。</p>
 
 
-		<iframe id="scene" src="scenes/geometry-browser.html#PlaneGeometry"></iframe>
+		<iframe
+			id="scene"
+			src="scenes/geometry-browser.html#PlaneGeometry"
+		></iframe>
 
 
 		<script>
 		<script>
 
 
@@ -30,37 +33,39 @@
 		}
 		}
 
 
 		</script>
 		</script>
-
 		<h2>代码示例</h2>
 		<h2>代码示例</h2>
 
 
-		<code>const geometry = new THREE.PlaneGeometry( 1, 1 );
-		const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
-		const plane = new THREE.Mesh( geometry, material );
-		scene.add( plane );
+		<code>
+const geometry = new THREE.PlaneGeometry( 1, 1 );
+const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
+const plane = new THREE.Mesh( geometry, material );
+scene.add( plane );
 		</code>
 		</code>
 
 
-		<h2>构造</h2>
+		<h2>构造函数(Constructor)</h2>
 
 
-		<h3>[name]([param:Float width], [param:Float height], [param:Integer widthSegments], [param:Integer heightSegments])</h3>
+		<h3>
+			[name]([param:Float width], [param:Float height], [param:Integer widthSegments], [param:Integer heightSegments])
+		</h3>
 		<p>
 		<p>
-			width — 平面沿着X轴的宽度。默认值是1。<br />
-			height — 平面沿着Y轴的高度。默认值是1。<br />
-			widthSegments — (可选)平面的宽度分段数,默认值是1。<br />
-			heightSegments — (可选)平面的高度分段数,默认值是1。
+			width — 平面沿着 X 轴的宽度。默认值是 `1`。<br />
+			height — 平面沿着 Y 轴的高度。默认值是 `1`。<br />
+			widthSegments — (可选)平面的宽度分段数,默认值是 `1`。<br />
+			heightSegments — (可选)平面的高度分段数,默认值是 `1`
 		</p>
 		</p>
 
 
-		<h2>属性</h2>
-		<p>共有属性请参见其基类[page:BufferGeometry]。</p>
+		<h2>属性(Properties)</h2>
+		<p>共有属性请参见其基类 [page:BufferGeometry]。</p>
 
 
-		<h3>.parameters</h3>
+		<h3>[property:Object parameters]</h3>
 		<p>
 		<p>
 			一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
 			一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
 		</p>
 		</p>
 
 
-		<h2>方法(Methods)</h2>
+		<h2>方法(Methods)</h2>
 		<p>共有方法请参见其基类[page:BufferGeometry]。</p>
 		<p>共有方法请参见其基类[page:BufferGeometry]。</p>
 
 
-		<h2>源码</h2>
+		<h2>源码(Source)</h2>
 
 
 		<p>
 		<p>
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 5 - 8
docs/api/zh/helpers/AxesHelper.html

@@ -29,18 +29,16 @@
 			[example:webgl_loader_nrrd WebGL / loader / nrrd]
 			[example:webgl_loader_nrrd WebGL / loader / nrrd]
 		</p>
 		</p>
 
 
-		<h2>构造函数</h2>
-
-
+		<h2>构造函数(Constructor)</h2>
 		<h3>[name]( [param:Number size] )</h3>
 		<h3>[name]( [param:Number size] )</h3>
 		<p>
 		<p>
-		[page:Number size] -- (可选的) 表示代表轴的线段长度. 默认为 *1*.
+		[page:Number size] -- (可选的) 表示代表轴的线段长度. 默认为 `1`.
 		</p>
 		</p>
 
 
-		<h2>属性</h2>
+		<h2>属性(Properties)</h2>
 		<p>请到基类 [page:LineSegments] 页面查看公共属性.</p>
 		<p>请到基类 [page:LineSegments] 页面查看公共属性.</p>
 
 
-		<h2>方法</h2>
+		<h2>方法(Methods)</h2>
 		<p>请到基类 [page:LineSegments] 页面查看公共方法.</p>
 		<p>请到基类 [page:LineSegments] 页面查看公共方法.</p>
 
 
 		<h3>
 		<h3>
@@ -55,8 +53,7 @@
 			释放此实例分配的GPU相关资源。每当应用程序中不再使用此实例时,请调用此方法。
 			释放此实例分配的GPU相关资源。每当应用程序中不再使用此实例时,请调用此方法。
 		</p>
 		</p>
 
 
-		<h2>源码</h2>
-
+		<h2>源码(Source)</h2>
 		<p>
 		<p>
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		</p>
 		</p>

+ 19 - 14
docs/manual/zh/introduction/WebGL-compatibility-check.html

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