|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="it"> |
| 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:Material] → |
| 11 | + |
| 12 | + <h1>[name]</h1> |
| 13 | + |
| 14 | + <p class="desc">Un materiale per disegnare geometrie in stile wireframe.</p> |
| 15 | + |
| 16 | + <h2>Codice di Esempio</h2> |
| 17 | + |
| 18 | + <code> |
| 19 | + const material = new THREE.LineBasicMaterial( { |
| 20 | + color: 0xffffff, |
| 21 | + linewidth: 1, |
| 22 | + linecap: 'round', // ignorato da WebGLRenderer |
| 23 | + linejoin: 'round' // ignorato da WebGLRenderer |
| 24 | + } ); |
| 25 | + </code> |
| 26 | + |
| 27 | + <h2>Esempi</h2> |
| 28 | + |
| 29 | + <p> |
| 30 | + [example:webgl_buffergeometry_drawrange WebGL / buffergeometry / drawrange]<br /> |
| 31 | + [example:webgl_buffergeometry_lines WebGL / buffergeometry / lines]<br /> |
| 32 | + [example:webgl_buffergeometry_lines_indexed WebGL / buffergeometry / lines / indexed]<br /> |
| 33 | + [example:webgl_decals WebGL / decals]<br /> |
| 34 | + [example:webgl_geometry_nurbs WebGL / geometry / nurbs]<br /> |
| 35 | + [example:webgl_geometry_shapes WebGL / geometry / shapes]<br /> |
| 36 | + [example:webgl_geometry_spline_editor WebGL / geometry / spline / editor]<br /> |
| 37 | + [example:webgl_interactive_buffergeometry WebGL / interactive / buffergeometry]<br /> |
| 38 | + [example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br /> |
| 39 | + [example:webgl_lines_colors WebGL / lines / colors]<br /> |
| 40 | + [example:webgl_lines_dashed WebGL / lines / dashed]<br /> |
| 41 | + [example:webgl_lines_sphere WebGL / lines / sphere]<br /> |
| 42 | + [example:webgl_materials WebGL / materials]<br /> |
| 43 | + [example:physics_ammo_rope physics / ammo / rope] |
| 44 | + </p> |
| 45 | + |
| 46 | + <h2>Costruttore</h2> |
| 47 | + |
| 48 | + <h3>[name]( [param:Object parameters] )</h3> |
| 49 | + |
| 50 | + <p> |
| 51 | + [page:Object parameters] - (opzionale) un oggetto con una o più proprietà che definiscono l'aspetto del materiale. |
| 52 | + Qualsiasi proprietà del materiale (inclusa qualsiasi proprietà ereditata dal [page:Material Materiale]) può essere passata qui.<br /><br /> |
| 53 | + |
| 54 | + L'eccezione è la proprietà [page:Hexadecimal color], che può essere passata come una stringa esadecimale ed il suo valore predefinito è `0xffffff` (bianco). |
| 55 | + Il metodo [page:Color.set]( color ) è chiamato internamente. |
| 56 | + </p> |
| 57 | + |
| 58 | + <h2>Proprietà</h2> |
| 59 | + <p>Vedi la classe base [page:Material] per le proprietà comuni.</p> |
| 60 | + |
| 61 | + <h3>[property:Color color]</h3> |
| 62 | + <p>[page:Color Colore] del materiale, da impostazione predefinita impostato a bianco (0xffffff).</p> |
| 63 | + |
| 64 | + <h3>[property:Boolean fog]</h3> |
| 65 | + <p>Indica se il materiale è influenzato dalla nebbia. Il valore predefinito è `true`.</p> |
| 66 | + |
| 67 | + <h3>[property:Float linewidth]</h3> |
| 68 | + <p> |
| 69 | + Controlla lo spessore della linea. Il valore predefinito è `1`.<br /><br /> |
| 70 | + |
| 71 | + A causa delle limitazioni del [link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf profilo OpenGL Core] |
| 72 | + con il renderer [page:WebGLRenderer WebGL] sulla maggior parte delle piattaforme, la larghezza della linea sarà sempre 1 |
| 73 | + indipendentemente dal valore impostato. |
| 74 | + </p> |
| 75 | + |
| 76 | + <h3>[property:String linecap]</h3> |
| 77 | + <p> |
| 78 | + Definisce l'aspetto della fine della linea. I valori possibili sono 'butt', 'round' e 'square'. |
| 79 | + Il valore predefinito è 'round'.<br /><br /> |
| 80 | + |
| 81 | + Questa corrisponde alla proprietà [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap] |
| 82 | + e viene ignorata dal renderer [page:WebGLRenderer WebGL]. |
| 83 | + </p> |
| 84 | + |
| 85 | + <h3>[property:String linejoin]</h3> |
| 86 | + <p> |
| 87 | + Definisce l'aspetto dei punti di unione della linea. I valori possibili sono 'round', 'bevel' e 'miter'. Il valore predefinito è 'round'. <br /><br /> |
| 88 | + |
| 89 | + Questa corrisponde alla proprietà [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap] |
| 90 | + e viene ignorata dal renderer [page:WebGLRenderer WebGL]. |
| 91 | + </p> |
| 92 | + |
| 93 | + <h2>Metodi</h2> |
| 94 | + <p>Vedi la classe base [page:Material] per i metodi comuni.</p> |
| 95 | + |
| 96 | + <h2>Source</h2> |
| 97 | + |
| 98 | + <p> |
| 99 | + [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] |
| 100 | + </p> |
| 101 | + </body> |
| 102 | +</html> |
0 commit comments