File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed
Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="zh ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < base href ="../../../ " />
6+ < script src ="page.js "> </ script >
7+ < link type ="text/css " rel ="stylesheet " href ="page.css " />
8+ </ head >
9+ < body >
10+ [page:Object3D] → [page:Mesh] → [page:LineSegments2] →
11+
12+ < h1 > 线段([name])</ h1 >
13+
14+ < p class ="desc ">
15+ 在顶点之间绘制的多段线。
16+ </ p >
17+
18+ < p class ="desc ">
19+ 相比 [page:Line],该类提供了更多功能,如任意线宽设置以及支持使用世界单位定义线宽。
20+ 它继承自 [page:LineSegments2],简化了从点链构建线段的过程。
21+ </ p >
22+
23+ < h2 > 导入</ h2 >
24+
25+ < p >
26+ [name] 是一个附加组件,必须显式导入。
27+ 查看[link:#manual/introduction/Installation Installation / Addons]。
28+ </ p >
29+
30+ < code >
31+ import { Line2 } from 'three/addons/lines/Line2.js';
32+ </ code >
33+
34+ < h2 > 示例</ h2 >
35+
36+ < p >
37+ [example:webgl_lines_fat WebGL / lines / fat ]< br />
38+ [example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]< br />
39+ [example:webgpu_lines_fat WebGPU / lines / fat / raycasting ]
40+ </ p >
41+
42+ < h2 > 构造函数</ h2 >
43+
44+ < h3 > [name]( [param:LineGeometry geometry], [param:LineMaterial material] )</ h3 >
45+ < p >
46+ [page:LineGeometry geometry] — (可选)表示每个线段的顶点对。< br />
47+ [page:Material material] — (可选)线段的材质。默认为具有随机颜色的 [page:LineMaterial]。
48+ </ p >
49+
50+ < h2 > 属性</ h2 >
51+ < p > 共有属性,请参见基类 [page:LineSegments2]。</ p >
52+
53+ < h3 > [property:Boolean isLine2]</ h3 >
54+ < p > 只读标志,用于检查给定对象是否为 [name] 类型。</ p >
55+
56+ < h2 > 方法</ h2 >
57+ < p > 共有方法,请参见基类 [page:LineSegments2]。</ p >
58+
59+ < h2 > 源代码</ h2 >
60+
61+ < p >
62+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/Line2.js examples/jsm/lines/Line2.js]
63+ </ p >
64+ </ body >
65+ </ html >
Original file line number Diff line number Diff line change 10431043 "LightProbeGenerator" : " examples/zh/lights/LightProbeGenerator"
10441044 },
10451045
1046+ "线段" : {
1047+ "Line2" : " examples/zh/lines/Line2"
1048+ },
1049+
10461050 "加载器" : {
10471051 "3DMLoader" : " examples/zh/loaders/3DMLoader" ,
10481052 "DRACOLoader" : " examples/zh/loaders/DRACOLoader" ,
You can’t perform that action at this time.
0 commit comments