File tree Expand file tree Collapse file tree 2 files changed +71
-1
lines changed
Expand file tree Collapse file tree 2 files changed +71
-1
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] →
11+
12+ < h1 > 线段组([name])</ h1 >
13+
14+ < p class ="desc ">
15+ 在顶点对之间绘制的一系列线段。
16+ </ p >
17+
18+ < p class ="desc ">
19+ 相比 [page:LineSegments],该类提供了更多功能,如任意线宽设置以及支持使用世界单位定义线宽。
20+ [page:Line2] 继承自该对象,形成连续的多段线而不是独立的线段。
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 { LineSegments2 } from 'three/addons/lines/LineSegments2.js';
32+ </ code >
33+
34+ < h2 > 示例</ h2 >
35+
36+ < p > [example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]</ p >
37+
38+ < h2 > 构造函数</ h2 >
39+
40+ < h3 > [name]( [param:LineSegmentsGeometry geometry], [param:LineMaterial material] )</ h3 >
41+ < p >
42+ [page:LineSegmentsGeometry geometry] — (可选)表示每个线段的顶点对。< br />
43+ [page:Material material] — (可选)线段的材质。默认为具有随机颜色的 [page:LineMaterial]。
44+ </ p >
45+
46+ < h2 > 属性</ h2 >
47+ < p > 共有属性,请参见基类 [page:Mesh]。</ p >
48+
49+ < h3 > [property:Boolean isLineSegments2]</ h3 >
50+ < p > 只读标志,用于检查给定对象是否为 [name] 类型。</ p >
51+
52+ < h2 > 方法</ h2 >
53+ < p > 共有方法,请参见基类 [page:Mesh]。</ p >
54+
55+ < h3 > [method:undefined onBeforeRender]( [param:WebGLRenderer renderer] )</ h3 >
56+ < p >
57+ 此方法由框架调用,用于更新材质的分辨率属性,该属性为实现屏幕比例宽度所必需。
58+ </ p >
59+ < p >
60+ 如果您的对象对相机不可见(例如通过 [page:Object3D.layers layers] 或 [page:Object3D.visible visible]),则在视口发生变化时需要手动调用此方法。
61+ </ p >
62+
63+ < h2 > 源代码</ h2 >
64+
65+ < p >
66+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/LineSegments2.js examples/jsm/lines/LineSegments2.js]
67+ </ p >
68+ </ body >
69+ </ html >
Original file line number Diff line number Diff line change 10461046 "线段" : {
10471047 "Line2" : " examples/zh/lines/Line2" ,
10481048 "LineGeometry" : " examples/en/lines/LineGeometry" ,
1049- "LineMaterial" : " examples/en/lines/LineMaterial"
1049+ "LineMaterial" : " examples/en/lines/LineMaterial" ,
1050+ "LineSegments2" : " examples/en/lines/LineSegments2"
10501051 },
10511052
10521053 "加载器" : {
You can’t perform that action at this time.
0 commit comments