1
0
Эх сурвалжийг харах

Docs: translation LineSegmentsGeometry in zh (#31828)

mmjinglin163 4 сар өмнө
parent
commit
23f0146703

+ 103 - 0
docs/examples/zh/lines/LineSegmentsGeometry.html

@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html lang="zh">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:BufferGeometry] &rarr; [page:InstancedBufferGeometry] &rarr;
+
+		<h1>线段几何体([name])</h1>
+
+		<p class="desc">
+			一系列形成线段的顶点对。
+		</p>
+
+		<p class="desc">
+			在 [page:LineSegments2] 中用于描述形状。
+		</p>
+
+		<h2>导入</h2>
+
+		<p>
+			[name] 是一个附加组件,必须显式导入。
+			查看[link:#manual/introduction/Installation Installation / Addons]。
+		</p>
+
+		<code>
+			import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js';
+		</code>
+
+		<h2>示例</h2>
+
+		<p>[example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]</p>
+
+		<h2>构造函数</h2>
+
+		<h3>[name]()</h3>
+		<p>
+			创建一个新的几何体。
+			调用 [page:LineSegmentsGeometry.setPositions setPositions] 来添加线段。
+		</p>
+
+		<h2>属性</h2>
+		<p>共有属性,请参见基类 [page:InstancedBufferGeometry]。</p>
+
+		<h3>[property:Boolean isLineSegmentsGeometry]</h3>
+		<p>只读标志,用于检查给定对象是否为 [name] 类型。</p>
+
+		<h2>方法</h2>
+		<p>共有方法,请参见基类 [page:Mesh]。</p>
+
+		<h3>[method:this fromEdgesGeometry]( [param:EdgesGeometry geometry] )</h3>
+		<p>
+			将边缘几何体的顶点位置复制到此几何体中。
+		</p>
+
+		<h3>[method:this fromLineSegments]( [param:LineSegments lineSegments] )</h3>
+		<p>
+			将 [page:LineSegments] 对象的顶点位置复制到此几何体中。
+			假定源几何体未使用索引。
+		</p>
+
+		<h3>[method:this fromMesh]( [param:Mesh mesh] )</h3>
+		<p>
+			将网格对象的顶点位置复制到此几何体中。
+		</p>
+
+		<h3>[method:this fromWireframeGeometry]( [param:WireframeGeometry geometry] )</h3>
+		<p>
+			将线框几何体的顶点位置复制到此几何体中。
+		</p>
+
+		<h3>[method:this setColors]( [param:Array array] )</h3>
+		<p>
+			替换每个顶点的颜色。
+			每六个值描述一个线段:`[r1, g1, b1, r2, g2, b2]`。
+			数组可以是 `Array` 或 `Float32Array` 类型。
+		</p>
+
+		<h3>[method:this setPositions]( [param:Array array] )</h3>
+		<p>
+			用新的顶点位置集替换现有顶点位置。
+			数组可以是 `Array` 或 `Float32Array` 类型。
+			数组长度必须是 6 的倍数。
+		</p>
+		<p>
+			另请参见 [page:LineSegmentsGeometry.positions positions]。
+		</p>
+
+		<h3>[method:undefined toJSON]()</h3>
+		<p>
+			未实现。
+		</p>
+
+		<h2>源代码</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/LineSegmentsGeometry.js examples/jsm/lines/LineSegmentsGeometry.js]
+		</p>
+	</body>
+</html>

+ 2 - 1
docs/list.json

@@ -1047,7 +1047,8 @@
 				"Line2": "examples/zh/lines/Line2",
 				"LineGeometry": "examples/en/lines/LineGeometry",
 				"LineMaterial": "examples/en/lines/LineMaterial",
-				"LineSegments2": "examples/en/lines/LineSegments2"
+				"LineSegments2": "examples/en/lines/LineSegments2",
+				"LineSegmentsGeometry": "examples/en/lines/LineSegmentsGeometry"
 			},
 
 			"加载器": {

粤ICP备19079148号