1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <!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:Material] → [page:ShaderMaterial] →
- <h1>[name]</h1>
- <p class="desc">
- A material for drawing wireframe-style geometries.
- Unlike [page:LineBasicMaterial], it supports arbitrary line widths and allows using world units instead of screen space units.
- This material is used with [page:LineSegments2] and [page:Line2].
- </p>
- <p class="desc">
- Lines are always rendered with round caps and round joints.
- </p>
- <h2>Examples</h2>
- <p>
- [example:webgl_lines_fat WebGL / lines / fat ]<br />
- [example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]<br />
- [example:webgl_lines_fat_wireframe WebGL / lines / fat / wireframe ]<br />
- [example:webgpu_lines_fat WebGPU / lines / fat / raycasting ]
- </p>
- <h2>Constructor</h2>
- <h3>[name]( [param:Object parameters] )</h3>
- <p>
- [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
- Any property of the material (including any property inherited from [page:ShaderMaterial]) can be passed in here.
- </p>
- <p>
- The exception is the property [page:Hexadecimal color], which can be passed in as a number or hexadecimal string and is `0xffffff` (white) by default.
- [page:Color.set]( color ) is called internally.
- </p>
- <h2>Properties</h2>
- <p>See the base [page:ShaderMaterial] class for common properties.</p>
- <h3>[property:Color color]</h3>
- <p>[page:Color] of the material, by default set to white (0xffffff).</p>
- <h3>[property:Boolean dashed]</h3>
- <p>Whether the line is dashed, or solid. Default is `false`.</p>
- <h3>[property:number dashOffset]</h3>
- <p>Where in the dash cycle the dash starts. Default is `0`.</p>
- <h3>[property:number dashScale]</h3>
- <p>The scale of the dashes and gaps. Default is `1`.</p>
- <h3>[property:number dashSize]</h3>
- <p>The size of the dash. Default is `1`.</p>
- <h3>[property:number gapSize]</h3>
- <p>The size of the gap. Default is `1`.</p>
- <h3>[property:Float linewidth]</h3>
- <p>Controls line thickness. Default is `1`.</p>
- <h3>[property:Vector2 resolution]</h3>
- <p>
- The size of the viewport, in screen pixels.
- This must be kept updated to make screen-space rendering accurate.
- The [page:LineSegments2.onBeforeRender] callback performs the update for visible objects.
- Default is `[1, 1]`.
- </p>
- <h3>[property:Boolean worldUnits]</h3>
- <p>
- Whether the material's sizes (width, dash gaps) are in world units.
- Default is `false` (screen space units.)
- </p>
- <h2>Methods</h2>
- <p>See the base [page:ShaderMaterial] class for common methods.</p>
- <h2>Source</h2>
- <p>
- [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/LineMaterial.js examples/jsm/lines/LineMaterial.js]
- </p>
- </body>
- </html>
|