You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Object3D] &rarr; [page:Mesh] &rarr;
<h1>[name]</h1>
<p class="desc">
A series of lines drawn between pairs of vertices.
</p>
<p class="desc">
This adds functionality beyond [page:LineSegments], like arbitrary line width and changing width to be in world units.
The [page:Line2] extends this object, forming a polyline instead of individual segments.
</p>
<h2>Import</h2>
<p>
[name] is an add-on, and therefore must be imported explicitly.
See [link:#manual/introduction/Installation Installation / Addons].
</p>
<code>
import { LineSegments2 } from 'three/addons/lines/LineSegments2.js';
</code>
<h2>Example</h2>
<p>[example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]</p>
<h2>Constructor</h2>
<h3>[name]( [param:LineSegmentsGeometry geometry], [param:LineMaterial material] )</h3>
<p>
[page:LineSegmentsGeometry geometry] — (optional) Pair(s) of vertices representing each line segment.<br />
[page:Material material] — (optional) Material for the line. Default is a [page:LineMaterial] with random color.
</p>
<h2>Properties</h2>
<p>See the base [page:Mesh] class for common properties.</p>
<h3>[property:Boolean isLineSegments2]</h3>
<p>Read-only flag to check if a given object is of type [name].</p>
<h2>Methods</h2>
<p>See the base [page:Mesh] class for common methods.</p>
<h3>[method:undefined onBeforeRender]( [param:WebGLRenderer renderer] )</h3>
<p>
Called by the framework to update the material's resolution property, needed for screen-scaled widths.
</p>
<p>
If your object is not visible to a camera (e.g. by [page:Object3D.layers layers] or [page:Object3D.visible visible],) you must call this manually whenever the viewport changes.
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/LineSegments2.js examples/jsm/lines/LineSegments2.js]
</p>
</body>
</html>